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]

monk sign

Sign text using private key of node.

Usage:

monk sign [OPTIONS] [DATA]

Options:

OptionDescription
--clean, -cClean 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:

OptionDescription
--email value, -e valueEmail address
--password value, -p valuePassword
--github, --ghLog in with GitHub (default: false)
--google, -gLog in with Google (default: false)
--bitbucket, --bbLog in with Bitbucket (default: false)

Subcommands:

CommandDescription
socialLog in with your social account (GitHub, Google or Bitbucket)
githubLog in with your GitHub account
googleLog in with your Google account
bitbucketLog in with your Bitbucket account

Examples:

Terminal window
# Interactive login
monk login
# Login with email and password
monk login --email [email protected] --password mypassword
# Login with GitHub
monk login --github
# Login with social provider
monk 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:

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

Examples:

Terminal window
# Load a single template file
monk load template.yaml
# Load multiple template files
monk load template1.yaml template2.yaml template3.yaml
# Load all YAML files in a directory
monk load *.yaml
# Load templates from a MANIFEST file
monk load MANIFEST
# Load with custom repository prefix
monk 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:

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 [OPTIONS] [TEMPLATE]

Options:

OptionDescription
--multiple, -mDescribe multiple workloads (default: false)
--metadata, -dDisplay template metadata (default: false)
--show-lifecycles, -lShow template lifecycles (default: false)

monk update

Update a running workload with new template definition.

Usage:

monk update [OPTIONS] [TEMPLATE]

Options:

OptionDescription
--force-move, -fRe-schedule the workload if it’s already running on a different tag/peer (default: false)
--tag TAG, -t TAGRun new runnable only on peers tagged with TAG. It doesn’t move already started runnables
--peer NAME, -p NAMERun new runnable on peer named NAME. It doesn’t move already started runnables
--multiple, -mSelect multiple templates (default: false)
--autoload, -aAutomatically reload modified templates without prompting (default: false)
--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 (default: false)
--local, -lRun template locally even if a cluster is available (default: false)
--local-only, -oSearch for templates only in local repository (default: false)
--wait-readinessWait while a runnable becomes ready (default: false)
--remove-volumes, --rvRemove cloud volumes on update if they were deleted from a runnable (default: false)
--remove-snapshots, --rsRemove snapshots created by volume backup policy (default: false)
--allUpdate all workloads (default: false)

monk restart

Restart a running workload.

Usage:

monk restart [OPTIONS] [TEMPLATE]

Options:

OptionDescription
--multiple, -mRestart multiple workloads (default: false)
--allRestart all workloads (default: false)

monk stop

Stop a running workload.

Usage:

monk stop [OPTIONS] [TEMPLATE] ...

Options:

OptionDescription
--all, -aStop all running workloads (default: false)
--tag TAG, -t TAGStop workloads on peers tagged with TAG
--multiple, -mStop multiple workloads (default: false)

monk delete, monk purge

Stop, remove and clean up workloads.

Usage:

monk delete [OPTIONS] [RUNNABLE] ...

Options:

OptionDescription
--all, -aDelete all runnables (default: false)
--no-confirm, --forceDon’t ask for confirmation (default: false)
--ignore-images, --iiDon’t remove images (default: false)
--remove-volumes, --rvRemove cloud volumes (default: false)
--remove-snapshots, --rsRemove snapshots created by volume backup policy (default: false)

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 [OPTIONS] [TEMPLATE]

Options:

OptionDescription
--all, -aShow 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:

OptionDescription
--container ID, -c IDContainer ID
--peer ID or NAME, -p ID or NAMEPeer ID or NAME
--interactive, -iStart 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:

OptionDescription
--container ID, -c IDContainer ID
--peer ID or NAME, -p ID or NAMEPeer ID or NAME
--shell SHELL, -b SHELLPath 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:

OptionDescription
--follow, -fPrint the log continuously (default: false)
--container ID, -c IDContainer ID
--peer ID, -p IDPeer ID
--since valueShow logs since TIMESTAMP
--timestampsShow the timestamps in the log (default: false)
--until valueShow logs until TIMESTAMP
--last N, -l NPrint N last lines of the log (default: 10)
--tail, -tPrint 10 last lines of the log, equivalent to -l 10 (default: false)
--all, -aPrint 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:

OptionDescription
--container ID, -c IDContainer ID
--peer ID, -p IDPeer 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:

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 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:

OptionDescription
--email value, -e valueEmail
--role value, -r valueUser 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:

OptionDescription
--global, -gStore secret globally (default: false)
--runnable value, -r valueStore flag for the specified runnable
--kms value, -k valueSet the backing Key Management Service (one of ‘local’, ‘gcp’, ‘aws’ or ‘auto’)
--file value, -f valueRead 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:

OptionDescription
--name value, -n valueName 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:

OptionDescription
--registry value, -r valueRegistry host
--file value, -f valueDockerfile path
--local, -lBuild image locally (default: false)
--no-push, --npDo not push the image (default: false)
--arch value, -a valueArchitecture

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]