Skip to Content
Next Hat
ReferencesNanoclCLIOverview

Use the Nanocl command line

nanocl [OPTIONS] <COMMAND>

Run nanocl --help for the current command list or append --help to a subcommand. Nanocl 0.18 exposes these top-level command groups and operations:

CommandPurpose
namespace, secret, job, cargo, vm, resourceManage Nanocl objects
metric, context, node, event, stateManage supporting APIs and Statefiles
psList concrete runtime processes
inspect, logs, statsInspect one or more processes as supported by each command
exec, killExecute in or signal one exact process name/full Docker ID
info, versionShow host and version information
install, uninstall, backupManage the local installation and export desired state

The global --host option selects a nanocld endpoint and defaults to unix://run/nanocl/nanocl.sock.

Workload keys and process names

Cargo and VM commands use canonical {namespace}.{name} keys, for example:

nanocl cargo inspect global.storefront nanocl vm inspect global.build-runner

Process-scoped commands do not accept a Cargo name and replica selector. Find the concrete process first, then use the exact returned name or full Docker ID:

nanocl ps --namespace global --kind cargo nanocl exec PROCESS -- sh nanocl kill --signal SIGTERM PROCESS

See Process operations for the multi-container workflow.

Help

$ nanocl cargo --help Manage cargoes Usage: nanocl cargo [OPTIONS] <COMMAND> Commands: list List existing cargo create Create a new cargo start Start cargoes by canonical keys stop Stop cargoes by canonical keys restart Restart cargoes by canonical keys remove Remove cargoes by canonical keys inspect Inspect a cargo by its canonical key patch Update a cargo by its canonical key history List cargo history revert Revert cargo to a specific history logs Show logs run Run a cargo stats Show stats of cargo help Print this message or the help of the given subcommand(s)

Depending on the local Unix socket permissions, you may need to run Nanocl as a user in the nanocl group. See the installation instructions.

Last updated on