Sandboxes
Create, reach and delete sandboxes; local runtimes, disk cleanup and the sandbox viewer.
| Command | Description |
|---|---|
cua sandbox | Sandboxes: local or an existing computer (direct). |
cua sandbox create | Create a sandbox: cua sb create IMAGE [--on local|direct:<addr>] [--kind auto|container|vm|microvm] [--runtime auto|gvisor|runc|qemu|lume|firecracker|vz|containerization]. |
cua sandbox launch | Deprecated alias of create. |
cua sandbox connect | Reattach to a sandbox (NAME or a ref such as local:NAME) and print it. |
cua sandbox ls | List sandboxes: local and direct, each with its location; --local filters. |
cua sandbox info | Show one sandbox. |
cua sandbox suspend | Suspend (pause/snapshot). |
cua sandbox resume | Resume. |
cua sandbox restart | Restart. |
cua sandbox checkpoint | Save a local sandbox's state as a named checkpoint: its memory and disk on every kind (a gVisor container, a QEMU or Lume VM, a microVM; it keeps running), the filesystem where an engine cannot save memory. |
cua sandbox fork | Start a new sandbox from a local sandbox (running or stopped) or a checkpoint. |
cua sandbox fork-many | Fork a checkpoint many times at once, on this machine or across your machines, printing each fork as soon as it is ready (or failed). |
cua sandbox publish | Upload a checkpoint to a fallback (a folder every machine mounts, or S3), so your other machines copy it from there when this one is away. |
cua sandbox bake | Bake a Docker Compose project into a checkpoint: a local VM of the docker tier (dockerd up at boot), the project uploaded, docker compose up --wait, health checks, then a live memory checkpoint. |
cua sandbox pool | Pools: sandboxes of one kind kept ready on this machine, so that cua sb create --pool NAME takes one in about 0.1 s. |
cua sandbox pool create | Create a pool, or update the pool of that name. |
cua sandbox pool ls | List the pools, with what each holds now. |
cua sandbox pool rm | Delete a pool (its ready sandboxes go; those created from it stay). |
cua sandbox checkpoints | List checkpoints; delete, pin or unpin one; or prune every unpinned one (checkpoints rm|pin|unpin NAME, checkpoints prune). |
cua sandbox checkpoints rm | Delete a checkpoint, here and on every machine of yours that holds a copy (forks made from it keep running). |
cua sandbox checkpoints pin | Pin a checkpoint: a fork source to keep (rm and prune leave it until it is unpinned). |
cua sandbox checkpoints unpin | Unpin a checkpoint (rm and prune delete it again). |
cua sandbox checkpoints prune | Delete every checkpoint that is not pinned (forks made from them keep running). |
cua sandbox rm | Delete a sandbox. |
cua sandbox exec | Run a command (joined into one shell line, as sh -c). |
cua sandbox run | Run a command in new Spaces, --count times (each in its own Space, deleted afterwards): on this machine, or with --on auto on the least-loaded of your machines. |
cua sandbox runs | Runs so far, one run's jobs, or one job with its output. |
cua sandbox shell | Interactive shell (PTY), or run a command in a PTY. |
cua sandbox cp | Copy files: cp NAME:/guest/path LOCAL or cp LOCAL NAME:/guest/path (NAME may be a ref: cp local:box:/tmp/x .). |
cua sandbox overlay | Inject freshly built binaries into a running sandbox (see create --overlay): NAME=PATH or NAME=PATH:GUEST_PATH. |
cua sandbox logs | Show logs: the backend console (QEMU serial, container) when there is one, else the guest system log through the spacesd. |
cua sandbox port-forward | Forward a guest port: port-forward NAME PORT[:LOCAL] (a local sandbox's port not published at create tunnels through cua-spacesd when the image has it). |
cua sandbox url | Print a URL for a named service: usable from this computer (default), or --public for a shareable URL that expires (--ttl, default 1h; a token URL served by the cua daemon). |
cua sandbox screenshot | Save a screenshot (PNG). |
cua sandbox mcp | Talk to an MCP server a sandbox serves: mcp NAME SERVICE tools, mcp NAME SERVICE call TOOL '{"a":1}'. |
cua sandbox mcp config | The endpoint URL and headers, for any MCP client. |
cua sandbox mcp info | Server name, version and negotiated protocol revision. |
cua sandbox mcp tools | List tools. |
cua sandbox mcp call | Call a tool with a JSON object of arguments. |
cua sandbox mcp resources | List resources. |
cua sandbox mcp templates | List resource templates. |
cua sandbox mcp read | Read a resource. |
cua sandbox mcp prompts | List prompts. |
cua sandbox mcp prompt | Render a prompt with a JSON object of string arguments. |
cua sandbox mcp request | Any other method (for example skills/list), printing the result. |
cua sandbox view | Open the sandbox desktop in the browser (the cua-spacesd HTML5 viewer). |
cua runtime | Local runtimes (cua-vmm). |
cua runtime doctor | Inspect local runtimes (read-only). |
cua runtime setup | Provision local runtimes. |
cua cache | Disk used by images, sandboxes, builds and logs, and its cleanup. |
cua cache ls | List what the SDK keeps on disk, one row per image, sandbox, build output, install archive or log. |
cua cache du | Disk usage per category, the cache budget and free space. |
cua cache prune | Reap orphaned ephemeral sandboxes, remove orphans (abandoned downloads, unused layers) and evict least-recently-used cache down to the budget. |
cua cache config | Show or set the cache settings ($CUA_HOME/cache.json; the CUA_CACHE_BUDGET, CUA_DISK_MIN_FREE, CUA_DISK_WARN_FREE and CUA_ORPHAN_REAP_MINUTES environment variables win). |
cua viewer | Serve the HTML5 viewer for every sandbox on one loopback port. |
Every command also accepts the global options.
cua sandbox#
Sandboxes: local or an existing computer (direct).
cua sandbox [OPTIONS] <COMMAND>Alias: cua sb.
cua sandbox create#
Create a sandbox: cua sb create IMAGE [--on local|direct:<addr>] [--kind auto|container|vm|microvm] [--runtime auto|gvisor|runc|qemu|lume|firecracker|vz|containerization].
cua sandbox create [OPTIONS] [IMAGE] [-- <COMMAND>...]| Argument | Type | Default | Description |
|---|---|---|---|
<IMAGE> | string | optional | Image: a registry reference (ghcr.io/org/image:tag), an alias (linux, ubuntu, windows, macos[:tahoe|sequoia], omarchy). |
<COMMAND>... | string | optional | The sandbox's command, after -- (replaces the image's entrypoint): cua sb create python:3.12-slim --service mcp=8765 -- python -m srv. Repeatable. |
| Flag | Type | Default | Env var | Description |
|---|---|---|---|---|
--on | string | Where it runs: local, direct:<addr> (an existing computer running cua-spacesd), or a registered provider. Default: cua config get default.on (CUA_DEFAULT_ON), else local. | ||
--kind | string | What kind of computer: auto (from the image: a container when it has a container rootfs; macOS, Windows and disk-only images are VMs), container, vm, or microvm (the container image booted with its own kernel: Firecracker on Linux with KVM, Apple's Containerization on a Mac with macOS 26). | ||
--runtime | string | Which engine: auto (the safest available) or one the location offers for the kind. Local: gvisor or runc (containers), qemu or lume (VMs), firecracker, vz or containerization (microVMs). A local sandbox with --sidecar needs --runtime runc where gVisor would run (separate gVisor containers cannot share a network namespace). | ||
--tier | string | Image tier for an alias: slim, full (default), Linux docker (a VM with dockerd up at boot) or macOS xcode. | ||
--name | string | Sandbox name (generated when omitted). | ||
--open | string | With --browser: open this URL. | ||
--install | string | Install these into the sandbox once it is up: harness ids (claude-code) or installables (blender, vscode, node), pinned and checksum-verified (cua agent ensure later does the same). Repeatable. | ||
--cpu | integer | vCPUs. Alias: --cpus. | ||
--memory | string | Memory, e.g. 8GB or 4096MB (a bare number is GB). | ||
--network | default | none | Guest network: default (outbound network, like a Docker container) or none (no egress; published ports still work). none needs a local QEMU VM; containers and Lume reject it. | ||
--disk | string | Disk size (accepted; the image decides today). | ||
--port | string | Expose a guest port: NAME=PORT (a named service) or PORT (repeatable). Alias: --service. | ||
--wait | string | Wait until ready: tcp:SERVICE, http:SERVICE/path, a guest port (tcp:PORT, http:PORT/path), or desktop (the desktop session takes input: display, window manager and cua-driver) (repeatable). Alias: --wait-for. | ||
--ready-timeout | integer | Readiness budget in seconds, counted once the image is downloaded, the wait for the image's cua-spacesd included (default 600, plus up to 120 for cua-spacesd). | ||
--overlay | string | Inject a freshly built binary once the sandbox is up: NAME=PATH (cua-driver, cua-spacesd) or NAME=PATH:GUEST_PATH (repeatable). It replaces the guest file atomically, is recorded with its sha256 (checked by cua doctor) and what runs it is restarted. Needs cua-spacesd in the image. | ||
--env | string | Environment KEY=VALUE for the sandbox (repeatable). | ||
--sidecar | string | A sidecar container, reachable from the sandbox at its name (it reaches the sandbox at main): IMAGE[,port=PORT][,env=K=V][,name=NAME] (repeatable; port= and env= repeat too). Local containers; it needs --runtime runc where gVisor would run. With sidecars the service names main, sidecars and sc are reserved. | ||
--registry-secret | string | Credentials for a private image: env:USER_VAR:PASSWORD_VAR (read from this environment) or aws-ecr[:REGION] (the AWS CLI's login token). | ||
--pool | string | Create from this pool (cua sb pool create): the sandbox gets the pool's image and size and takes one of its ready ones in about 0.1 s. | ||
--ttl | integer | How long the platform keeps the sandbox once nothing keeps it alive (1h, 900): a provider sandbox's lifetime (--on e2b). Default: the platform's. | ||
--token | string | CUA_ENV_TOKEN | spacesd token (direct: sandboxes). | |
--gpu | string | A GPU: the runtime's own (--gpu), or an option cua spaces gpus lists (paravirtual: GPU acceleration for a macOS VM on Lume, experimental; virgl: QEMU on Linux; nvidia: a runc container on Linux; a provider's GPU type). | ||
--profile | string | A size profile, defaults for what you leave unset: rollout (1 vCPU, 1 GiB, no desktop; a local VM gets no display hardware, so many more fit on one machine) for RL rollouts and agent episodes that mostly wait, or default (2 vCPUs, 4 GiB). | ||
--browser | boolean | false | Start Chromium in it for the cua-driver browser tools (IMAGE defaults to linux). | |
--view | boolean | false | Open the desktop in the HTML5 viewer once the sandbox is ready (cua sb view). | |
--keep-on-failure | boolean | false | Keep the sandbox (VM or container) when it fails to become ready, to debug it; the ref and how to delete it are printed. Default: a failed create deletes it. | |
--headless | boolean | false | No desktop: only cua-spacesd runs (exec, files, processes, MCP), with no display, window manager or audio. Starts several times faster and fits many more per machine; for shell, CI and RL workloads. | |
--no-spacesd | boolean | false | Run the image as it is. By default a container or microVM of an image without cua-spacesd (alpine, node) gets a static one put in, so exec, files and ports work; with this flag it keeps none. | |
--forkable | boolean | false | A fork source (a "bake" sandbox): a local QEMU VM's guest RAM is a shared file, so cua sb checkpoint takes milliseconds and forks of its checkpoints share its pages. Other kinds ignore it. |
Examples
# A Linux desktop on this computer (a gVisor container)
cua sb create linux --name dev
# A web server container, ready when its HTTP service answers
cua sb create python:3.12-slim --service web=8000 --wait http:web/ -- python -m http.server 8000
# The same Linux image as a VM
cua sb create linux --kind vm --name devcua sandbox launch#
Deprecated alias of create.
cua sandbox launch [OPTIONS] [IMAGE]Examples
cua sb launch linux --name devcua sandbox connect#
Reattach to a sandbox (NAME or a ref such as local:NAME) and print it.
cua sandbox connect [OPTIONS] <NAME>| Argument | Type | Default | Description |
|---|---|---|---|
<NAME> | string | required | Sandbox name or ref (local:NAME). |
| Flag | Type | Default | Description |
|---|---|---|---|
--local | boolean | false | Look NAME up among local sandboxes only (same as local:NAME). |
Examples
cua sb connect dev
cua sb connect local:devcua sandbox ls#
List sandboxes: local and direct, each with its location; --local filters.
cua sandbox ls [OPTIONS]Alias: cua sandbox list.
| Flag | Type | Default | Description |
|---|---|---|---|
--local | boolean | false | Only local sandboxes. |
--no-size | boolean | false | Skip the SIZE column (disk used by each local sandbox), which reads the VM, container and Lume stores. |
Examples
cua sb ls
cua sb ls --local --jsoncua sandbox info#
Show one sandbox.
cua sandbox info [OPTIONS] <NAME>Alias: cua sandbox get.
| Argument | Type | Default | Description |
|---|---|---|---|
<NAME> | string | required | Sandbox name or ref (local:NAME). |
| Flag | Type | Default | Description |
|---|---|---|---|
--local | boolean | false | Look NAME up among local sandboxes only (same as local:NAME). |
--connection | boolean | false | Also print how to call the sandbox's cua-spacesd from your own code: its gRPC URL and bearer token (authorization: Bearer <token>). The token is a secret: anyone with it controls the sandbox. |
Examples
cua sb info dev
cua sb info local:dev --json
# The gRPC URL and token of its cua-spacesd, for your own client
cua sb info dev --connection --jsoncua sandbox suspend#
Suspend (pause/snapshot).
cua sandbox suspend [OPTIONS] <NAME>| Argument | Type | Default | Description |
|---|---|---|---|
<NAME> | string | required | Sandbox name or ref (local:NAME). |
| Flag | Type | Default | Description |
|---|---|---|---|
--local | boolean | false | Look NAME up among local sandboxes only (same as local:NAME). |
Examples
cua sb suspend devcua sandbox resume#
Resume.
cua sandbox resume [OPTIONS] <NAME>| Argument | Type | Default | Description |
|---|---|---|---|
<NAME> | string | required | Sandbox name or ref (local:NAME). |
| Flag | Type | Default | Description |
|---|---|---|---|
--local | boolean | false | Look NAME up among local sandboxes only (same as local:NAME). |
Examples
cua sb resume devcua sandbox restart#
Restart.
cua sandbox restart [OPTIONS] <NAME>| Argument | Type | Default | Description |
|---|---|---|---|
<NAME> | string | required | Sandbox name or ref (local:NAME). |
| Flag | Type | Default | Description |
|---|---|---|---|
--local | boolean | false | Look NAME up among local sandboxes only (same as local:NAME). |
Examples
cua sb restart devcua sandbox checkpoint#
Save a local sandbox's state as a named checkpoint: its memory and disk on every kind (a gVisor container, a QEMU or Lume VM, a microVM; it keeps running), the filesystem where an engine cannot save memory. cua sb fork starts new sandboxes from it; forks of a QEMU checkpoint share its RAM copy-on-write (and a --forkable VM's checkpoints take milliseconds).
cua sandbox checkpoint [OPTIONS] <NAME> <CHECKPOINT>| Argument | Type | Default | Description |
|---|---|---|---|
<NAME> | string | required | Sandbox name or ref (local:NAME), or a Space another machine of yours provides (its name or id): that machine takes the checkpoint and keeps it. |
<CHECKPOINT> | string | required | The checkpoint's name. |
| Flag | Type | Default | Description |
|---|---|---|---|
--pin | boolean | false | Pin it: cua sb checkpoints rm and prune leave it until cua sb checkpoints unpin. |
--local | boolean | false | Look NAME up among local sandboxes only (same as local:NAME). |
--json | boolean | false | Machine-readable output. |
Examples
cua sb checkpoint dev before-upgrade
cua sb fork before-upgrade dev-2
# A world to fork many times: kept until unpinned
cua sb create linux --kind vm --forkable --name bake
cua sb checkpoint bake world --pin
cua sb fork world agent-1
# A Space another machine of yours provides is checkpointed there
cua spaces create linux --kind vm --on host:kvm-a --name src
cua sb checkpoint src world
cua spaces create checkpoint:world --name agent-2cua sandbox fork#
Start a new sandbox from a local sandbox (running or stopped) or a checkpoint. A fork restores the saved memory where there is one (in about a second or less) and is a new machine: its own token, keys, machine id and random state.
cua sandbox fork [OPTIONS] <SOURCE> <NAME>| Argument | Type | Default | Description |
|---|---|---|---|
<SOURCE> | string | required | A sandbox name or ref, or a checkpoint name (a sandbox wins). |
<NAME> | string | required | The new sandbox's name. |
| Flag | Type | Default | Description |
|---|---|---|---|
--json | boolean | false | Machine-readable output. |
Examples
cua sb fork dev dev-copy
cua sb fork before-upgrade dev-2cua sandbox fork-many#
Fork a checkpoint many times at once, on this machine or across your machines, printing each fork as soon as it is ready (or failed). A group's forks (--group-size) go to one machine, so they share the checkpoint's memory there; groups spread over the least-loaded machines, the checkpoint is copied (and verified) to a machine that lacks it, and forks of a machine that fails are placed again.
cua sandbox fork-many [OPTIONS] [SOURCE]| Argument | Type | Default | Description |
|---|---|---|---|
<SOURCE> | string | optional | The checkpoint (or local sandbox) to fork. |
| Flag | Type | Default | Description |
|---|---|---|---|
--count | integer | 1 | How many forks of SOURCE. |
--group-size | integer | 0 | Forks per group (0: all in one group). |
--group | string | A group CHECKPOINT=COUNT (repeatable), instead of SOURCE. | |
--on | string | Where: local (default), auto (your machines that provide Spaces, this one included), or host:<machine>. | |
--parallel | integer | 0 | Forks started at once per machine (0: 4). |
--prefix | string | Names are <prefix>-<n>. | |
--fallback-dir | string | A folder every machine mounts (your Cua Volume) to fetch checkpoints from when their machine is away. | |
--fallback-s3 | string | An S3 bucket[/prefix] to fetch checkpoints from when their machine is away (each machine's AWS credentials). | |
--fallback-region | string | The fallback bucket's region. | |
--cpus | integer | 0 | vCPUs each fork is counted as when placing (default: 1; forks of one world are mostly idle). |
--memory-mb | integer | 0 | Memory (MiB) each fork is counted as when placing (default: the checkpoint's). |
--no-retry | boolean | false | Report forks of a failed machine instead of placing them again. |
--json | boolean | false | One JSON object per event. |
Examples
cua sb fork-many world --count 8
# 64 rollouts, 8 per machine group, across your machines
cua sb fork-many world --count 64 --group-size 8 --on auto
# Several checkpoints at once
cua sb fork-many --group world-a=8 --group world-b=8 --on auto
# Fetch from S3 when the machine that holds the checkpoint is away
cua sb fork-many world --count 16 --on auto --fallback-s3 my-bucket/cua-snapshotscua sandbox publish#
Upload a checkpoint to a fallback (a folder every machine mounts, or S3), so your other machines copy it from there when this one is away. Files already there are not uploaded again.
cua sandbox publish [OPTIONS] <NAME>| Argument | Type | Default | Description |
|---|---|---|---|
<NAME> | string | required | The checkpoint. |
| Flag | Type | Default | Description |
|---|---|---|---|
--dir | string | A folder every machine mounts. | |
--s3 | string | An S3 bucket[/prefix]. | |
--region | string | The bucket's region. |
Examples
cua sb publish world --dir "~/Cua Volume/snapshots"
cua sb publish world --s3 my-bucket/cua-snapshots --region us-west-2cua sandbox bake#
Bake a Docker Compose project into a checkpoint: a local VM of the docker tier (dockerd up at boot), the project uploaded, docker compose up --wait, health checks, then a live memory checkpoint. Forks of it (cua sb fork) start with the containers already running. The bake Space is deleted afterwards (--keep keeps it).
cua sandbox bake [OPTIONS] --checkpoint <CHECKPOINT> <PROJECT>| Argument | Type | Default | Description |
|---|---|---|---|
<PROJECT> | path | required | The Docker Compose project directory (holds compose.yaml or docker-compose.yml, and whatever it builds or mounts). |
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--checkpoint | string | required | The checkpoint to save (cua sb fork CHECKPOINT NAME starts from it). | |
--image | string | The image: an alias, a reference or a local disk path. Default: the docker tier, linux --tier docker (a Linux image with Docker). | ||
--tier | string | Tier for an alias IMAGE (docker for a Docker-ready Linux VM). | ||
--name | string | The bake Space's name (default bake-<checkpoint>). | ||
--cpu | integer | vCPUs of the bake Space (forks get the same). Alias: --cpus. | ||
--memory | string | Memory of the bake Space, e.g. 4GB (forks get the same). | ||
--file | -f | string | Compose files, relative to the project (repeatable; default: compose's own lookup, compose.yaml / docker-compose.yml). | |
--project-name | string | Compose project name (default: the directory name). | ||
--dest | string | Where the project lands in the guest (default /opt/cua-bake/<project>). | ||
--load | path | docker save tarballs to docker load before compose up, for images the guest cannot pull (repeatable). | ||
--health | string | A guest shell command, run as root in the project directory, that must exit 0 before the checkpoint (retried until --health-timeout; repeatable). compose up --wait already waits for healthchecks. | ||
--health-timeout | integer | 600 | Budget for compose up --wait and each --health command, seconds. | |
--run | string | A guest shell command, run as root in the project directory after the stack is healthy and before the checkpoint (repeatable): state forks should start with, e.g. iptables rules or a warmed cache. | ||
--verify-fork | boolean | false | Fork the checkpoint once, check the stack is live in the fork (every service running or healthy, none restarted, the --health commands pass), then delete the fork. | |
--keep | boolean | false | Keep the bake Space after the checkpoint (default: delete it). | |
--json | boolean | false | Machine-readable output. |
Examples
# Bake ./world (compose.yaml: agent, MCP and grader services)
cua sb bake ./world --checkpoint world-v1
# Check a fork comes up live, with an extra health probe
cua sb bake ./world --checkpoint world-v1 --health 'curl -fsS http://127.0.0.1:8000/' --verify-fork
# Then start rollouts from it
cua sb fork world-v1 rollout-1cua sandbox pool#
Pools: sandboxes of one kind kept ready on this machine, so that cua sb create --pool NAME takes one in about 0.1 s. Without pools, the daemon keeps sandboxes ready only where repeated creates pay for it (cua daemon status says why).
cua sandbox pool [OPTIONS] <COMMAND>Examples
# Always 2 Linux desktops ready, up to 8 while creates come fast
cua sb pool create linux --name agents --min 2 --max 8
cua sb create --pool agents --name a1
cua sb pool ls
cua sb pool rm agentscua sandbox pool create#
Create a pool, or update the pool of that name.
cua sandbox pool create [OPTIONS] <IMAGE>| Argument | Type | Default | Description |
|---|---|---|---|
<IMAGE> | string | required | The image its sandboxes run. |
| Flag | Type | Default | Description |
|---|---|---|---|
--name | string | The pool's name (lower-case letters, digits, '-'; default: a new one). The name of an existing pool updates it. | |
--min | integer | 1 | Sandboxes kept ready at all times (one starts again as soon as one is created from the pool). |
--max | integer | Most kept ready, not counting those created from the pool (default: --min); above --min only while creates come faster than sandboxes start. | |
--idle | integer | After this long without a create from the pool it keeps none ready, until the next create (30m, 2h; default: never). | |
--on | string | Where its sandboxes run (only local has pools today). | |
--kind | string | What kind of machine (auto, container, vm, microvm). | |
--runtime | string | Which engine (auto, gvisor, runc, ...). | |
--cpu | integer | vCPUs of each sandbox. Alias: --cpus. | |
--memory | string | Memory of each sandbox (4GB, 4096MB). | |
--env | string | Guest environment (repeat). Repeatable. | |
--json | boolean | false | Machine-readable output. |
Examples
cua sb pool create linux --name agents --min 2 --max 8
cua sb pool create linux --name big --cpu 4 --memory 8GB --idle 30mcua sandbox pool ls#
List the pools, with what each holds now.
cua sandbox pool ls [OPTIONS]Alias: cua sandbox pool list.
| Flag | Type | Default | Description |
|---|---|---|---|
--json | boolean | false | Machine-readable output. |
Examples
cua sb pool ls
cua sb pool ls --jsoncua sandbox pool rm#
Delete a pool (its ready sandboxes go; those created from it stay).
cua sandbox pool rm [OPTIONS] <NAME>Alias: cua sandbox pool delete.
| Argument | Type | Default | Description |
|---|---|---|---|
<NAME> | string | required | The pool's name. |
Examples
cua sb pool rm agentscua sandbox checkpoints#
List checkpoints; delete, pin or unpin one; or prune every unpinned one (checkpoints rm|pin|unpin NAME, checkpoints prune).
cua sandbox checkpoints [OPTIONS] [COMMAND]| Flag | Type | Default | Description |
|---|---|---|---|
--json | boolean | false | Machine-readable output. |
Examples
cua sb checkpoints
cua sb checkpoints rm before-upgrade
cua sb checkpoints pin world
cua sb checkpoints prunecua sandbox checkpoints rm#
Delete a checkpoint, here and on every machine of yours that holds a copy (forks made from it keep running).
cua sandbox checkpoints rm [OPTIONS] <NAME>| Argument | Type | Default | Description |
|---|---|---|---|
<NAME> | string | required | The checkpoint's name. |
Examples
cua sb checkpoints rm before-upgradecua sandbox checkpoints pin#
Pin a checkpoint: a fork source to keep (rm and prune leave it until it is unpinned).
cua sandbox checkpoints pin [OPTIONS] <NAME>| Argument | Type | Default | Description |
|---|---|---|---|
<NAME> | string | required | The checkpoint's name. |
Examples
cua sb checkpoints pin worldcua sandbox checkpoints unpin#
Unpin a checkpoint (rm and prune delete it again).
cua sandbox checkpoints unpin [OPTIONS] <NAME>| Argument | Type | Default | Description |
|---|---|---|---|
<NAME> | string | required | The checkpoint's name. |
Examples
cua sb checkpoints unpin worldcua sandbox checkpoints prune#
Delete every checkpoint that is not pinned (forks made from them keep running).
cua sandbox checkpoints prune [OPTIONS]Examples
cua sb checkpoints prunecua sandbox rm#
Delete a sandbox.
cua sandbox rm [OPTIONS] <NAME>Alias: cua sandbox delete.
| Argument | Type | Default | Description |
|---|---|---|---|
<NAME> | string | required | Sandbox name or ref (local:NAME). |
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--force | -f | boolean | false | Skip the confirmation prompt. Required when there is no terminal to ask on (scripts, agents): without it nothing is deleted. |
--local | boolean | false | Look NAME up among local sandboxes only (same as local:NAME). |
Examples
cua sb rm dev
# Without the prompt (required in scripts and agents)
cua sb rm local:dev --forcecua sandbox exec#
Run a command (joined into one shell line, as sh -c). Exits with the command's own status, or 124 when it ran out of time. A local Lume sandbox without cua-spacesd runs it via SSH (lume ssh).
cua sandbox exec [OPTIONS] <NAME> <COMMAND>...| Argument | Type | Default | Description |
|---|---|---|---|
<NAME> | string | required | Sandbox name or ref (local:NAME). |
<COMMAND>... | string | required | Command and arguments. Repeatable. |
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--user | string | Run as this guest user. | ||
--cwd | string | Start in this guest directory. | ||
--timeout | integer | Stop the command after this many seconds (0: no limit). | ||
--stdin | -i | boolean | false | Stream: run the command as argv (no shell), forward this command's stdin, write stdout and stderr as they arrive, set no time limit, pass SIGINT/SIGTERM/SIGHUP on, and kill the command when this process ends. Exits with the command's status (128 + n for signal n). |
--local | boolean | false | Look NAME up among local sandboxes only (same as local:NAME). |
Examples
cua sb exec dev uname -a
cua sb exec dev 'ls /tmp | wc -l'
# A long job: no time limit
cua sb exec dev --timeout 0 ./crawl.sh
# A long-lived stdio stream, like `docker exec -i`: argv, not a shell line
cua sb exec -i dev -- bash -c 'wc -c'cua sandbox run#
Run a command in new Spaces, --count times (each in its own Space, deleted afterwards): on this machine, or with --on auto on the least-loaded of your machines. A run of your machines keeps going when this one sleeps.
cua sandbox run [OPTIONS] <COMMAND>...| Argument | Type | Default | Description |
|---|---|---|---|
<COMMAND>... | string | required | The command (after --). Repeatable. |
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--on | string | Where: omitted or local (this machine), auto (the least-loaded of your machines that provide Spaces), or one machine by name. | ||
--count | integer | 1 | How many times to run it, each in its own new Space. | |
--image | string | Image of each Space (default: the canonical Linux image). | ||
--kind | string | container, vm or microvm (default: what the image is). | ||
--runtime | string | A runtime (gvisor, runc, firecracker, ...). | ||
--cpus | number | 1 | CPUs reserved for each. | |
--memory | integer | 1024 | Memory reserved for each, in MiB. | |
--timeout | string | 10m | How long each may run. | |
--env | -e | string | KEY=VALUE for the command's environment. Repeatable. | |
--result | string | A file each run leaves behind, returned with its result. | ||
--concurrency | integer | 0 | Most at once (default: as many as the machines take). | |
--max-attempts | integer | 0 | Times a job may be lost (its machine went away) and run again. | |
--os | string | Only machines of this OS (linux, macos). | ||
--arch | string | Only machines of this CPU architecture (x86_64, arm64). | ||
--id | string | The run's id (default: a new one). Submitting the same id again adds nothing twice. | ||
--detach | boolean | false | Submit and print the run's id without waiting. |
Examples
cua sb run -- uname -a
# 200 headless browser sessions on all your machines
cua sb run --on auto --count 200 -- sh -c 'chromium --headless --no-sandbox --dump-dom https://example.com | wc -c'
# On one machine, and come back later
cua sb run --on mac-mini --count 50 --detach -- ./job.shcua sandbox runs#
Runs so far, one run's jobs, or one job with its output.
cua sandbox runs [OPTIONS] [RUN]| Argument | Type | Default | Description |
|---|---|---|---|
<RUN> | string | optional | A run: its jobs. |
| Flag | Type | Default | Description |
|---|---|---|---|
--job | integer | One job of the run, with its output. | |
--state | string | Only jobs in this state (failed, error, running, ...). | |
--on | string | Runs of this machine only (local) or of all your machines (auto, the default). | |
--cancel | boolean | false | Cancel the run (or the job with --job). |
--output | boolean | false | With a run and --json: each job's output too. |
Examples
cua sb runs
cua sb runs p-1a2b3c4d --state failed
cua sb runs p-1a2b3c4d --job 42
cua sb runs p-1a2b3c4d --cancelcua sandbox shell#
Interactive shell (PTY), or run a command in a PTY.
cua sandbox shell [OPTIONS] <NAME> [COMMAND]...| Argument | Type | Default | Description |
|---|---|---|---|
<NAME> | string | required | Sandbox name or ref (local:NAME). |
<COMMAND>... | string | optional | Command to run instead of the login shell. Repeatable. |
| Flag | Type | Default | Description |
|---|---|---|---|
--cols | integer | Terminal width (default: this terminal's). | |
--rows | integer | Terminal height (default: this terminal's). | |
--local | boolean | false | Look NAME up among local sandboxes only (same as local:NAME). |
Examples
cua sb shell dev
cua sb shell dev topcua sandbox cp#
Copy files: cp NAME:/guest/path LOCAL or cp LOCAL NAME:/guest/path (NAME may be a ref: cp local:box:/tmp/x .).
cua sandbox cp [OPTIONS] <SRC> <DST>| Argument | Type | Default | Description |
|---|---|---|---|
<SRC> | string | required | Source: a local path or NAME:/guest/path. |
<DST> | string | required | Destination: a local path or NAME:/guest/path. |
| Flag | Type | Default | Description |
|---|---|---|---|
--local | boolean | false | Look NAME up among local sandboxes only (same as local:NAME). |
Examples
# Upload
cua sb cp ./notes.txt dev:/tmp/notes.txt
# Download
cua sb cp dev:/tmp/notes.txt .cua sandbox overlay#
Inject freshly built binaries into a running sandbox (see create --overlay): NAME=PATH or NAME=PATH:GUEST_PATH.
cua sandbox overlay [OPTIONS] <NAME> <OVERLAYS>...| Argument | Type | Default | Description |
|---|---|---|---|
<NAME> | string | required | Sandbox name or ref (local:NAME). |
<OVERLAYS>... | string | required | NAME=PATH[:GUEST_PATH] (repeatable). Repeatable. |
| Flag | Type | Default | Description |
|---|---|---|---|
--timeout | integer | 180 | Budget for a cua-spacesd restart, in seconds. |
--local | boolean | false | Look NAME up among local sandboxes only (same as local:NAME). |
Examples
# The cua-driver under test, then check that it is what runs
cua sb overlay dev cua-driver=./target/release/cua-driver
cua doctor dev --expect cua-driver=sha256:<sha256>
# The daemon too (restarts it and waits for the new build)
cua sb overlay dev cua-spacesd=./target/release/cua-spacesdcua sandbox logs#
Show logs: the backend console (QEMU serial, container) when there is one, else the guest system log through the spacesd.
cua sandbox logs [OPTIONS] <NAME>| Argument | Type | Default | Description |
|---|---|---|---|
<NAME> | string | required | Sandbox name or ref (local:NAME). |
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--tail | -n | integer | 200 | Lines from the end. |
--source | string | auto | auto, console or guest. | |
--local | boolean | false | Look NAME up among local sandboxes only (same as local:NAME). |
Examples
cua sb logs dev
cua sb logs dev -n 50 --source guestcua sandbox port-forward#
Forward a guest port: port-forward NAME PORT[:LOCAL] (a local sandbox's port not published at create tunnels through cua-spacesd when the image has it).
cua sandbox port-forward [OPTIONS] <NAME> <SPEC>Alias: cua sandbox forward.
| Argument | Type | Default | Description |
|---|---|---|---|
<NAME> | string | required | Sandbox name or ref (local:NAME). |
<SPEC> | string | required | PORT or PORT:LOCAL_PORT. |
| Flag | Type | Default | Description |
|---|---|---|---|
--local | boolean | false | Look NAME up among local sandboxes only (same as local:NAME). |
--no-wait | boolean | false | Print the target and exit instead of forwarding until Ctrl-C. |
Examples
# Guest port 8080 on localhost:8080 until Ctrl-C
cua sb port-forward dev 8080
# Guest port 5432 on localhost:15432
cua sb port-forward local:dev 5432:15432cua sandbox url#
Print a URL for a named service: usable from this computer (default), or --public for a shareable URL that expires (--ttl, default 1h; a token URL served by the cua daemon).
cua sandbox url [OPTIONS] <NAME> <SERVICE>| Argument | Type | Default | Description |
|---|---|---|---|
<NAME> | string | required | Sandbox name or ref (local:NAME). |
<SERVICE> | string | required | Service name (from --service at create time). |
| Flag | Type | Default | Description |
|---|---|---|---|
--ttl | integer | Lifetime of a --public URL (10m, 1h, 3600; 60 s to 24 h). | |
--local | boolean | false | Look NAME up among local sandboxes only (same as local:NAME). |
--public | boolean | false | A shareable URL that expires. |
Examples
cua sb url dev web
# A shareable URL for 10 minutes
cua sb url local:dev web --public --ttl 10mcua sandbox screenshot#
Save a screenshot (PNG). A local Lume sandbox without cua-spacesd is captured via VNC.
cua sandbox screenshot [OPTIONS] <NAME>| Argument | Type | Default | Description |
|---|---|---|---|
<NAME> | string | required | Sandbox name or ref (local:NAME). |
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--output | -o | path | screenshot.png | Output file (PNG). |
--local | boolean | false | Look NAME up among local sandboxes only (same as local:NAME). |
Examples
cua sb screenshot dev -o desktop.pngcua sandbox mcp#
Talk to an MCP server a sandbox serves: mcp NAME SERVICE tools, mcp NAME SERVICE call TOOL '{"a":1}'. Generic streamable HTTP over the service; no cua-spacesd needed.
cua sandbox mcp [OPTIONS] <NAME> <SERVICE> <COMMAND>| Argument | Type | Default | Description |
|---|---|---|---|
<NAME> | string | required | Sandbox name or ref (local:NAME). |
<SERVICE> | string | required | Service name (for example mcp, or port-8765). |
| Flag | Type | Default | Description |
|---|---|---|---|
--path | string | /mcp | Endpoint path on the service. |
--local | boolean | false | Look NAME up among local sandboxes only (same as local:NAME). |
Examples
cua sb mcp dev mcp tools
cua sb mcp dev mcp call echo '{"text":"hi"}'cua sandbox mcp config#
The endpoint URL and headers, for any MCP client. Credential headers print masked (Bearer ****) unless --show-secrets.
cua sandbox mcp <NAME> <SERVICE> config [OPTIONS]| Flag | Type | Default | Description |
|---|---|---|---|
--show-secrets | boolean | false | Print credential header values in full. |
Examples
cua sb mcp dev mcp configcua sandbox mcp info#
Server name, version and negotiated protocol revision.
cua sandbox mcp <NAME> <SERVICE> info [OPTIONS]Examples
cua sb mcp dev mcp infocua sandbox mcp tools#
List tools.
cua sandbox mcp <NAME> <SERVICE> tools [OPTIONS]Examples
cua sb mcp dev mcp toolscua sandbox mcp call#
Call a tool with a JSON object of arguments.
cua sandbox mcp <NAME> <SERVICE> call [OPTIONS] <TOOL> [ARGUMENTS]| Argument | Type | Default | Description |
|---|---|---|---|
<TOOL> | string | required | Tool name. |
<ARGUMENTS> | string | optional | Arguments (JSON object). Default {}. |
| Flag | Type | Default | Description |
|---|---|---|---|
--out | path | Save image, audio and blob content here instead of summarizing. |
Examples
cua sb mcp dev mcp call echo '{"text":"hi"}'
cua sb mcp dev mcp call screenshot --out ./shotscua sandbox mcp resources#
List resources.
cua sandbox mcp <NAME> <SERVICE> resources [OPTIONS]Examples
cua sb mcp dev mcp resourcescua sandbox mcp templates#
List resource templates.
cua sandbox mcp <NAME> <SERVICE> templates [OPTIONS]Examples
cua sb mcp dev mcp templatescua sandbox mcp read#
Read a resource.
cua sandbox mcp <NAME> <SERVICE> read [OPTIONS] <URI>| Argument | Type | Default | Description |
|---|---|---|---|
<URI> | string | required | Resource URI. |
| Flag | Type | Default | Description |
|---|---|---|---|
--out | path | Save blob contents here instead of summarizing. |
Examples
cua sb mcp dev mcp read file:///tmp/report.txtcua sandbox mcp prompts#
List prompts.
cua sandbox mcp <NAME> <SERVICE> prompts [OPTIONS]Examples
cua sb mcp dev mcp promptscua sandbox mcp prompt#
Render a prompt with a JSON object of string arguments.
cua sandbox mcp <NAME> <SERVICE> prompt [OPTIONS] <NAME> [ARGUMENTS]| Argument | Type | Default | Description |
|---|---|---|---|
<NAME> | string | required | Prompt name. |
<ARGUMENTS> | string | optional | Arguments (JSON object of strings). Default {}. |
Examples
cua sb mcp dev mcp prompt summarize '{"topic":"logs"}'cua sandbox mcp request#
Any other method (for example skills/list), printing the result.
cua sandbox mcp <NAME> <SERVICE> request [OPTIONS] <METHOD> [PARAMS]| Argument | Type | Default | Description |
|---|---|---|---|
<METHOD> | string | required | JSON-RPC method. |
<PARAMS> | string | optional | Params (JSON object). |
Examples
cua sb mcp dev mcp request skills/listcua sandbox view#
Open the sandbox desktop in the browser (the cua-spacesd HTML5 viewer). A local Lume sandbox without cua-spacesd opens its VNC display with lume attach.
cua sandbox view [OPTIONS] <NAME>| Argument | Type | Default | Description |
|---|---|---|---|
<NAME> | string | required | Sandbox name or ref (local:NAME). |
| Flag | Type | Default | Description |
|---|---|---|---|
--service | string | Open this web service of the sandbox instead of the viewer (for images without cua-spacesd that serve their own display page). | |
--files | string | Guest folder for uploads and folder sharing (default ~; none turns files off). | |
--ttl | string | Link lifetime (for example 1h, 30m). Default 1h. | |
--view-only | boolean | false | Watch only: no input, clipboard, files or microphone. |
--no-open | boolean | false | Print the link without opening a browser. |
--local | boolean | false | Look NAME up among local sandboxes only (same as local:NAME). |
Examples
cua sb view dev
# Watch only, print the link instead of opening it
cua sb view dev --view-only --no-open
# An image that ships its own web display instead of cua-spacesd
cua sb view old-box --service webcua runtime#
Local runtimes (cua-vmm).
cua runtime [OPTIONS] <COMMAND>cua runtime doctor#
Inspect local runtimes (read-only). Exit 1 if any check is Error; warnings exit 0.
cua runtime doctor [OPTIONS]Examples
cua runtime doctorcua runtime setup#
Provision local runtimes. Exit 1 if any step is Error; warnings exit 0.
cua runtime setup [OPTIONS] [COMPONENTS]...| Argument | Type | Default | Description |
|---|---|---|---|
<COMPONENTS>... | string | optional | Components: qemu, lume, runsc (default: everything provisionable). Repeatable. |
| Flag | Type | Default | Description |
|---|---|---|---|
--dry-run | boolean | false | Only report what would be done. |
Examples
# See what would be installed
cua runtime setup --dry-run
cua runtime setup qemucua cache#
Disk used by images, sandboxes, builds and logs, and its cleanup.
cua cache [OPTIONS] <COMMAND>cua cache ls#
List what the SDK keeps on disk, one row per image, sandbox, build output, install archive or log.
cua cache ls [OPTIONS]Alias: cua cache list.
| Flag | Type | Default | Description |
|---|---|---|---|
--category | string | Only this category (images, docker-images, lume-bases, builds, installables, icons, sandboxes, checkpoints, logs, data, legacy). |
Examples
cua cache ls
# Only cached images
cua cache ls --category imagescua cache du#
Disk usage per category, the cache budget and free space.
cua cache du [OPTIONS]Examples
cua cache du
cua cache du --jsoncua cache prune#
Reap orphaned ephemeral sandboxes, remove orphans (abandoned downloads, unused layers) and evict least-recently-used cache down to the budget. Never removes a sandbox or anything one uses.
cua cache prune [OPTIONS]| Flag | Type | Default | Description |
|---|---|---|---|
--budget | string | Budget for this run (auto, off or a size such as 20G). | |
--all | boolean | false | Evict every unused cache entry, not only down to the budget. |
--dry-run | boolean | false | Show what would be removed; remove nothing. |
Examples
# See what a cleanup would remove
cua cache prune --dry-run
# Evict every unused cache entry
cua cache prune --allcua cache config#
Show or set the cache settings ($CUA_HOME/cache.json; the CUA_CACHE_BUDGET, CUA_DISK_MIN_FREE, CUA_DISK_WARN_FREE and CUA_ORPHAN_REAP_MINUTES environment variables win).
cua cache config [OPTIONS]| Flag | Type | Default | Description |
|---|---|---|---|
--budget | string | Cache budget: auto (min of 30 GiB and 10% of free space plus cache), off, or a size. | |
--min-free | string | Free space pulls, builds and VM creates always leave (size). | |
--warn-free | string | Warn when free space drops under this (size). | |
--orphan-reap-minutes | integer | Minutes before an ephemeral sandbox whose process died is reaped. | |
--auto-gc | true | false | Clean up automatically after pulls and builds and on daemon idle. |
Examples
# Show the settings
cua cache config
# Cap the cache at 20 GB and keep 10 GB free
cua cache config --budget 20G --min-free 10Gcua viewer#
Serve the HTML5 viewer for every sandbox on one loopback port.
cua viewer [OPTIONS]| Flag | Type | Default | Description |
|---|---|---|---|
--listen | string | 127.0.0.1:0 | Address to listen on (loopback only). |
--no-open | boolean | false | Print the URL without opening a browser. |
Examples
# List your sandboxes in the browser and open any of them
cua viewer
# Fixed port, print the URL only
cua viewer --listen 127.0.0.1:8211 --no-openExit codes#
| Code | Meaning |
|---|---|
0 | Success. |
1 | Failure, or cua do reported an error. |
2 | Invalid argument, or an ambiguous sandbox name (qualify it: local:NAME). |
3 | Not found: sandbox, window, skill or image (or an image not published yet). |
4 | Not supported, or not configured (for example no provider credentials). |
5 | No cua-spacesd answered, or a transport failure. |
6 | Unauthenticated or permission denied (by Cua or your cloud account). |
7 | Not enough free disk space (see cua cache). |
8 | No room on the machine: its VMs are at their memory or CPU limit, or it is low on memory. |
130 | Cancelled (Ctrl-C during a create): what it made was removed. |