Command Line Interface - CLI
How to use the Command Line Interface to install packages and update the server.
The Server provides a CLI (Command Line Interface) to help creating, updating and downloading Packages and Assets from the Vault.
It can work in two different modes: Interactive or Direct by running a command directly when starting it.
Starting the CLI in Interactive modeโ
To run the cli, start the server with --cli argument, this will start the Interactive CLI:
- Windows
- Linux
./NanosWorldServer.exe --cli
./NanosWorldServer.sh --cli
After started, if you type help you can see all the available commands:
INFO Starting nanos world CLI - Command Line Interface (beta)
nanos world cli> help
INFO Available commands:
- stop
- help
- update [package|assets] NAME1, NAME2...
- install [package|assets] NAME1, NAME2...
- add [package|assets] NAME
- check
nanos world cli>
Although the help output shows commas, several names must be separated by spaces, e.g. install package sandbox battlefield-kill-ui. The upload command is also available, see the table below.
All CLI Commandsโ
| Commands | Description |
|---|---|
install package [PACKAGE_NAMES...] | Install Packages (and their requirements) from the Vault |
update package [PACKAGE_NAMES...] | Update Packages from the Vault |
install assets [ASSET_NAMES...] | Install Asset Packs from the Vault |
update assets [ASSET_NAMES...] | Update Asset Packs from the Vault |
add package [PACKAGE_NAME] | Creates a new local Package in an interactive way |
add assets [ASSET_NAME] | Creates a new local Asset Pack in an interactive way |
upload package [PACKAGE_NAME] | Uploads a new version of a Package to the Vault (requires a token) |
upload assets [ASSET_NAME] | Uploads a new version of an Asset Pack to the Vault (requires a token) |
check | Check for Updates |
help | Display all Commands |
stop | Stops the CLI |
Running the CLI in One-Liner/Direct modeโ
It is also possible to run the CLI in a direct mode, just run the command together after the --cli. Example:
- Windows
- Linux
./NanosWorldServer.exe --cli update package sandbox
./NanosWorldServer.sh --cli update package sandbox
You can also install/update several Packages/Assets in a single command, separating them by spaces:
install package sandbox battlefield-kill-ui