Skip to content

Monk CLI Reference

This page provides a comprehensive reference for all Monk CLI commands.

Global Options

These options can be used with any command:

OptionDescription
--socket SOCKET, -s SOCKETSet TCP or UNIX SOCKET that monkd is listening on
--nofancyNo fancy output (emoji, formatting etc.)
--jsonReturn only JSON output
--nocolorDo not color the output
--silentDo not print the log
--token-folder value, --tf valueSet the path to the token storage folder
--dev-log PATHSet PATH to development log file
--remote-connection value, -r valueRemote connection config file
--remote-socket value, --rs valueRemote socket
--skip-version-checkSkip peer version mismatch in cluster
--no-eventsDisable interactive events
--no-interactiveDisable interactive mode (useful for scripts and CI)
--help, -hShow help

General Commands

monk

The main command. Shows available commands and options.

Usage:

monk [GLOBAL OPTIONS] command [OPTIONS] [arguments...]

monk status

Prints Monk’s status.

Usage:

monk status

monk version

Prints versions of the CLI and connected daemon.

Usage:

monk version

monk help, monk h

Shows a list of commands or help for one command.

Usage:

monk help [COMMAND]

Authentication Commands

monk register

Register a new Monk account.

Usage:

monk register

monk login

Log in with your Monk account.

Usage:

monk login

monk logout

Log out from your Monk account.

Usage:

monk logout

monk reset

Reset your Monk account password.

Usage:

monk reset

Template Management Commands

monk load

Load template YAML file(s) from disk.

Usage:

monk load [OPTIONS] [FILE] ...

Options:

OptionDescription
--strict, -sFail on warnings
--repo value, -r valueLoad template with specified repo as prefix (default: “local”)

monk unload

Delete local template.

Usage:

monk unload [TEMPLATE]

monk list, monk ls

List available templates.

Usage:

monk list [OPTIONS] [FILTER]

Options:

OptionDescription
--runnables, -rOnly list runnables
--groups, -gOnly list groups
--local, -lOnly list local templates
--entitiesOnly list entities
--show-deprecatedInclude templates marked as deprecated in the list
--repo valueOnly list templates from a specific repository

monk info

Print information about a template.

Usage:

monk info [TEMPLATE]

monk actions, monk list-actions

List actions exposed by a template.

Usage:

monk actions [TEMPLATE]

monk dump

Print template(s) in YAML format.

Usage:

monk dump [TEMPLATE]

Workload Management Commands

monk run

Run a template.

Usage:

monk run [OPTIONS] [TEMPLATE] ...

Options:

OptionDescription
--force-move, -fRe-schedule the workload if it’s already running on a different tag/peer
--tag TAG, -t TAGRun new runnable only on peers tagged with TAG
--peer NAME, -p NAMERun new runnable on peer named NAME
--multiple, -mSelect multiple templates
--autoload, -aAutomatically reload modified templates without prompting
--set value, -s valueSet runtime value for a variable
--variables-file value, --vf valueFile with runtime values to set for specified variables, in YAML format
--metadata, -dDisplay template metadata
--local, -lRun template locally even if a cluster is available
--local-only, -oSearch for templates only in local repository
--wait-readinessWait while a runnable becomes ready

monk describe

Describe a running workload.

Usage:

monk describe [RUNNABLE]

monk update

Update a running workload with new template definition.

Usage:

monk update [RUNNABLE]

monk restart

Restart a running workload.

Usage:

monk restart [RUNNABLE]

monk stop

Stop a running workload.

Usage:

monk stop [RUNNABLE]

monk delete, monk purge

Stop, remove and clean up workloads.

Usage:

monk delete [RUNNABLE]

monk ps

List running workloads.

Usage:

monk ps [OPTIONS]

Options:

OptionDescription
--filter TEMPLATE, -f TEMPLATEFilter by TEMPLATE name
--local, -lShow only local workloads
--all, -aShow all workloads with any status (stopped etc.)
--tag TAG, -t TAGFilter by TAG
--peer NAME, -p NAMEFilter by peer NAME

monk stats

Print CPU, memory and disk used by workload(s).

Usage:

monk stats [RUNNABLE]

monk do

Run an action from a running workload.

Usage:

monk do [RUNNABLE] [ACTION]

Container Interaction Commands

monk exec

Execute command in a container.

Usage:

monk exec [RUNNABLE] [COMMAND]

monk shell

Open an interactive shell in a container; alias for monk exec -i [RUNNABLE] /bin/sh.

Usage:

monk shell [RUNNABLE]

monk logs, monk log

Print log stream from a running container.

Usage:

monk logs [RUNNABLE]

monk port-forward

Forward local port to a running container.

Usage:

monk port-forward [RUNNABLE] [PORT]

Cluster Management Commands

monk cluster, monk c, monk cloister

Set up and manage clusters.

Usage:

monk cluster command [OPTIONS] [arguments...]

Cluster Inspection Commands:

cluster info

Print information about current cluster.

Usage:

monk cluster info

cluster peers

List peers in current cluster.

Usage:

monk cluster peers [OPTIONS]

Options:

OptionDescription
--order value, -s valueOrder peers (valid options: name, tag, provider, containers) (default: “name”)
--name value, -n valueFilter peers by name
--tag value, -t valueFilter peers by tag
--provider value, -p valueFilter peers by provider
--active, -aFilter only active peers

cluster volumes

List cloud volumes attached to current cluster.

cluster balancers

List cloud balancers attached to current cluster.

cluster providers

List cloud providers installed in current cluster.

cluster stats

List resource usage by peer.

cluster cloud-resources

List cloud resources of the cluster.

cluster snapshots

List snapshots for given provider.

Cluster Lifecycle Commands:

cluster new

Create a new cluster.

Usage:

monk cluster new [OPTIONS]

Options:

OptionDescription
--name value, -n valueName for the new cluster
--labels value, -l valueSet label for all cloud peers (<KEY>=<VALUE> format)

cluster grow

Provision and connect new peers to current cluster.

Usage:

monk cluster grow [OPTIONS]

Options:

OptionDescription
--provider CLOUD, -p CLOUDThe CLOUD to provision instances on: GCP, AWS, Azure or DigitalOcean
--name value, -n valueInstance name
--tag TAG, -t TAG, --tags TAGTag new instances with TAG
--instance-type value, -i valueInstance type
--gpu-type value, -g valueGPU type (GCP only)
--gpu-count valueGPU count (GCP only)
--region value, -r valueInstance region
--zone value, -z valueInstance zone (GCP only)
--disk-size value, -d valueDisk Size (in GBs) (not available for DigitalOcean)
--disk-type valueDisk Type (depends from provider, not available for DigitalOcean)
--num-instances NUMBER, -m NUMBERProvision NUMBER instances
--grow-timeout TIMEOUTWait for TIMEOUT minutes before failing (must be more than 10)
--ssh-pub-key value, --pk valueSSH public key path (Azure only)
--security-key-pair NAME, --kp NAMESecurity key-pair NAME (AWS and DigitalOcean only)
--iops valueInput/output operations per second (AWS and Azure only)
--labels value, -l valueSet cloud label for a peer (<KEY>=<VALUE> format)
--storage-provider value, --sp valueStorage provider (AWS and Azure only)
--network-name valueVirtual network name (AWS and Azure only)
--subnet-name valueSubnet name (AWS and Azure only)
--subnet-cidr valueSubnet CIDR (AWS and Azure only)
--network-cidr valueNetwork CIDR (AWS and Azure only)
--operation-system value, --os valueOperation system (AWS, Azure only)

cluster shrink

Remove idle peers from current cluster.

Usage:

monk cluster shrink [OPTIONS]

Options:

OptionDescription
--force, -fDon’t ask for confirmation

cluster join, cluster switch

Join a cluster, or switch current cluster.

Usage:

monk cluster join [OPTIONS]

Options:

OptionDescription
--name NAME, -n NAMETarget cluster NAME
--local-name NAME, --ln NAMELocal node NAME. Default value = ‘local’
--peers MULTIADDRS, -b MULTIADDRSTarget cluster node MULTIADDRS
--code MONKCODE, -m MONKCODE, --monkcode MONKCODETarget cluster MONKCODE
--purge, -xPurge local runnables before switch
--no-confirm, --force, -fDon’t ask for confirmation to switch the cluster

cluster exit

Exit from current cluster into local-only mode.

cluster nuke

Tear down current cluster removing all resources.

Usage:

monk cluster nuke [OPTIONS]

Options:

OptionDescription
--force, -fDon’t ask for confirmation
--verbose, -vShow list of cloud resources which will be removed
--email value, -l value, -e value, -u valueEmail address
--password value, -p valuePassword
--remove-volumes, --rvRemove cloud volumes
--remove-snapshots, --rsRemove snapshots created by volume backup policy

cluster costs

Cluster costs estimation for requested resources.

cluster rename, cluster rn

Rename the current cluster.

cluster connect-remote-peer

Connect to remote cluster.

Peer Management Commands:

cluster peer-duplicate

Provision and connect a new peer based on existing one.

cluster peer-remove

Terminate and remove peer(s) from current cluster.

cluster peer-rename

Renaming the selected peer.

cluster peer-tags, cluster peer-tag

Edit tags on a peer.

Usage:

monk cluster peer-tags [OPTIONS]

Options:

OptionDescription
--id ID, -i IDPeer ID to edit
--tag TAGS, -t TAGS, --tags TAGSComma separated TAGS to tag the peer with

cluster peer-maintenance

Set peer under maintenance. The peer will not be part of the consensus and the balancer will ignore it on run, update and restart commands.

Cloud Provider Commands:

cluster provider, cluster p

Manage cloud providers.

Usage:

monk cluster provider command [OPTIONS] [arguments...]

Subcommands:

CommandDescription
addAdd cloud provider credentials
removeRemove cloud provider credentials

cluster provider add

Add a cloud provider credentials.

Usage:

monk cluster provider add [OPTIONS]

Options:

OptionDescription
--provider NAME, -p NAMEProvider NAME: GCP, AWS, Azure or Digitalocean
--file FILE, -f FILEPath to FILE containing cloud credentials
--access-key KEY, -k KEYAccess KEY (AWS only)
--secret-key KEY, -s KEYSecret KEY (AWS only)
--service-account-file FILEPath to service account JSON FILE (GCP only)
--aws-creds-file FILEPath to AWS credentials FILE (AWS only)
--aws-profile PROFILE, -c PROFILEAWS credentials PROFILE (AWS only)
--aws-session-token valueAWS session token (required only for temporary security credentials)
--aws-role valueSpecifies the Amazon Resource Name (ARN) of an IAM role
--azure-sdk-auth FILEPath to credentials JSON FILE (Azure only)
--digitalocean-token TOKENAuth TOKEN (Digitalocean only)
--azure-resource-group NAME, -g NAMEAzure resource group NAME (Azure only)
--ignore-kmsDon’t use provider keys for KMS

User Management Commands

monk users, monk u, monk user

Manage users and their access.

Usage:

monk users [COMMAND]

System Management Commands

monk system, monk s

Manage and debug monk internals (use with caution).

Usage:

monk system [COMMAND]

Registry Management Commands

monk registry, monk docker-login

Add a container registry.

Usage:

monk registry [OPTIONS]

monk registry-remove

Remove registry config.

Usage:

monk registry-remove [REGISTRY]

monk registry-list

List registry configs.

Usage:

monk registry-list

Secrets Management Commands

monk secrets

Manage secret values.

Usage:

monk secrets [COMMAND]

Machine Management Commands

monk machine, monk m

Manage virtual machines.

Usage:

monk machine [COMMAND]

Blob Management Commands

monk blobs

Manage blobs.

Usage:

monk blobs [COMMAND]

Image Management Commands

monk image, monk m

Manage images.

Usage:

monk image [COMMAND]

Interactive Commands

monk arrowscript-repl, monk repl

Start an interactive ArrowScript shell.

Usage:

monk arrowscript-repl

monk tutorial (deprecated)

Start the Monk interactive tutorial.

Usage:

monk tutorial

monk gui (deprecated)

Open Monk GUI.

Usage:

monk gui