# CLI Reference The `nemoclaw` CLI (also available as `ncl`) is the primary interface for managing sandboxes, providers, inference routes, and clusters. :::{tip} The CLI has comprehensive built-in help. Use `nemoclaw --help` at any level to discover commands and flags. ::: ## Global Options | Flag | Description | |------|-------------| | `-v`, `--verbose` | Increase verbosity (`-v` = info, `-vv` = debug, `-vvv` = trace). | | `-c`, `--cluster ` | Cluster to operate on (also via `NEMOCLAW_CLUSTER` env var). | ## Command Tree ``` nemoclaw (ncl) ├── cluster │ ├── status # Check gateway connectivity │ ├── use # Set active cluster │ ├── list # List all clusters │ └── admin │ ├── deploy [opts] # Provision or restart cluster │ ├── stop [opts] # Stop cluster (preserve state) │ ├── destroy [opts] # Destroy cluster permanently │ ├── info [--name] # Show deployment details │ └── tunnel [opts] # SSH tunnel for kubectl access ├── sandbox │ ├── create [opts] [-- CMD...] # Create sandbox and connect │ ├── get # Show sandbox details │ ├── list [opts] # List sandboxes │ ├── delete ... # Delete sandboxes │ ├── connect # SSH into sandbox │ ├── sync {--up|--down} # Sync files │ ├── logs [opts] # View/stream logs │ ├── ssh-config # Print SSH config block │ ├── forward │ │ ├── start [-d] # Start port forward │ │ ├── stop # Stop port forward │ │ └── list # List active forwards │ ├── image │ │ └── push [opts] # Build and push custom image │ └── policy │ ├── set --policy # Update live policy │ ├── get [--full] # Show current policy │ └── list # Policy revision history ├── provider │ ├── create --name --type [opts] # Create provider │ ├── get # Show provider details │ ├── list [opts] # List providers │ ├── update --type [opts] # Update provider │ └── delete ... # Delete providers ├── inference │ ├── create [opts] # Create inference route │ ├── update [opts] # Update inference route │ ├── delete ... # Delete inference routes │ └── list [opts] # List inference routes ├── gator # Launch TUI └── completions # Generate shell completions ``` ## Cluster Commands ### `nemoclaw cluster admin deploy` Provision or start a cluster (local or remote). | Flag | Default | Description | |------|---------|-------------| | `--name ` | `nemoclaw` | Cluster name. | | `--remote ` | — | SSH destination for remote deployment. | | `--ssh-key ` | — | SSH private key for remote deployment. | | `--port ` | 8080 | Host port mapped to gateway. | | `--kube-port [PORT]` | — | Expose K8s control plane on host port. | ### `nemoclaw cluster admin stop` Stop a cluster container (preserves state for later restart). ### `nemoclaw cluster admin destroy` Destroy a cluster and all its state permanently. ### `nemoclaw cluster admin info` Show deployment details: endpoint, kubeconfig path, kube port, remote host. ### `nemoclaw cluster admin tunnel` Start or print an SSH tunnel for kubectl access to a remote cluster. ## Sandbox Commands ### `nemoclaw sandbox create [OPTIONS] [-- COMMAND...]` Create a sandbox, wait for readiness, then connect or execute the trailing command. | Flag | Description | |------|-------------| | `--name ` | Sandbox name (auto-generated if omitted). | | `--image ` | Custom container image (BYOC). | | `--sync` | Sync local git-tracked files to `/sandbox`. | | `--keep` | Keep sandbox alive after command exits. | | `--provider ` | Provider to attach (repeatable). | | `--policy ` | Path to custom policy YAML. | | `--forward ` | Forward local port to sandbox (implies `--keep`). | | `--remote ` | SSH destination for auto-bootstrap. | ### `nemoclaw sandbox logs ` | Flag | Default | Description | |------|---------|-------------| | `-n ` | 200 | Number of log lines. | | `--tail` | — | Stream live logs. | | `--since ` | — | Logs from this duration ago (e.g., `5m`, `1h`). | | `--source ` | `all` | Filter: `gateway`, `sandbox`, or `all`. | | `--level ` | — | Minimum level: `error`, `warn`, `info`, `debug`, `trace`. | ### `nemoclaw sandbox sync {--up|--down} [dest]` Sync files to/from a sandbox. ### `nemoclaw sandbox forward start ` Start forwarding a local port to a sandbox. `-d` runs in background. ## Policy Commands ### `nemoclaw sandbox policy set --policy ` Update the policy on a live sandbox. Only dynamic fields can change at runtime. | Flag | Description | |------|-------------| | `--wait` | Wait for sandbox to confirm policy is loaded. | | `--timeout ` | Timeout for `--wait` (default: 60). | ### `nemoclaw sandbox policy get ` | Flag | Description | |------|-------------| | `--rev ` | Show a specific revision (default: latest). | | `--full` | Print full policy as YAML (round-trips with `--policy`). | ### `nemoclaw sandbox policy list ` Show policy revision history. ## Provider Commands ### `nemoclaw provider create --name --type ` | Flag | Description | |------|-------------| | `--from-existing` | Discover credentials from local machine. | | `--credential KEY[=VALUE]` | Credential pair (repeatable). Bare `KEY` reads from env var. | | `--config KEY=VALUE` | Config key/value pair (repeatable). | Supported types: `claude`, `opencode`, `codex`, `generic`, `nvidia`, `gitlab`, `github`, `outlook`. ## Inference Commands ### `nemoclaw inference create` | Flag | Description | |------|-------------| | `--routing-hint ` (required) | Routing hint for policy matching. | | `--base-url ` (required) | Backend endpoint URL. | | `--model-id ` (required) | Model identifier. | | `--api-key ` | API key for the endpoint. | | `--protocol ` | Protocol (auto-detected if omitted, repeatable). | | `--disabled` | Create in disabled state. |