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]
monk sign
Sign text using private key of node.
Usage:
monk sign [OPTIONS] [DATA]
Options:
Option | Description |
---|---|
--clean , -c | Clean output without additional text (default: false) |
Authentication Commands
monk register
Register a new Monk account. This command will guide you through the interactive account registration process.
Usage:
monk register [OPTIONS]
monk login
Log in with your Monk account using email/password or social authentication providers.
Usage:
monk login [OPTIONS]monk login [COMMAND]
Options:
Option | Description |
---|---|
--email value , -e value | Email address |
--password value , -p value | Password |
--github , --gh | Log in with GitHub (default: false) |
--google , -g | Log in with Google (default: false) |
--bitbucket , --bb | Log in with Bitbucket (default: false) |
Subcommands:
Command | Description |
---|---|
social | Log in with your social account (GitHub, Google or Bitbucket) |
github | Log in with your GitHub account |
google | Log in with your Google account |
bitbucket | Log in with your Bitbucket account |
Examples:
# Interactive loginmonk login
# Login with email and password
# Login with GitHubmonk login --github
# Login with social providermonk login github
monk logout
Log out from your Monk account and clear stored authentication tokens.
Usage:
monk logout [OPTIONS]
monk reset
Reset your Monk account password.
Usage:
monk reset
Template Management Commands
monk load
Load template YAML file(s) from disk. You can load individual YAML files, multiple files at once, or use a MANIFEST file to load a collection of templates.
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”) |
Examples:
# Load a single template filemonk load template.yaml
# Load multiple template filesmonk load template1.yaml template2.yaml template3.yaml
# Load all YAML files in a directorymonk load *.yaml
# Load templates from a MANIFEST filemonk load MANIFEST
# Load with custom repository prefixmonk load --repo myrepo template.yaml
# Load with strict validation (fail on warnings)monk load --strict template.yaml
MANIFEST File:
A MANIFEST file is a special YAML file that lists multiple template files to be loaded together, along with metadata and organizational structure. It allows you to organize and load related templates as a group with precise control over load order.
For detailed information about MANIFEST file structure, organization patterns, and best practices, see the MANIFEST Files section in the MonkScript reference.
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 [OPTIONS] [TEMPLATE]
Options:
Option | Description |
---|---|
--multiple , -m | Describe multiple workloads (default: false) |
--metadata , -d | Display template metadata (default: false) |
--show-lifecycles , -l | Show template lifecycles (default: false) |
monk update
Update a running workload with new template definition.
Usage:
monk update [OPTIONS] [TEMPLATE]
Options:
Option | Description |
---|---|
--force-move , -f | Re-schedule the workload if it’s already running on a different tag/peer (default: false) |
--tag TAG , -t TAG | Run new runnable only on peers tagged with TAG. It doesn’t move already started runnables |
--peer NAME , -p NAME | Run new runnable on peer named NAME. It doesn’t move already started runnables |
--multiple , -m | Select multiple templates (default: false) |
--autoload , -a | Automatically reload modified templates without prompting (default: false) |
--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 (default: false) |
--local , -l | Run template locally even if a cluster is available (default: false) |
--local-only , -o | Search for templates only in local repository (default: false) |
--wait-readiness | Wait while a runnable becomes ready (default: false) |
--remove-volumes , --rv | Remove cloud volumes on update if they were deleted from a runnable (default: false) |
--remove-snapshots , --rs | Remove snapshots created by volume backup policy (default: false) |
--all | Update all workloads (default: false) |
monk restart
Restart a running workload.
Usage:
monk restart [OPTIONS] [TEMPLATE]
Options:
Option | Description |
---|---|
--multiple , -m | Restart multiple workloads (default: false) |
--all | Restart all workloads (default: false) |
monk stop
Stop a running workload.
Usage:
monk stop [OPTIONS] [TEMPLATE] ...
Options:
Option | Description |
---|---|
--all , -a | Stop all running workloads (default: false) |
--tag TAG , -t TAG | Stop workloads on peers tagged with TAG |
--multiple , -m | Stop multiple workloads (default: false) |
monk delete
, monk purge
Stop, remove and clean up workloads.
Usage:
monk delete [OPTIONS] [RUNNABLE] ...
Options:
Option | Description |
---|---|
--all , -a | Delete all runnables (default: false) |
--no-confirm , --force | Don’t ask for confirmation (default: false) |
--ignore-images , --ii | Don’t remove images (default: false) |
--remove-volumes , --rv | Remove cloud volumes (default: false) |
--remove-snapshots , --rs | Remove snapshots created by volume backup policy (default: false) |
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 [OPTIONS] [TEMPLATE]
Options:
Option | Description |
---|---|
--all , -a | Show stats for all running workloads (default: false) |
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 [OPTIONS] [TEMPLATE] [CMD] [ARGS]...
Options:
Option | Description |
---|---|
--container ID , -c ID | Container ID |
--peer ID or NAME , -p ID or NAME | Peer ID or NAME |
--interactive , -i | Start interactive session with pseudo-TTY (default: false) |
monk shell
Open an interactive shell in a container; alias for monk exec -i [RUNNABLE] /bin/sh
.
Usage:
monk shell [OPTIONS] [TEMPLATE]
Options:
Option | Description |
---|---|
--container ID , -c ID | Container ID |
--peer ID or NAME , -p ID or NAME | Peer ID or NAME |
--shell SHELL , -b SHELL | Path to SHELL to run inside container (default: “/bin/sh”) |
monk logs
, monk log
Print log stream from a running container.
Usage:
monk logs [OPTIONS] [TEMPLATE]
Options:
Option | Description |
---|---|
--follow , -f | Print the log continuously (default: false) |
--container ID , -c ID | Container ID |
--peer ID , -p ID | Peer ID |
--since value | Show logs since TIMESTAMP |
--timestamps | Show the timestamps in the log (default: false) |
--until value | Show logs until TIMESTAMP |
--last N , -l N | Print N last lines of the log (default: 10) |
--tail , -t | Print 10 last lines of the log, equivalent to -l 10 (default: false) |
--all , -a | Print logs from all running containers at the same time (default: false) |
monk port-forward
Forward local port to a running container.
Usage:
monk port-forward [OPTIONS] [TEMPLATE] [LOCAL-PORT:REMOTE-PORT]
Options:
Option | Description |
---|---|
--container ID , -c ID | Container ID |
--peer ID , -p ID | Peer ID |
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 cluster users and their access permissions.
Usage:
monk users [COMMAND]
User Management Subcommands:
users add
Add cluster user(s).
Usage:
monk users add [OPTIONS]
Options:
Option | Description |
---|---|
--email value , -e value | |
--role value , -r value | User role (default: user) |
users remove
Remove cluster user(s).
Usage:
monk users remove [USER_EMAIL]
users list
List cluster users.
Usage:
monk users list
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 for secure storage and retrieval in templates and workloads.
Usage:
monk secrets [COMMAND]
Secret Management Subcommands:
secrets add
Associate a key with a secret value.
Usage:
monk secrets add [OPTIONS] KEY[=VALUE]...
Options:
Option | Description |
---|---|
--global , -g | Store secret globally (default: false) |
--runnable value , -r value | Store flag for the specified runnable |
--kms value , -k value | Set the backing Key Management Service (one of ‘local’, ‘gcp’, ‘aws’ or ‘auto’) |
--file value , -f value | Read secret value from a file (must provide exactly one secret name) |
secrets remove
Remove a secret value.
Usage:
monk secrets remove [SECRET_KEY]
secrets list
List available secrets and their scopes.
Usage:
monk secrets list
secrets unseal-vault
Unseal secret vault.
Usage:
monk secrets unseal-vault
secrets set-password
Set/Update custom password for secret vault.
Usage:
monk secrets set-password
secrets dump
Make file with dump of encrypted secrets.
Usage:
monk secrets dump
secrets load
Load a dump file with secrets.
Usage:
monk secrets load
Machine Management Commands (macOS Only)
monk machine
, monk m
Manage virtual machines for running Monk workloads. These commands are only available on macOS where monkd
runs inside a virtual machine.
Usage:
monk machine [COMMAND]
VM Management Subcommands:
machine info
Display information about the virtual machine.
Usage:
monk machine info [VM_NAME]
machine init
Initialize a new virtual machine.
Usage:
monk machine init [VM_NAME]
machine check
Check the status and health of the virtual machine.
Usage:
monk machine check [VM_NAME]
machine start
Start the virtual machine.
Usage:
monk machine start [VM_NAME]
machine stop
Stop the virtual machine.
Usage:
monk machine stop [VM_NAME]
machine remove
, machine rm
Remove the virtual machine.
Usage:
monk machine remove [VM_NAME]
machine connect
Connect to the virtual machine.
Usage:
monk machine connect [VM_NAME]
machine disconnect
Disconnect from the virtual machine.
Usage:
monk machine disconnect [VM_NAME]
machine upgrade
Upgrade the virtual machine.
Usage:
monk machine upgrade [VM_NAME]
Blob Management Commands
monk blobs
Manage binary large objects (blobs) for storing and sharing files across the cluster.
Usage:
monk blobs [COMMAND]
Blob Management Subcommands:
blobs store
, blobs upload
Store a blob from a file or directory.
Usage:
monk blobs store [OPTIONS] [FILE_OR_DIR]
Options:
Option | Description |
---|---|
--name value , -n value | Name of the blob. It is possible to update a blob by specifying the same name |
blobs delete
Delete a blob by name or hash.
Usage:
monk blobs delete [BLOB_NAME_OR_HASH]
blobs get
Retrieve a blob by name or hash.
Usage:
monk blobs get [BLOB_NAME_OR_HASH]
blobs list
List all stored blobs.
Usage:
monk blobs list
Volume Management Commands
monk volumes
Manage volumes and volume policies for persistent storage.
Usage:
monk volumes [COMMAND]
Volume Policy Subcommands:
volumes policies
Manage volume policies.
Usage:
monk volumes policies [COMMAND]
volumes policies create
Create volume policy.
Usage:
monk volumes policies create [POLICY_NAME]
volumes policies remove
Remove volume policy.
Usage:
monk volumes policies remove [POLICY_NAME]
volumes policies list
List volume policies.
Usage:
monk volumes policies list
Image Management Commands
monk image
Manage container images for building and deploying applications.
Usage:
monk image [COMMAND]
Image Management Subcommands:
image build
Build an image from context.
Usage:
monk image build [OPTIONS] [CONTEXT_PATH] [IMAGE]
Options:
Option | Description |
---|---|
--registry value , -r value | Registry host |
--file value , -f value | Dockerfile path |
--local , -l | Build image locally (default: false) |
--no-push , --np | Do not push the image (default: false) |
--arch value , -a value | Architecture |
image remove
Remove an image from repository.
Usage:
monk image remove [IMAGE_NAME]
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
System Management Commands (Advanced)
monk system
, monk s
Manage and debug Monk internals. These commands provide low-level access to Monk’s internal systems and should only be used by experienced users for troubleshooting and debugging purposes.
Usage:
monk system [COMMAND]
Debug Subcommands:
system logs
, system log
Print monkd logs from a specified peer.
Usage:
monk system logs [PEER_NAME]
system jobs
Get list of jobs.
Usage:
monk system jobs
system events
List events.
Usage:
monk system events
system consensus
, system consensus-info
Print consensus state for debugging.
Usage:
monk system consensus
Identity Management Subcommands:
system identity-export
Export the current identity (Private Key, Public Key, etc.).
Usage:
monk system identity-export
system identity-import
Import the current identity (Private Key, Public Key, etc.).
Usage:
monk system identity-import
Management Subcommands:
system node-info
, system peer-info
Print info about the current node.
Usage:
monk system node-info
system down
, system bye
Stop monkd on this machine.
Usage:
monk system down
system up
, system hi
Launch monkd on this machine.
Usage:
monk system up
system upgrade
, system update
Upgrade Monk on selected node(s).
Usage:
monk system upgrade
system selftest
Test system health.
Usage:
monk system selftest
Namespace Editing Subcommands:
system ns-list
List the contents of a namespace.
Usage:
monk system ns-list [NAMESPACE]
system ns-get
Get a value from namespace.
Usage:
monk system ns-get [NAMESPACE] [KEY]