1. Help Center
  2. Getting Started
  3. Getting Started With Diarkis Server

How To Use Diarkis CLI


Diarkis CLI allows you to execute a plethora of operations for Diarkis from the command-line interface including building your server binary.

  • Building server binary with Diarkis Engine with your custom code.


  •  macOS, Linux
  • Internet access


You may install Diarkis CLI by following the instructions below:

Manual Download

You may download CLI from this link. You must download CLI appropriate for your environment. After unpacking the downloaded CLI, you may place "bin/diarkis-cli" anywhere you like.

※For macOS, if you get an error with the message "Cannot open the file...", you need to follow the steps below:

System Preferences > Security and Privacy > General > Open Anyway 

How To Use

diarkis-cli is used with a subcommand and optional flag(s)

$ diarkis-cli [subcommand] [flags]

Optional Flags

There are global flags (independent of the subcommand used) and flags specific to the subcommand used.

You may look up the global flags with diarkis-cli --help under "Global Flags:".

Subcommand specific flags are listed under "Flags"


Subcommand build

subcommand "build" is used to build Diarkis server binary. The subcommand interacts with Diarkis Build Server over the internet to build your Diarkis server binary.

The following are the steps of build overview:

1. Authenticates the license with Diarkis Build Server

2. Transport local server source code to Diarkis Build Server

3. Resolve and install go modules and build the server source code with Diarkis on Diarkis Build Server

4. Download the built binary to the local machine


CLI build uses "build.yml" as its configurations for the build process.

# Specify build target directory
root: .

# Go version to be used for build
goVersion: 1.16.5

# Environment variables for the entire project
GOOS: # If not used, the system environment variable will be used

# Build project root

# Project name

# compile target source code to be handled over to go build
target: cmd/udp/main.go

# Build result binary
output: remote_bin/udp

# Environment variables for each project
# ${PROJECT_DIR} will be the root when built

# Project name
target: cmd/http/main.go
output: remote_bin/http

# Global configurations

# License authentication key
# The key will be issued when you buy the license
project_id: xxxxxxxxx
builder_token: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

build Command Help

diarkis-cli build [flags]

-c, --conf string config yaml (default "build.yml")
-h, --help help for build
-t, --targets string build target projects

Global Flags:
--builderToken string
--host string
--port string (default "443")
--projectId string