Note
This is a CLI tool for the ODIN Fleet service by 4Players to manage and deploy your game servers. It is used to interact with the ODIN Fleet API. It's written in Deno and uses the TypeScript ODIN Fleet SDK internally.
The documentation for the CLI tool is available in our developer documentation for ODIN Fleet. You can find the documentation for the CLI tool in the CLI section.
To use the Odin CLI no explicit installation is required. You can either use the prebuilt binaries provided by us or compile it yourself.
You can simply head to the
release page and
download the latest binary for your environment. Place it wherever you like and
optionally add the path to your path environment variable.
To run and build the CLI tool from source, you need to have Deno installed. For
best compatibility it is recommended to use the Deno version according to
.dvmrc. The easiest way to manage multiple Deno version is to use
dvm. After installing it you can run
dvm install $(<.dvmrc) in this repository to install the hinted version.
Alternatively, you can install Deno by following the instructions on the
official Deno website.
Warning
Currently only Deno v1 is supported! Due to upstream limitations Deno v2
will not work at this time.
Next, run the following command to generate the CLI tool:
deno task buildThis will build a odin binary (or odin.exe on Windows) in the root of the
project. You can move this binary to a directory in your PATH to use it
globally. On macOS and Linux you might need to run the following command to make
the binary executable:
chmod +x odinTip
This part of the documentation is directed to Mac and Linux development. Working on Windows may require some adaptations to the following instructions.
Install the required dependencies by running:
deno install --allow-scriptsTo update the underlying SDK, you can simply run the following command:
deno task generate-api-from-backendThis will pull the latest OpenAPI specification file and generate the SDK from
it. The generated SDK will be placed in the src/api directory. The CLI tool
uses this SDK to interact with the ODIN APIs.
To run the CLI tool in development mode, you can run the following command:
deno task runInternally it calls deno run --allow-all src/main.ts. We use --allow-all
because the CLI tool needs to access various system resources to work correctly:
--allow-readto read the configuration file--allow-writeto write the configuration file--allow-netto make API requests--allow-envto read environment variables
To build the CLI tool, you can run the following command:
deno task buildThis will create a binary executable (i.e. odin on macOS and Linux and odin.exe on Windows) in the root of the project. You can move this binary to a directory in your PATH to use it globally.
Tip
More details about the CLI tool and other technical information can be found in the developer documentation.