Sandboxes

Create, reach and delete sandboxes; local runtimes, disk cleanup and the sandbox viewer.

CommandDescription
cua sandboxSandboxes: local or an existing computer (direct).
cua sandbox createCreate 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 launchDeprecated alias of create.
cua sandbox connectReattach to a sandbox (NAME or a ref such as local:NAME) and print it.
cua sandbox lsList sandboxes: local and direct, each with its location; --local filters.
cua sandbox infoShow one sandbox.
cua sandbox suspendSuspend (pause/snapshot).
cua sandbox resumeResume.
cua sandbox restartRestart.
cua sandbox checkpointSave 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 forkStart a new sandbox from a local sandbox (running or stopped) or a checkpoint.
cua sandbox fork-manyFork 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 publishUpload 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 bakeBake 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 poolPools: 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 createCreate a pool, or update the pool of that name.
cua sandbox pool lsList the pools, with what each holds now.
cua sandbox pool rmDelete a pool (its ready sandboxes go; those created from it stay).
cua sandbox checkpointsList checkpoints; delete, pin or unpin one; or prune every unpinned one (checkpoints rm|pin|unpin NAME, checkpoints prune).
cua sandbox checkpoints rmDelete a checkpoint, here and on every machine of yours that holds a copy (forks made from it keep running).
cua sandbox checkpoints pinPin a checkpoint: a fork source to keep (rm and prune leave it until it is unpinned).
cua sandbox checkpoints unpinUnpin a checkpoint (rm and prune delete it again).
cua sandbox checkpoints pruneDelete every checkpoint that is not pinned (forks made from them keep running).
cua sandbox rmDelete a sandbox.
cua sandbox execRun a command (joined into one shell line, as sh -c).
cua sandbox runRun 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 runsRuns so far, one run's jobs, or one job with its output.
cua sandbox shellInteractive shell (PTY), or run a command in a PTY.
cua sandbox cpCopy files: cp NAME:/guest/path LOCAL or cp LOCAL NAME:/guest/path (NAME may be a ref: cp local:box:/tmp/x .).
cua sandbox overlayInject freshly built binaries into a running sandbox (see create --overlay): NAME=PATH or NAME=PATH:GUEST_PATH.
cua sandbox logsShow logs: the backend console (QEMU serial, container) when there is one, else the guest system log through the spacesd.
cua sandbox port-forwardForward 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 urlPrint 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 screenshotSave a screenshot (PNG).
cua sandbox mcpTalk to an MCP server a sandbox serves: mcp NAME SERVICE tools, mcp NAME SERVICE call TOOL '{"a":1}'.
cua sandbox mcp configThe endpoint URL and headers, for any MCP client.
cua sandbox mcp infoServer name, version and negotiated protocol revision.
cua sandbox mcp toolsList tools.
cua sandbox mcp callCall a tool with a JSON object of arguments.
cua sandbox mcp resourcesList resources.
cua sandbox mcp templatesList resource templates.
cua sandbox mcp readRead a resource.
cua sandbox mcp promptsList prompts.
cua sandbox mcp promptRender a prompt with a JSON object of string arguments.
cua sandbox mcp requestAny other method (for example skills/list), printing the result.
cua sandbox viewOpen the sandbox desktop in the browser (the cua-spacesd HTML5 viewer).
cua runtimeLocal runtimes (cua-vmm).
cua runtime doctorInspect local runtimes (read-only).
cua runtime setupProvision local runtimes.
cua cacheDisk used by images, sandboxes, builds and logs, and its cleanup.
cua cache lsList what the SDK keeps on disk, one row per image, sandbox, build output, install archive or log.
cua cache duDisk usage per category, the cache budget and free space.
cua cache pruneReap orphaned ephemeral sandboxes, remove orphans (abandoned downloads, unused layers) and evict least-recently-used cache down to the budget.
cua cache configShow 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 viewerServe 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>...]
ArgumentTypeDefaultDescription
<IMAGE>stringoptionalImage: a registry reference (ghcr.io/org/image:tag), an alias (linux, ubuntu, windows, macos[:tahoe|sequoia], omarchy).
<COMMAND>...stringoptionalThe sandbox's command, after -- (replaces the image's entrypoint): cua sb create python:3.12-slim --service mcp=8765 -- python -m srv. Repeatable.
FlagTypeDefaultEnv varDescription
--onstringWhere 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.
--kindstringWhat 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).
--runtimestringWhich 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).
--tierstringImage tier for an alias: slim, full (default), Linux docker (a VM with dockerd up at boot) or macOS xcode.
--namestringSandbox name (generated when omitted).
--openstringWith --browser: open this URL.
--installstringInstall 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.
--cpuintegervCPUs. Alias: --cpus.
--memorystringMemory, e.g. 8GB or 4096MB (a bare number is GB).
--networkdefault | noneGuest 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.
--diskstringDisk size (accepted; the image decides today).
--portstringExpose a guest port: NAME=PORT (a named service) or PORT (repeatable). Alias: --service.
--waitstringWait 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-timeoutintegerReadiness 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).
--overlaystringInject 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.
--envstringEnvironment KEY=VALUE for the sandbox (repeatable).
--sidecarstringA 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-secretstringCredentials for a private image: env:USER_VAR:PASSWORD_VAR (read from this environment) or aws-ecr[:REGION] (the AWS CLI's login token).
--poolstringCreate 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.
--ttlintegerHow long the platform keeps the sandbox once nothing keeps it alive (1h, 900): a provider sandbox's lifetime (--on e2b). Default: the platform's.
--tokenstringCUA_ENV_TOKENspacesd token (direct: sandboxes).
--gpustringA 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).
--profilestringA 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).
--browserbooleanfalseStart Chromium in it for the cua-driver browser tools (IMAGE defaults to linux).
--viewbooleanfalseOpen the desktop in the HTML5 viewer once the sandbox is ready (cua sb view).
--keep-on-failurebooleanfalseKeep 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.
--headlessbooleanfalseNo 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-spacesdbooleanfalseRun 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.
--forkablebooleanfalseA 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 dev

cua sandbox launch#

Deprecated alias of create.

cua sandbox launch [OPTIONS] [IMAGE]

Examples

cua sb launch linux --name dev

cua sandbox connect#

Reattach to a sandbox (NAME or a ref such as local:NAME) and print it.

cua sandbox connect [OPTIONS] <NAME>
ArgumentTypeDefaultDescription
<NAME>stringrequiredSandbox name or ref (local:NAME).
FlagTypeDefaultDescription
--localbooleanfalseLook NAME up among local sandboxes only (same as local:NAME).

Examples

cua sb connect dev
cua sb connect local:dev

cua sandbox ls#

List sandboxes: local and direct, each with its location; --local filters.

cua sandbox ls [OPTIONS]

Alias: cua sandbox list.

FlagTypeDefaultDescription
--localbooleanfalseOnly local sandboxes.
--no-sizebooleanfalseSkip 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 --json

cua sandbox info#

Show one sandbox.

cua sandbox info [OPTIONS] <NAME>

Alias: cua sandbox get.

ArgumentTypeDefaultDescription
<NAME>stringrequiredSandbox name or ref (local:NAME).
FlagTypeDefaultDescription
--localbooleanfalseLook NAME up among local sandboxes only (same as local:NAME).
--connectionbooleanfalseAlso 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 --json

cua sandbox suspend#

Suspend (pause/snapshot).

cua sandbox suspend [OPTIONS] <NAME>
ArgumentTypeDefaultDescription
<NAME>stringrequiredSandbox name or ref (local:NAME).
FlagTypeDefaultDescription
--localbooleanfalseLook NAME up among local sandboxes only (same as local:NAME).

Examples

cua sb suspend dev

cua sandbox resume#

Resume.

cua sandbox resume [OPTIONS] <NAME>
ArgumentTypeDefaultDescription
<NAME>stringrequiredSandbox name or ref (local:NAME).
FlagTypeDefaultDescription
--localbooleanfalseLook NAME up among local sandboxes only (same as local:NAME).

Examples

cua sb resume dev

cua sandbox restart#

Restart.

cua sandbox restart [OPTIONS] <NAME>
ArgumentTypeDefaultDescription
<NAME>stringrequiredSandbox name or ref (local:NAME).
FlagTypeDefaultDescription
--localbooleanfalseLook NAME up among local sandboxes only (same as local:NAME).

Examples

cua sb restart dev

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 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>
ArgumentTypeDefaultDescription
<NAME>stringrequiredSandbox 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>stringrequiredThe checkpoint's name.
FlagTypeDefaultDescription
--pinbooleanfalsePin it: cua sb checkpoints rm and prune leave it until cua sb checkpoints unpin.
--localbooleanfalseLook NAME up among local sandboxes only (same as local:NAME).
--jsonbooleanfalseMachine-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-2

cua 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>
ArgumentTypeDefaultDescription
<SOURCE>stringrequiredA sandbox name or ref, or a checkpoint name (a sandbox wins).
<NAME>stringrequiredThe new sandbox's name.
FlagTypeDefaultDescription
--jsonbooleanfalseMachine-readable output.

Examples

cua sb fork dev dev-copy
cua sb fork before-upgrade dev-2

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). 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]
ArgumentTypeDefaultDescription
<SOURCE>stringoptionalThe checkpoint (or local sandbox) to fork.
FlagTypeDefaultDescription
--countinteger1How many forks of SOURCE.
--group-sizeinteger0Forks per group (0: all in one group).
--groupstringA group CHECKPOINT=COUNT (repeatable), instead of SOURCE.
--onstringWhere: local (default), auto (your machines that provide Spaces, this one included), or host:<machine>.
--parallelinteger0Forks started at once per machine (0: 4).
--prefixstringNames are <prefix>-<n>.
--fallback-dirstringA folder every machine mounts (your Cua Volume) to fetch checkpoints from when their machine is away.
--fallback-s3stringAn S3 bucket[/prefix] to fetch checkpoints from when their machine is away (each machine's AWS credentials).
--fallback-regionstringThe fallback bucket's region.
--cpusinteger0vCPUs each fork is counted as when placing (default: 1; forks of one world are mostly idle).
--memory-mbinteger0Memory (MiB) each fork is counted as when placing (default: the checkpoint's).
--no-retrybooleanfalseReport forks of a failed machine instead of placing them again.
--jsonbooleanfalseOne 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-snapshots

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. Files already there are not uploaded again.

cua sandbox publish [OPTIONS] <NAME>
ArgumentTypeDefaultDescription
<NAME>stringrequiredThe checkpoint.
FlagTypeDefaultDescription
--dirstringA folder every machine mounts.
--s3stringAn S3 bucket[/prefix].
--regionstringThe bucket's region.

Examples

cua sb publish world --dir "~/Cua Volume/snapshots"
cua sb publish world --s3 my-bucket/cua-snapshots --region us-west-2

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. 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>
ArgumentTypeDefaultDescription
<PROJECT>pathrequiredThe Docker Compose project directory (holds compose.yaml or docker-compose.yml, and whatever it builds or mounts).
FlagShortTypeDefaultDescription
--checkpointstringrequiredThe checkpoint to save (cua sb fork CHECKPOINT NAME starts from it).
--imagestringThe image: an alias, a reference or a local disk path. Default: the docker tier, linux --tier docker (a Linux image with Docker).
--tierstringTier for an alias IMAGE (docker for a Docker-ready Linux VM).
--namestringThe bake Space's name (default bake-<checkpoint>).
--cpuintegervCPUs of the bake Space (forks get the same). Alias: --cpus.
--memorystringMemory of the bake Space, e.g. 4GB (forks get the same).
--file-fstringCompose files, relative to the project (repeatable; default: compose's own lookup, compose.yaml / docker-compose.yml).
--project-namestringCompose project name (default: the directory name).
--deststringWhere the project lands in the guest (default /opt/cua-bake/<project>).
--loadpathdocker save tarballs to docker load before compose up, for images the guest cannot pull (repeatable).
--healthstringA 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-timeoutinteger600Budget for compose up --wait and each --health command, seconds.
--runstringA 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-forkbooleanfalseFork 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.
--keepbooleanfalseKeep the bake Space after the checkpoint (default: delete it).
--jsonbooleanfalseMachine-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-1

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. 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 agents

cua sandbox pool create#

Create a pool, or update the pool of that name.

cua sandbox pool create [OPTIONS] <IMAGE>
ArgumentTypeDefaultDescription
<IMAGE>stringrequiredThe image its sandboxes run.
FlagTypeDefaultDescription
--namestringThe pool's name (lower-case letters, digits, '-'; default: a new one). The name of an existing pool updates it.
--mininteger1Sandboxes kept ready at all times (one starts again as soon as one is created from the pool).
--maxintegerMost kept ready, not counting those created from the pool (default: --min); above --min only while creates come faster than sandboxes start.
--idleintegerAfter this long without a create from the pool it keeps none ready, until the next create (30m, 2h; default: never).
--onstringWhere its sandboxes run (only local has pools today).
--kindstringWhat kind of machine (auto, container, vm, microvm).
--runtimestringWhich engine (auto, gvisor, runc, ...).
--cpuintegervCPUs of each sandbox. Alias: --cpus.
--memorystringMemory of each sandbox (4GB, 4096MB).
--envstringGuest environment (repeat). Repeatable.
--jsonbooleanfalseMachine-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 30m

cua sandbox pool ls#

List the pools, with what each holds now.

cua sandbox pool ls [OPTIONS]

Alias: cua sandbox pool list.

FlagTypeDefaultDescription
--jsonbooleanfalseMachine-readable output.

Examples

cua sb pool ls
cua sb pool ls --json

cua 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.

ArgumentTypeDefaultDescription
<NAME>stringrequiredThe pool's name.

Examples

cua sb pool rm agents

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 [OPTIONS] [COMMAND]
FlagTypeDefaultDescription
--jsonbooleanfalseMachine-readable output.

Examples

cua sb checkpoints
cua sb checkpoints rm before-upgrade
cua sb checkpoints pin world
cua sb 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 rm [OPTIONS] <NAME>
ArgumentTypeDefaultDescription
<NAME>stringrequiredThe checkpoint's name.

Examples

cua sb checkpoints rm before-upgrade

cua 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>
ArgumentTypeDefaultDescription
<NAME>stringrequiredThe checkpoint's name.

Examples

cua sb checkpoints pin world

cua sandbox checkpoints unpin#

Unpin a checkpoint (rm and prune delete it again).

cua sandbox checkpoints unpin [OPTIONS] <NAME>
ArgumentTypeDefaultDescription
<NAME>stringrequiredThe checkpoint's name.

Examples

cua sb checkpoints unpin world

cua 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 prune

cua sandbox rm#

Delete a sandbox.

cua sandbox rm [OPTIONS] <NAME>

Alias: cua sandbox delete.

ArgumentTypeDefaultDescription
<NAME>stringrequiredSandbox name or ref (local:NAME).
FlagShortTypeDefaultDescription
--force-fbooleanfalseSkip the confirmation prompt. Required when there is no terminal to ask on (scripts, agents): without it nothing is deleted.
--localbooleanfalseLook 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 --force

cua 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>...
ArgumentTypeDefaultDescription
<NAME>stringrequiredSandbox name or ref (local:NAME).
<COMMAND>...stringrequiredCommand and arguments. Repeatable.
FlagShortTypeDefaultDescription
--userstringRun as this guest user.
--cwdstringStart in this guest directory.
--timeoutintegerStop the command after this many seconds (0: no limit).
--stdin-ibooleanfalseStream: 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).
--localbooleanfalseLook 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>...
ArgumentTypeDefaultDescription
<COMMAND>...stringrequiredThe command (after --). Repeatable.
FlagShortTypeDefaultDescription
--onstringWhere: omitted or local (this machine), auto (the least-loaded of your machines that provide Spaces), or one machine by name.
--countinteger1How many times to run it, each in its own new Space.
--imagestringImage of each Space (default: the canonical Linux image).
--kindstringcontainer, vm or microvm (default: what the image is).
--runtimestringA runtime (gvisor, runc, firecracker, ...).
--cpusnumber1CPUs reserved for each.
--memoryinteger1024Memory reserved for each, in MiB.
--timeoutstring10mHow long each may run.
--env-estringKEY=VALUE for the command's environment. Repeatable.
--resultstringA file each run leaves behind, returned with its result.
--concurrencyinteger0Most at once (default: as many as the machines take).
--max-attemptsinteger0Times a job may be lost (its machine went away) and run again.
--osstringOnly machines of this OS (linux, macos).
--archstringOnly machines of this CPU architecture (x86_64, arm64).
--idstringThe run's id (default: a new one). Submitting the same id again adds nothing twice.
--detachbooleanfalseSubmit 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.sh

cua sandbox runs#

Runs so far, one run's jobs, or one job with its output.

cua sandbox runs [OPTIONS] [RUN]
ArgumentTypeDefaultDescription
<RUN>stringoptionalA run: its jobs.
FlagTypeDefaultDescription
--jobintegerOne job of the run, with its output.
--statestringOnly jobs in this state (failed, error, running, ...).
--onstringRuns of this machine only (local) or of all your machines (auto, the default).
--cancelbooleanfalseCancel the run (or the job with --job).
--outputbooleanfalseWith 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 --cancel

cua sandbox shell#

Interactive shell (PTY), or run a command in a PTY.

cua sandbox shell [OPTIONS] <NAME> [COMMAND]...
ArgumentTypeDefaultDescription
<NAME>stringrequiredSandbox name or ref (local:NAME).
<COMMAND>...stringoptionalCommand to run instead of the login shell. Repeatable.
FlagTypeDefaultDescription
--colsintegerTerminal width (default: this terminal's).
--rowsintegerTerminal height (default: this terminal's).
--localbooleanfalseLook NAME up among local sandboxes only (same as local:NAME).

Examples

cua sb shell dev
cua sb shell dev top

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 cp [OPTIONS] <SRC> <DST>
ArgumentTypeDefaultDescription
<SRC>stringrequiredSource: a local path or NAME:/guest/path.
<DST>stringrequiredDestination: a local path or NAME:/guest/path.
FlagTypeDefaultDescription
--localbooleanfalseLook 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>...
ArgumentTypeDefaultDescription
<NAME>stringrequiredSandbox name or ref (local:NAME).
<OVERLAYS>...stringrequiredNAME=PATH[:GUEST_PATH] (repeatable). Repeatable.
FlagTypeDefaultDescription
--timeoutinteger180Budget for a cua-spacesd restart, in seconds.
--localbooleanfalseLook 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-spacesd

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 logs [OPTIONS] <NAME>
ArgumentTypeDefaultDescription
<NAME>stringrequiredSandbox name or ref (local:NAME).
FlagShortTypeDefaultDescription
--tail-ninteger200Lines from the end.
--sourcestringautoauto, console or guest.
--localbooleanfalseLook NAME up among local sandboxes only (same as local:NAME).

Examples

cua sb logs dev
cua sb logs dev -n 50 --source guest

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 port-forward [OPTIONS] <NAME> <SPEC>

Alias: cua sandbox forward.

ArgumentTypeDefaultDescription
<NAME>stringrequiredSandbox name or ref (local:NAME).
<SPEC>stringrequiredPORT or PORT:LOCAL_PORT.
FlagTypeDefaultDescription
--localbooleanfalseLook NAME up among local sandboxes only (same as local:NAME).
--no-waitbooleanfalsePrint 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:15432

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 url [OPTIONS] <NAME> <SERVICE>
ArgumentTypeDefaultDescription
<NAME>stringrequiredSandbox name or ref (local:NAME).
<SERVICE>stringrequiredService name (from --service at create time).
FlagTypeDefaultDescription
--ttlintegerLifetime of a --public URL (10m, 1h, 3600; 60 s to 24 h).
--localbooleanfalseLook NAME up among local sandboxes only (same as local:NAME).
--publicbooleanfalseA shareable URL that expires.

Examples

cua sb url dev web
 
# A shareable URL for 10 minutes
cua sb url local:dev web --public --ttl 10m

cua sandbox screenshot#

Save a screenshot (PNG). A local Lume sandbox without cua-spacesd is captured via VNC.

cua sandbox screenshot [OPTIONS] <NAME>
ArgumentTypeDefaultDescription
<NAME>stringrequiredSandbox name or ref (local:NAME).
FlagShortTypeDefaultDescription
--output-opathscreenshot.pngOutput file (PNG).
--localbooleanfalseLook NAME up among local sandboxes only (same as local:NAME).

Examples

cua sb screenshot dev -o desktop.png

cua 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>
ArgumentTypeDefaultDescription
<NAME>stringrequiredSandbox name or ref (local:NAME).
<SERVICE>stringrequiredService name (for example mcp, or port-8765).
FlagTypeDefaultDescription
--pathstring/mcpEndpoint path on the service.
--localbooleanfalseLook 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]
FlagTypeDefaultDescription
--show-secretsbooleanfalsePrint credential header values in full.

Examples

cua sb mcp dev mcp config

cua sandbox mcp info#

Server name, version and negotiated protocol revision.

cua sandbox mcp <NAME> <SERVICE> info [OPTIONS]

Examples

cua sb mcp dev mcp info

cua sandbox mcp tools#

List tools.

cua sandbox mcp <NAME> <SERVICE> tools [OPTIONS]

Examples

cua sb mcp dev mcp tools

cua sandbox mcp call#

Call a tool with a JSON object of arguments.

cua sandbox mcp <NAME> <SERVICE> call [OPTIONS] <TOOL> [ARGUMENTS]
ArgumentTypeDefaultDescription
<TOOL>stringrequiredTool name.
<ARGUMENTS>stringoptionalArguments (JSON object). Default {}.
FlagTypeDefaultDescription
--outpathSave 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 ./shots

cua sandbox mcp resources#

List resources.

cua sandbox mcp <NAME> <SERVICE> resources [OPTIONS]

Examples

cua sb mcp dev mcp resources

cua sandbox mcp templates#

List resource templates.

cua sandbox mcp <NAME> <SERVICE> templates [OPTIONS]

Examples

cua sb mcp dev mcp templates

cua sandbox mcp read#

Read a resource.

cua sandbox mcp <NAME> <SERVICE> read [OPTIONS] <URI>
ArgumentTypeDefaultDescription
<URI>stringrequiredResource URI.
FlagTypeDefaultDescription
--outpathSave blob contents here instead of summarizing.

Examples

cua sb mcp dev mcp read file:///tmp/report.txt

cua sandbox mcp prompts#

List prompts.

cua sandbox mcp <NAME> <SERVICE> prompts [OPTIONS]

Examples

cua sb mcp dev mcp prompts

cua sandbox mcp prompt#

Render a prompt with a JSON object of string arguments.

cua sandbox mcp <NAME> <SERVICE> prompt [OPTIONS] <NAME> [ARGUMENTS]
ArgumentTypeDefaultDescription
<NAME>stringrequiredPrompt name.
<ARGUMENTS>stringoptionalArguments (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]
ArgumentTypeDefaultDescription
<METHOD>stringrequiredJSON-RPC method.
<PARAMS>stringoptionalParams (JSON object).

Examples

cua sb mcp dev mcp request skills/list

cua 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>
ArgumentTypeDefaultDescription
<NAME>stringrequiredSandbox name or ref (local:NAME).
FlagTypeDefaultDescription
--servicestringOpen this web service of the sandbox instead of the viewer (for images without cua-spacesd that serve their own display page).
--filesstringGuest folder for uploads and folder sharing (default ~; none turns files off).
--ttlstringLink lifetime (for example 1h, 30m). Default 1h.
--view-onlybooleanfalseWatch only: no input, clipboard, files or microphone.
--no-openbooleanfalsePrint the link without opening a browser.
--localbooleanfalseLook 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 web

cua 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 doctor

cua runtime setup#

Provision local runtimes. Exit 1 if any step is Error; warnings exit 0.

cua runtime setup [OPTIONS] [COMPONENTS]...
ArgumentTypeDefaultDescription
<COMPONENTS>...stringoptionalComponents: qemu, lume, runsc (default: everything provisionable). Repeatable.
FlagTypeDefaultDescription
--dry-runbooleanfalseOnly report what would be done.

Examples

# See what would be installed
cua runtime setup --dry-run
cua runtime setup qemu

cua 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.

FlagTypeDefaultDescription
--categorystringOnly 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 images

cua cache du#

Disk usage per category, the cache budget and free space.

cua cache du [OPTIONS]

Examples

cua cache du
cua cache du --json

cua 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]
FlagTypeDefaultDescription
--budgetstringBudget for this run (auto, off or a size such as 20G).
--allbooleanfalseEvict every unused cache entry, not only down to the budget.
--dry-runbooleanfalseShow 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 --all

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 cache config [OPTIONS]
FlagTypeDefaultDescription
--budgetstringCache budget: auto (min of 30 GiB and 10% of free space plus cache), off, or a size.
--min-freestringFree space pulls, builds and VM creates always leave (size).
--warn-freestringWarn when free space drops under this (size).
--orphan-reap-minutesintegerMinutes before an ephemeral sandbox whose process died is reaped.
--auto-gctrue | falseClean 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 10G

cua viewer#

Serve the HTML5 viewer for every sandbox on one loopback port.

cua viewer [OPTIONS]
FlagTypeDefaultDescription
--listenstring127.0.0.1:0Address to listen on (loopback only).
--no-openbooleanfalsePrint 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-open

Exit codes#

CodeMeaning
0Success.
1Failure, or cua do reported an error.
2Invalid argument, or an ambiguous sandbox name (qualify it: local:NAME).
3Not found: sandbox, window, skill or image (or an image not published yet).
4Not supported, or not configured (for example no provider credentials).
5No cua-spacesd answered, or a transport failure.
6Unauthenticated or permission denied (by Cua or your cloud account).
7Not enough free disk space (see cua cache).
8No room on the machine: its VMs are at their memory or CPU limit, or it is low on memory.
130Cancelled (Ctrl-C during a create): what it made was removed.