1.5.3 • Published 2 years ago

bitburner-sync v1.5.3

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Bitburner Sync

This package allows code to be synced to the game from any environment. It's inspired by the VSCode extension but allows for greater freedom since it's not tied to a specific IDE. The only requirement is Node.js®.

NB: You must play the game via the Electron client (aka the Steam version) to be able to sync code.

Install

Install in your project via npm install bitburner-sync.

It can also be installed as a global tool via npm install bitburner-sync -g.

For more help around installation then look here.

Usage

Can be used from the terminal, then always prefix the calls with npx. Use npx bitburner-sync --help for full information.

Options

The following are command line options.

Commands

OptionDescription
\Do a single push from scriptRoot to bitburner.
getRetrieve files from bitburner and store at scriptRoot.
watchContinuously monitor the scriptRoot for changes.
helpDisplays the full help.

Parameters

OptionDescription
authTokenThe only required option, it can also be read from package.json. See the installation instruction above or the VSCode extension for information about how to retrieve it.
scriptRootThe folder that you want to sync. Defaults to the current folder. The directory node_modules is ignored but any other valid game files are synced. It's highly recommended to do a dryRun first to list all the files that would be synced.
serverUrlThe API server (game client) to connect to (defaults to a local application, 127.0.0.1).
allowDeleteIf the sync (upload and retrieve) should be allowed to delete files at the target.
dryRunDoesn't sync the files, simply lists them in the terminal.

package.json

It's recommended to be configured as a script that can then be invoked via npm run sync or similar.

{
  "scripts": {
    "sync": "bitburner-sync --watch"
  }
}

Optional config

{
  "config": {
    "bitburnerAuthToken": "abc",
    "bitburnerScriptRoot": "./dist",
    "bitburnerAllowDelete": "false",
    "bitburnerServerUrl": "127.0.0.1"
  }
}

bitburner-sync.json

This is another config file, if you prefer to have the config separate from the package.json file.

NB: The config inside package.json will override this config if both are specified.

{
  "authToken": "abc",
  "scriptRoot": "./dist",
  "allowDelete": false,
  "serverUrl": "127.0.0.1"
} 

Bitburner

Bitburner is a programming-based incremental game. Write scripts in JavaScript to automate gameplay, learn skills, play minigames, solve puzzles, and more in this cyberpunk text-based incremental RPG.

Relevant Links

The game can be played via Steam or via the Web with any browser that supports and has Javascript enabled. The discord is the place to go for information, help, to raise bugs or talk/help contribute features to the game!

1.5.3

2 years ago

1.5.2

2 years ago

1.5.1

2 years ago

1.5.0

2 years ago

1.4.0

2 years ago

1.3.0

2 years ago

1.2.0

2 years ago

1.1.1

2 years ago

1.0.2

2 years ago

1.1.0

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago