Monk CLI Reference
This page provides a comprehensive reference for all Monk CLI commands.
Global Options
These options can be used with any command:
Option | Description |
---|---|
--socket SOCKET , -s SOCKET | Set TCP or UNIX SOCKET that monkd is listening on |
--nofancy | No fancy output (emoji, formatting etc.) |
--json | Return only JSON output |
--nocolor | Do not color the output |
--silent | Do not print the log |
--token-folder value , --tf value | Set the path to the token storage folder |
--dev-log PATH | Set PATH to development log file |
--remote-connection value , -r value | Remote connection config file |
--remote-socket value , --rs value | Remote socket |
--skip-version-check | Skip peer version mismatch in cluster |
--no-events | Disable interactive events |
--no-interactive | Disable interactive mode (useful for scripts and CI) |
--help , -h | Show 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:
Option | Description |
---|---|
--strict , -s | Fail on warnings |
--repo value , -r value | Load 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:
Option | Description |
---|---|
--runnables , -r | Only list runnables |
--groups , -g | Only list groups |
--local , -l | Only list local templates |
--entities | Only list entities |
--show-deprecated | Include templates marked as deprecated in the list |
--repo value | Only 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:
Option | Description |
---|---|
--force-move , -f | Re-schedule the workload if it’s already running on a different tag/peer |
--tag TAG , -t TAG | Run new runnable only on peers tagged with TAG |
--peer NAME , -p NAME | Run new runnable on peer named NAME |
--multiple , -m | Select multiple templates |
--autoload , -a | Automatically reload modified templates without prompting |
--set value , -s value | Set runtime value for a variable |
--variables-file value , --vf value | File with runtime values to set for specified variables, in YAML format |
--metadata , -d | Display template metadata |
--local , -l | Run template locally even if a cluster is available |
--local-only , -o | Search for templates only in local repository |
--wait-readiness | Wait 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:
Option | Description |
---|---|
--filter TEMPLATE , -f TEMPLATE | Filter by TEMPLATE name |
--local , -l | Show only local workloads |
--all , -a | Show all workloads with any status (stopped etc.) |
--tag TAG , -t TAG | Filter by TAG |
--peer NAME , -p NAME | Filter 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:
Option | Description |
---|---|
--order value , -s value | Order peers (valid options: name, tag, provider, containers) (default: “name”) |
--name value , -n value | Filter peers by name |
--tag value , -t value | Filter peers by tag |
--provider value , -p value | Filter peers by provider |
--active , -a | Filter 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:
Option | Description |
---|---|
--name value , -n value | Name for the new cluster |
--labels value , -l value | Set label for all cloud peers (<KEY>=<VALUE> format) |
cluster grow
Provision and connect new peers to current cluster.
Usage:
monk cluster grow [OPTIONS]
Options:
Option | Description |
---|---|
--provider CLOUD , -p CLOUD | The CLOUD to provision instances on: GCP, AWS, Azure or DigitalOcean |
--name value , -n value | Instance name |
--tag TAG , -t TAG , --tags TAG | Tag new instances with TAG |
--instance-type value , -i value | Instance type |
--gpu-type value , -g value | GPU type (GCP only) |
--gpu-count value | GPU count (GCP only) |
--region value , -r value | Instance region |
--zone value , -z value | Instance zone (GCP only) |
--disk-size value , -d value | Disk Size (in GBs) (not available for DigitalOcean) |
--disk-type value | Disk Type (depends from provider, not available for DigitalOcean) |
--num-instances NUMBER , -m NUMBER | Provision NUMBER instances |
--grow-timeout TIMEOUT | Wait for TIMEOUT minutes before failing (must be more than 10) |
--ssh-pub-key value , --pk value | SSH public key path (Azure only) |
--security-key-pair NAME , --kp NAME | Security key-pair NAME (AWS and DigitalOcean only) |
--iops value | Input/output operations per second (AWS and Azure only) |
--labels value , -l value | Set cloud label for a peer (<KEY>=<VALUE> format) |
--storage-provider value , --sp value | Storage provider (AWS and Azure only) |
--network-name value | Virtual network name (AWS and Azure only) |
--subnet-name value | Subnet name (AWS and Azure only) |
--subnet-cidr value | Subnet CIDR (AWS and Azure only) |
--network-cidr value | Network CIDR (AWS and Azure only) |
--operation-system value , --os value | Operation system (AWS, Azure only) |
cluster shrink
Remove idle peers from current cluster.
Usage:
monk cluster shrink [OPTIONS]
Options:
Option | Description |
---|---|
--force , -f | Don’t ask for confirmation |
cluster join
, cluster switch
Join a cluster, or switch current cluster.
Usage:
monk cluster join [OPTIONS]
Options:
Option | Description |
---|---|
--name NAME , -n NAME | Target cluster NAME |
--local-name NAME , --ln NAME | Local node NAME. Default value = ‘local’ |
--peers MULTIADDRS , -b MULTIADDRS | Target cluster node MULTIADDRS |
--code MONKCODE , -m MONKCODE , --monkcode MONKCODE | Target cluster MONKCODE |
--purge , -x | Purge local runnables before switch |
--no-confirm , --force , -f | Don’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:
Option | Description |
---|---|
--force , -f | Don’t ask for confirmation |
--verbose , -v | Show list of cloud resources which will be removed |
--email value , -l value , -e value , -u value | Email address |
--password value , -p value | Password |
--remove-volumes , --rv | Remove cloud volumes |
--remove-snapshots , --rs | Remove 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:
Option | Description |
---|---|
--id ID , -i ID | Peer ID to edit |
--tag TAGS , -t TAGS , --tags TAGS | Comma 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:
Command | Description |
---|---|
add | Add cloud provider credentials |
remove | Remove cloud provider credentials |
cluster provider add
Add a cloud provider credentials.
Usage:
monk cluster provider add [OPTIONS]
Options:
Option | Description |
---|---|
--provider NAME , -p NAME | Provider NAME: GCP, AWS, Azure or Digitalocean |
--file FILE , -f FILE | Path to FILE containing cloud credentials |
--access-key KEY , -k KEY | Access KEY (AWS only) |
--secret-key KEY , -s KEY | Secret KEY (AWS only) |
--service-account-file FILE | Path to service account JSON FILE (GCP only) |
--aws-creds-file FILE | Path to AWS credentials FILE (AWS only) |
--aws-profile PROFILE , -c PROFILE | AWS credentials PROFILE (AWS only) |
--aws-session-token value | AWS session token (required only for temporary security credentials) |
--aws-role value | Specifies the Amazon Resource Name (ARN) of an IAM role |
--azure-sdk-auth FILE | Path to credentials JSON FILE (Azure only) |
--digitalocean-token TOKEN | Auth TOKEN (Digitalocean only) |
--azure-resource-group NAME , -g NAME | Azure resource group NAME (Azure only) |
--ignore-kms | Don’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