reference cli - loherangrin/o3tanks GitHub Wiki
Command-line interface (CLI) is the primary way to interact with O3Tanks. It accepts an input string as a command and it prints the final result, after forwarding the command to containers and orchestrating their executions.
usage: o3tanks <COMMAND> [<OPTION> ... ] [<ARGUMENT> ... ]
Available commands can be grouped by topic. Each command defines its own set of options and arguments:
| Command | Description |
|---|---|
| install | Download, build and install a new engine version |
| list | List all installed engine versions |
| refresh | Check if new updates are available for a specific engine version |
| uninstall | Uninstall an engine version |
| upgrade | Apply new updates to the local installation |
| Command | Description |
|---|---|
| init | Create a new empty project |
| build | Build a project runtime from its source code |
| clean | Remove all built files (binaries and intermediates) |
| open | Open the editor to view / modify the project |
| run | Run a project runtime (client / server) |
| settings | View / modify the project settings, such as the engine version that is bound to the project |
| Command | Description |
|---|---|
| help | Show available commands and their usage |
| version | Show version and other legal information |
Global options affect the general behavior of the CLI and can be used with any available command:
Similar to help command, this option shows usage of the current command. It has precedence over remaining options and arguments, which are ignored.
This option suppresses all output messages (stdout and stderr), returning the final exit code only (0 for success, any other integer for error).
CLI is configured to print a minimal set of messages about its execution, in order to provide a progression status without boring the user with too many details.
When more details are needed, following options can be used:
| Option | Description |
|---|---|
-v |
Print additional messages |
-vv |
Print additional messages and, if an error occurs, show the calling stacktrace |
CLI behavior can be customized setting the following environment variables before its execution. On a Linux system, they can be set for the current session only using export <ENV_VARIABLE>=<VALUE>, or to be persisted editing the shell configuration file (e.g. ~/.bashrc).
| Variable | Description |
|---|---|
O3TANKS_DEV_MODE |
Enable the development mode. Python scripts are loaded from the host instead of from images. This is intended for developers who want to contribute to this project |
O3TANKS_NO_CLI_CONTAINER |
Run CLI on the host directly, without using a container. This can increase performances on low-spec machines, but it requires to install python3 and some other libraries on the host |