Images and your cloud
Pull, build, push and publish images, and the cloud account you link for machines.
| Command | Description |
|---|---|
cua image | Images: local OCI pull/build/push. |
cua image pull | Pull an image into the local cache. |
cua image build | Build an image from an images.cua.ai/v1alpha1 Image resource (JSON). |
cua image push | Copy an image (host architecture) to another registry reference. |
cua images | The sandbox image catalog (the images the docs list): which exist, their variants, and which ship cua-spacesd and a browser. |
cua images ls | List the catalog: ref, OS, container or VM, local runtime, cua-spacesd, browsers, summary. |
cua images info | Show one catalog entry (a ref or an alias such as linux). |
cua images build | Build a sandbox image definition (a libs/images directory): the rootfs, the bootable VM disk and the KubeVirt containerDisk. |
cua images pack | Pack the disks cua images build --outputs disk wrote as KubeVirt containerDisks <repo>:<tag>-<arch> (push, or load into docker). |
cua images publish | Publish a built image as immutable pins <series>-<stamp> and <series>-disk-<stamp>, refusing any that exist. |
cua images release | Run an image's release pipeline (its release.json): build, doctor lanes, content digest, save; with --publish push, publish pins and verify; with --promote move the floating tags. |
cua images promote | Move a series' moving tags (edge, edge-disk) to the pins a cua images publish record names, after the gates passed. |
cua build | Build an image from a Dockerfile, in a Space, as pinned checkpoints that Spaces fork from in under a second. |
cua cloud | Spaces in your own cloud account (AWS, Google Cloud, Hetzner, Modal): connect, status, test, disconnect, sweep; and pool hosts there (cua cloud add aws). |
cua cloud status | Your clouds: found credentials, the connected account and region, what each runs at what hourly cost, and what Cua created there. |
cua cloud connect | Connect a cloud account Spaces can be created in. |
cua cloud approve | Approve what an agent asked for on a cloud: its link, or a higher budget or larger machines. |
cua cloud trust | Print the file that makes a cloud trust Cua's tokens (no keys): the AWS CloudFormation stack, the Google Cloud trust script, or the Azure resource group template. |
cua cloud test | Check a cloud account without creating anything: credentials, permissions (by dry run), quota, the region and machine types. |
cua cloud disconnect | Forget a connected cloud. |
cua cloud audit | What Cua did in your clouds: connects, disconnects, and every resource recorded, created, confirmed and deleted (by you, a sweep, the automatic sweep or disconnect --delete). |
cua cloud cost | What the machines Cua created in your clouds cost: each one's list price times how long it ran, by Space, agent, UTC day or cloud. |
cua cloud sweep | Find what Cua left in your clouds: expired Spaces and resources whose Space is gone (with --all, every Cua resource). |
cua cloud add | Add hosts in your cloud to your pool: computers made for Cua work that join by themselves (cua cloud add aws). |
cua cloud add aws | EC2 hosts in your connected AWS account (cua cloud connect aws) that join your pool by themselves: Ubuntu 24.04 for CPU types, the AWS Deep Learning Base GPU image for g*/p* types. |
cua cloud plan | What the elastic pool would do for some Spaces: where each goes (your devices first, then hosts with room, then new cloud machines at the least cost) and what it costs. |
cua cloud hosts | The hosts the elastic pool runs in your clouds: add them by hand (pinned: the scaler never removes them), list or remove them. |
cua cloud hosts list | The hosts with their state and cost. |
cua cloud hosts add | Add hosts by hand (pinned: never removed by the scaler). |
cua cloud hosts remove | Remove hosts this home added (their Spaces end). |
cua cloud budget | The elastic pool's budget: a $/hour cap, a monthly cap, the autoscale switch. |
cua cloud reconcile | Run the elastic pool's scale-in pass now (the daemon runs one every 30 s): idle hosts go at the end of their paid time. |
Every command also accepts the global options.
cua image#
Images: local OCI pull/build/push.
cua image [OPTIONS] <COMMAND>Alias: cua img.
cua image pull#
Pull an image into the local cache.
cua image pull [OPTIONS] <REFERENCE>| Argument | Type | Default | Description |
|---|---|---|---|
<REFERENCE> | string | required | Image reference or alias. |
Examples
cua image pull linux
cua image pull ghcr.io/trycua/linux:24.04cua image build#
Build an image from an images.cua.ai/v1alpha1 Image resource (JSON).
cua image build [OPTIONS] --base <BASE> <SPEC>| Argument | Type | Default | Description |
|---|---|---|---|
<SPEC> | path | required | Image resource file (JSON). |
| Flag | Type | Default | Description |
|---|---|---|---|
--base | string | required | Base image (container:<ref>, vm:<ref>, disk:<path>). |
--push | string | Push the result to this reference. |
Examples
cua image build image.json --base container:ubuntu:24.04
cua image build image.json --base container:ubuntu:24.04 --push ghcr.io/acme/desktop:1cua image push#
Copy an image (host architecture) to another registry reference.
cua image push [OPTIONS] <REFERENCE> <DESTINATION>| Argument | Type | Default | Description |
|---|---|---|---|
<REFERENCE> | string | required | Source image reference or alias. |
<DESTINATION> | string | required | Destination registry reference. |
Examples
cua image push linux ghcr.io/acme/desktop:1cua images#
The sandbox image catalog (the images the docs list): which exist, their variants, and which ship cua-spacesd and a browser.
cua images [OPTIONS] <COMMAND>cua images ls#
List the catalog: ref, OS, container or VM, local runtime, cua-spacesd, browsers, summary.
cua images ls [OPTIONS]Alias: cua images list.
| Flag | Type | Default | Description |
|---|---|---|---|
--os | string | Only this OS: linux, windows or macos. | |
--all | boolean | false | Include unpublished entries (benchmark images). |
--browser | boolean | false | Only images with a browser the cua-driver browser tools drive. |
Examples
cua images ls
# Images whose browser the cua-driver browser tools drive
cua images ls --browser
cua images ls --all --jsoncua images info#
Show one catalog entry (a ref or an alias such as linux).
cua images info [OPTIONS] <REFERENCE>| Argument | Type | Default | Description |
|---|---|---|---|
<REFERENCE> | string | required | Image ref or alias. |
Examples
cua images info linuxcua images build#
Build a sandbox image definition (a libs/images directory): the rootfs, the bootable VM disk and the KubeVirt containerDisk.
Outputs: rootfs <repo>:docker-<tag>-<arch>; disk <out>/<name>/<arch>/disk.img; containerdisk <repo>:<tag>-<arch>. --push pushes the outputs the image.json lists (a VM-only image never pushes its rootfs).
cua images build [OPTIONS] <DIR>| Argument | Type | Default | Description |
|---|---|---|---|
<DIR> | path | required | Image definition directory (Dockerfile, image.json). |
| Flag | Type | Default | Description |
|---|---|---|---|
--platform | string | Platforms, comma separated (default: the host's, or the image's only one). | |
--tag | string | local | Tag for the per-arch outputs. |
--repo | string | Repository (default: image.json repository, else cua-e2e-local/<name>). | |
--outputs | string | rootfs | Outputs: rootfs, disk, containerdisk (comma separated). |
--build-arg | string | Docker build argument KEY=VALUE (repeatable). | |
--build-context | string | Named build context NAME=PATH (repeatable). | |
--label | string | Extra rootfs label KEY=VALUE (repeatable). | |
--out | path | Where disks go (default: $CUA_IMAGES_OUT or ~/.cache/cua-images). | |
--disk-size | string | 20G | Virtual size of the disk. |
--target | string | Dockerfile stage to build (a tier: slim, full); disks go to <out>/<name>-<target>/<arch>. Default: the Dockerfile's last stage. | |
--push | boolean | false | Push the published outputs. |
--dry-run | boolean | false | Print the steps without running them. |
Examples
cua images build libs/images/omarchy --outputs rootfs,disk
cua images build libs/images/omarchy --tag build-1a2b3c4d --outputs containerdisk --push
cua images build libs/images/linux --target slim --tag 24.04-slim-local --outputs rootfs,disk
cua images build libs/images/linux --platform linux/amd64,linux/arm64 --dry-runcua images pack#
Pack the disks cua images build --outputs disk wrote as KubeVirt containerDisks <repo>:<tag>-<arch> (push, or load into docker).
Packs exactly the disk the doctor checked, so the pushed bytes are the tested ones.
cua images pack [OPTIONS] <DIR>| Argument | Type | Default | Description |
|---|---|---|---|
<DIR> | path | required | Image definition directory. |
| Flag | Type | Default | Description |
|---|---|---|---|
--platform | string | Platforms, comma separated (default: the host's, or the image's only one). | |
--tag | string | local | Tag for the per-arch containerDisks. |
--repo | string | Repository (default: image.json repository, else cua-e2e-local/<name>). | |
--out | path | Where the disks are (default: $CUA_IMAGES_OUT or ~/.cache/cua-images). | |
--target | string | The --target the disks were built with (their <name>-<target> dir). | |
--push | boolean | false | Push instead of loading into docker. |
--dry-run | boolean | false | Print what would be packed. |
Examples
cua images pack libs/images/omarchy --tag ci-1a2b3c4d --push --jsoncua images publish#
Publish a built image as immutable pins <series>-<stamp> and <series>-disk-<stamp>, refusing any that exist. Moves nothing.
Reads the per-arch images cua images build --tag TAG --push wrote
(<repo>:<tag>-<arch>, and <repo>:docker-<tag>-<arch> when the image has a rootfs
output). Writes the record cua images promote takes.
cua images publish [OPTIONS] --tag <TAG> --series <SERIES> <DIR>| Argument | Type | Default | Description |
|---|---|---|---|
<DIR> | path | required | Image definition directory. |
| Flag | Type | Default | Description |
|---|---|---|---|
--tag | string | required | The build tag the per-arch images were pushed under. |
--series | string | required | Series / channel (edge, 24.04). |
--stamp | string | Pin stamp <yyyymmdd>-<sha7> (default: today and git HEAD). | |
--repo | string | Repository (default: image.json repository). | |
--platform | string | Platforms (default: image.json platforms). | |
--annotation | string | Extra index annotation KEY=VALUE (repeatable). | |
--descriptor-annotation | string | Annotation on one child's descriptor, VARIANT/ARCH:KEY=VALUE (rootfs/amd64:ai.cua.doctor.status=pass; repeatable). | |
--record | path | Write the publish record (JSON) here. | |
--dry-run | boolean | false | Resolve and print, push nothing. |
Examples
cua images publish libs/images/omarchy --tag build-1a2b3c4d --series edge --record pins.json
cua images publish libs/images/linux --tag build-20260925-1a2b3c4 --series 24.04 --descriptor-annotation rootfs/amd64:ai.cua.doctor.status=pass
cua images publish libs/images/omarchy --tag build-1a2b3c4d --series edge --dry-runcua images release#
Run an image's release pipeline (its release.json): build, doctor lanes, content digest, save; with --publish push, publish pins and verify; with --promote move the floating tags. The same command runs locally and in CI.
Phases: prepare, build, gate (doctor lanes), stage, push, publish, verify, promote. Push refuses unless every required gate passed (this run, or a state-*.json merged from other jobs in <work>/evidence). Evidence, logs and the summary go to <work>/evidence (a plain directory CI uploads as-is).
cua images release [OPTIONS] <DIR>| Argument | Type | Default | Description |
|---|---|---|---|
<DIR> | path | required | Image directory with a release.json. |
| Flag | Type | Default | Description |
|---|---|---|---|
--tier | string | Tier (slim, full) for images that have tiers. | |
--arch | string | Arches, comma separated (default: release.json arches). Repeatable. | |
--stamp | string | Pin stamp <yyyymmdd>-<sha7> (default: today and git HEAD). | |
--work | path | Work directory (default: $CUA_RELEASE_WORK, else under the cua build cache, which cua cache prune manages). | |
--steps | string | Only these steps: phase names or step-id prefixes (comma separated). Repeatable. | |
--from | string | Rerun from this phase or step; the steps before it must have passed. | |
--var | string | Variable KEY=VALUE for release.json templates (repeatable). | |
--assume | string | Treat a host capability as present (kvm) or absent (!runsc). Repeatable. | |
--scope | string | This run's state file name, state-<scope>.json (default: the arches); CI jobs sharing an evidence directory use distinct scopes. | |
--resume | boolean | false | Skip steps that passed with the same inputs and whose outputs exist. |
--dry-run | boolean | false | Print the plan; run nothing. |
--publish | boolean | false | Also push, publish immutable pins and verify them. |
--promote | boolean | false | Also move the floating tags to the pins. |
Examples
# Plan only
cua images release libs/images/linux --tier slim --dry-run
# Build and doctor amd64 locally; resume after a failure
cua images release libs/images/linux --tier slim --arch amd64 --resume
# Rerun from the doctor lanes (the build must have passed)
cua images release libs/images/linux --tier slim --from gate
# One CI job's slice
cua images release libs/images/linux --tier full --arch arm64 --steps build,gate,stage --work release
# Publish and promote (the gates must have passed)
cua images release libs/images/omarchy --publish --promote --resumecua images promote#
Move a series' moving tags (edge, edge-disk) to the pins a cua images publish record names, after the gates passed.
cua images promote [OPTIONS] <RECORD>| Argument | Type | Default | Description |
|---|---|---|---|
<RECORD> | path | required | Record written by cua images publish --record. |
| Flag | Type | Default | Description |
|---|---|---|---|
--dry-run | boolean | false | Check and print, move nothing. |
Examples
cua images promote pins.json
cua images promote pins.json --dry-runcua build#
Build an image from a Dockerfile, in a Space, as pinned checkpoints that Spaces fork from in under a second. Works in any directory; layers already built are reused.
cua build [OPTIONS] [CONTEXT]| Argument | Type | Default | Description |
|---|---|---|---|
<CONTEXT> | path | . | The build context: COPY and ADD sources are relative to it, and its .dockerignore applies. |
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--file | -f | string | The Dockerfile (-: standard input). Default: Dockerfile in the context. | |
--tag | -t | string | Name the result: build:<tag> is an image for cua spaces create, and cua sb fork finds it. | |
--build-arg | string | NAME=VALUE for an ARG (repeatable). | ||
--kind | string | vm (default), container or microvm. | ||
--on | string | Where: local (default). A build's layers are checkpoints, which stay on the machine that took them. | ||
--cpus | integer | vCPUs of the machine (and of Spaces made from the build; default 2). | ||
--memory | integer | Memory in MiB (default 4096). | ||
--step-timeout | string | 1h | Budget for each step. | |
--desktop | boolean | false | Keep the desktop (the build's machine is headless by default: only cua-spacesd runs). | |
--no-cache | boolean | false | Build every layer again. |
Examples
# Build ./Dockerfile with ./ as the context
cua build -t app
# Another directory and Dockerfile; build arguments
cua build -f docker/Dockerfile.dev --build-arg PY=3.12 -t app-dev ./services/api
# A Dockerfile piped in on stdin, a bigger machine, every layer again
cua build -f - --cpus 4 --memory 8192 --no-cache -t app
# Run it
cua spaces create build:app
cua sb fork build-<key> myboxcua cloud#
Spaces in your own cloud account (AWS, Google Cloud, Hetzner, Modal): connect, status, test, disconnect, sweep; and pool hosts there (cua cloud add aws).
cua cloud [OPTIONS] <COMMAND>Examples
cua cloud status
cua cloud connect aws --region us-west-2 --default
cua spaces create --on aws
cua cloud add aws --count 2 --type g6.xlarge
cua cloud sweepcua cloud status#
Your clouds: found credentials, the connected account and region, what each runs at what hourly cost, and what Cua created there.
cua cloud status [OPTIONS] [PROVIDER]Alias: cua cloud ls.
| Argument | Type | Default | Description |
|---|---|---|---|
<PROVIDER> | string | optional | Only this cloud (aws, azure, gcp, hetzner, modal). |
Examples
cua cloud status
cua cloud status aws --jsoncua cloud connect#
Connect a cloud account Spaces can be created in. Never prompts and is safe to run again: every run ends with a status, the next step and the command that verifies it. With --oidc, AWS and Google Cloud are linked without any key: Cua signs short-lived tokens that your account trusts. Azure is always linked that way. Without it, the cloud's own CLI sign-in on this device is used (Cua stores only the profile, region, project or environment names; Hetzner's API token goes to the Cua credential store).
How it ends (every run, also with --json):
status connected | needs-trust | checking | waiting-for-approval | failed
next run: the exact command to run next, or
open: a page a person opens (paste: what they paste there)
why: what it is for, in plain words
verify the command that confirms it: cua cloud status <cloud>
checks what the check found
Exit code: 0 connected, 10 the next step is yours (run it), 11 it waits on a
person (send them next), 1 error.
AWS without a stored key (for agents: follow next until connected):
- Ask the person for a monthly budget (US dollars), the region and the largest machine, then run: cua cloud connect aws --oidc --region us-west-2 --budget 200 --max-size 4x16
- status needs-trust: send the person
next.open(AWS CloudShell, or the CloudFormation quick-create link) andnext.paste. It creates one stack, cua-spaces: an OIDC provider and the cua-spaces role, scoped to what Cua tags cua-managed=true. No keys. Ask them for the 12-digit AWS account id when it shows CREATE_COMPLETE. - Run
next.run(the same command with --account-id <ID> --check). It gets a check token, exchanges it with AWS STS and dry-runs a machine. Nothing is created. - status connected: done. status waiting-for-approval: an agent made the
link (or raised a limit), so a person approves it in the Cua Spaces
app; then
cua cloud status awssays connected. Verify: cua cloud status aws
Hetzner and Modal: the API token is sealed to your devices (only devices of
your account open it; Cua's servers keep ciphertext). Ask the person for a
budget and the token (Hetzner: Read & Write, Cloud Console, Security, API
tokens; Modal: modal token new, given as <token id>:<token secret>), then:
cua cloud connect hetzner --token-stdin --region fsn1 --budget 50 --max-size 4x8
It seals by default on a device with the account's pool keys when a
budget is given; --sealed insists on it, --no-sealed keeps the token on
this device only (as before). --sealed without a token seals the one this
device already has.
Verify: cua cloud status hetzner (its line says which devices can open it)
Google Cloud without a stored key:
- cua cloud connect gcp --oidc --project my-project --region us-central1 --budget 200 --max-size 4x16
- status needs-trust: a person opens
next.open(Google Cloud Shell with Cua's trust script) and pastesnext.paste: it creates the workload identity pool cua, its provider, the role cuaSpaces and one binding. No keys, no service accounts. It prints the project number. An agent on a machine signed in to gcloud getsnext.runinstead (the same script). - Run
next.run(with --project-number <N> --check): Google's STS exchanges a check token and the role's permissions are checked. Verify: cua cloud status gcp
Azure (always without a stored key):
- cua cloud connect azure --region westus2 --budget 200 --max-size 4x16
- status needs-trust: a person opens
next.open(Deploy to Azure) and deploys into resource group cua-spaces: the cua-spaces managed identity trusting Cua's tokens, with Virtual Machine Contributor and Network Contributor on that group only. No keys. Ask for the outputs subscriptionId, tenantId and clientId. An agent on a machine signed in to the az CLI getsnext.runinstead. - Run
next.run(with --subscription --tenant --client-id --check): Microsoft Entra exchanges a check token, the resource group is read and a machine is validated. Verify: cua cloud status azure
Other clouds use their own CLI sign-in on this device.
cua cloud trust <cloud> prints the trust setup file (aws, gcp, azure).
Docs for agents: https://cua.ai/docs/spaces/guides/connect-a-cloud
cua cloud connect [OPTIONS] <PROVIDER>| Argument | Type | Default | Description |
|---|---|---|---|
<PROVIDER> | string | required | aws, azure, gcp, hetzner or modal. |
| Flag | Type | Default | Description |
|---|---|---|---|
--profile | string | AWS profile (~/.aws/config) or Modal profile (~/.modal.toml). | |
--region | string | AWS, Google Cloud or Azure region, or Hetzner location (default fsn1). | |
--zone | string | Google Cloud zone (default: the region's -a zone). | |
--project | string | Google Cloud project (default: gcloud config get project). | |
--environment | string | Modal environment (default: the profile's). | |
--ttl-hours | integer | Delete each Space there after this many hours (default 8; 0: never; Modal caps a sandbox at 24; a Hetzner server shuts itself down then and cua cloud sweep --delete removes it). | |
--budget | number | The most Cua may spend there per calendar month, in US dollars. New machines are refused once it is reached; stopping and deleting always works. Needed with --oidc. | |
--max-size | string | The largest machine Cua may create there: vCPUs x GB, for example 4x16. | |
--account-id | string | With --oidc: the 12-digit AWS account id the trust stack is in. | |
--role-arn | string | With --oidc: the role ARN, only if it is not named cua-spaces. | |
--project-number | string | Google Cloud with --oidc: the project number (the trust script prints it). | |
--service-account | string | Google Cloud with --oidc: a service account to act as (default: none, the federated identity calls Google directly). | |
--subscription | string | Azure: the subscription id (the template's subscriptionId). | |
--tenant | string | Azure: the Microsoft Entra tenant id (the template's tenantId). | |
--client-id | string | Azure: the cua-spaces managed identity's client id (the template's clientId). | |
--resource-group | string | Azure: the resource group Cua works in, the only one its roles reach (default cua-spaces). | |
--token-stdin | boolean | false | Hetzner or Modal: read the API token from stdin (Hetzner: a Read & Write project token, otherwise HCLOUD_TOKEN, the saved token or the hcloud CLI's context; Modal: <token id>:<token secret>). Once the checks pass it is sealed to your devices, or with --no-sealed saved in this device's Cua credential store (Hetzner). |
--default | boolean | false | Also make it the default location (default.on). |
--oidc | boolean | false | Link without a stored key: Cua's issuer signs 15-minute tokens your account trusts (AWS, Google Cloud; Azure always). |
--sealed | boolean | Hetzner, Modal: seal the API token to your devices (the token given on stdin, else the one this device has). The default when this device has the account's pool keys and a budget is given. | |
--no-sealed | boolean | false | Hetzner: keep the API token on this device only (in the Cua credential store), as before sealing. |
--check | boolean | false | With --oidc (and Azure): prove the link works (a check token, the exchange with the cloud, a dry run, permission check or validate; nothing is created) and save it. |
Examples
# AWS without a stored key: start, then check with the account id
cua cloud connect aws --oidc --region us-west-2 --budget 200 --max-size 4x16
cua cloud connect aws --oidc --region us-west-2 --budget 200 --max-size 4x16 --account-id 123456789012 --check
# Google Cloud without a stored key: start, then check with the project number
cua cloud connect gcp --oidc --project my-project --region us-central1 --budget 200
cua cloud connect gcp --oidc --project my-project --region us-central1 --budget 200 --project-number 123456789012 --check
# Azure: start, then check with the template's outputs
cua cloud connect azure --region westus2 --budget 200 --max-size 4x16
cua cloud connect azure --region westus2 --budget 200 --subscription 00000000-0000-0000-0000-000000000000 --tenant 11111111-1111-1111-1111-111111111111 --client-id 22222222-2222-2222-2222-222222222222 --check
# The cloud CLI's sign-in on this device, with the same limits
cua cloud connect aws --profile sandbox --region us-west-2 --budget 50 --default
cua cloud connect gcp --project my-project --region us-central1
cua cloud connect modal --environment spaces
# Hetzner: the project's API token on standard input, sealed to your devices
cua cloud connect hetzner --token-stdin --region fsn1 --budget 50 --max-size 4x8
# Modal: <token id>:<token secret> on standard input, sealed to your devices
cua cloud connect modal --token-stdin --budget 50
# Seal the Hetzner token this device already has
cua cloud connect hetzner --sealed --budget 50
# Spaces there delete themselves after 4 hours (default 8; 0: never)
cua cloud connect aws --ttl-hours 4cua cloud approve#
Approve what an agent asked for on a cloud: its link, or a higher budget or larger machines. For a person only (refused in an agent's shell). With --deny, decline it: the limits in force stay, and a link never approved is disconnected.
cua cloud approve [OPTIONS] <PROVIDER>| Argument | Type | Default | Description |
|---|---|---|---|
<PROVIDER> | string | required | aws, gcp, hetzner or modal. |
| Flag | Type | Default | Description |
|---|---|---|---|
--deny | boolean | false | Decline instead of approving. |
Examples
cua cloud status aws
cua cloud approve aws
cua cloud approve aws --denycua cloud trust#
Print the file that makes a cloud trust Cua's tokens (no keys): the AWS CloudFormation stack, the Google Cloud trust script, or the Azure resource group template. cua cloud connect says when and how to run it.
cua cloud trust [OPTIONS] <CLOUD>| Argument | Type | Default | Description |
|---|---|---|---|
<CLOUD> | string | required | aws, gcp or azure. |
Examples
cua cloud trust gcp > cua-trust.sh
cua cloud trust azure > cua-spaces.json
cua cloud trust aws > cua-spaces.yamlcua cloud test#
Check a cloud account without creating anything: credentials, permissions (by dry run), quota, the region and machine types.
cua cloud test [OPTIONS] <PROVIDER>| Argument | Type | Default | Description |
|---|---|---|---|
<PROVIDER> | string | required | aws, azure, gcp, hetzner or modal. |
| Flag | Type | Default | Description |
|---|---|---|---|
--profile | string | AWS profile (~/.aws/config) or Modal profile (~/.modal.toml). | |
--region | string | AWS, Google Cloud or Azure region, or Hetzner location (default fsn1). | |
--zone | string | Google Cloud zone (default: the region's -a zone). | |
--project | string | Google Cloud project (default: gcloud config get project). | |
--environment | string | Modal environment (default: the profile's). | |
--token-stdin | boolean | false | Hetzner or Modal: read the API token from stdin (Hetzner: a Read & Write project token, otherwise HCLOUD_TOKEN, the saved token or the hcloud CLI's context; Modal: <token id>:<token secret>). Once the checks pass it is sealed to your devices, or with --no-sealed saved in this device's Cua credential store (Hetzner). |
Examples
cua cloud test aws
cua cloud test gcp --project my-projectcua cloud disconnect#
Forget a connected cloud. Refused while Spaces Cua created there still run (they would keep billing unseen); add --delete to delete everything Cua created there first, then disconnect.
cua cloud disconnect [OPTIONS] <PROVIDER>| Argument | Type | Default | Description |
|---|---|---|---|
<PROVIDER> | string | required | aws, azure, gcp, hetzner or modal. |
| Flag | Type | Default | Description |
|---|---|---|---|
--delete | boolean | false | Delete everything Cua created there first; disconnect only once the cloud confirms nothing is left. |
Examples
cua cloud disconnect aws
# delete everything Cua created in the account, then disconnect
cua cloud disconnect aws --deletecua cloud audit#
What Cua did in your clouds: connects, disconnects, and every resource recorded, created, confirmed and deleted (by you, a sweep, the automatic sweep or disconnect --delete). Newest last. Never shows a secret.
cua cloud audit [OPTIONS]| Flag | Type | Default | Description |
|---|---|---|---|
--limit | integer | 50 | How many of the newest entries (default 50). |
--cloud | string | Only this cloud (aws, gcp, hetzner, modal). |
Examples
cua cloud audit
cua cloud audit --limit 200
cua cloud audit --jsoncua cloud cost#
What the machines Cua created in your clouds cost: each one's list price times how long it ran, by Space, agent, UTC day or cloud. An estimate; the cloud's own bill is the final word.
cua cloud cost [OPTIONS]| Flag | Type | Default | Description |
|---|---|---|---|
--cloud | string | Only this cloud (aws, gcp, hetzner, modal). | |
--by | space | agent | day | cloud | space | One row per space, agent, day or cloud. |
--since | string | The first day counted, YYYY-MM-DD (UTC). Default: the first of this month. | |
--format | table | csv | json | table | table, csv (header: key,usd,hours,machines) or json. |
Examples
cua cloud cost
cua cloud cost --by agent --since 2026-10-01
cua cloud cost --cloud aws --by day --format csv > aws-october.csvcua cloud sweep#
Find what Cua left in your clouds: expired Spaces and resources whose Space is gone (with --all, every Cua resource). Lists them unless --delete. Only resources Cua tagged and recorded are ever touched.
cua cloud sweep [OPTIONS] [PROVIDER]| Argument | Type | Default | Description |
|---|---|---|---|
<PROVIDER> | string | optional | Only this cloud. |
| Flag | Type | Default | Description |
|---|---|---|---|
--delete | boolean | false | Delete what it finds (default: list only). |
--all | boolean | false | Include Cua resources that have not expired (every Space there). |
Examples
cua cloud sweep
cua cloud sweep aws --delete
cua cloud sweep --all --deletecua cloud add#
Add hosts in your cloud to your pool: computers made for Cua work that join by themselves (cua cloud add aws).
cua cloud add [OPTIONS] <COMMAND>Examples
cua cloud add aws --count 2 --type g6.xlarge --ttl-hours 6
cua cloud add aws --list
cua cloud add aws --downcua cloud add aws#
EC2 hosts in your connected AWS account (cua cloud connect aws) that join your pool by themselves: Ubuntu 24.04 for CPU types, the AWS Deep Learning Base GPU image for g*/p* types. Each one is dedicated (made only for this work: jobs run in its own Space, with its GPU) and powers off (and is terminated) at its TTL.
cua cloud add aws [OPTIONS]| Flag | Type | Default | Description |
|---|---|---|---|
--count | integer | 1 | How many hosts. |
--type | string | c7i.large | The EC2 instance type. GPU types (g*, p*) only when named here. |
--region | string | Region (default: the connected one). | |
--ttl-hours | integer | Hours until each host powers off and is terminated (default: the connection's, 8). | |
--tag | string | An extra key=value tag on every resource. Repeatable. | |
--disk-gb | integer | Root disk in GiB (default 60 for CPU types, 100 for GPU types). | |
--name | string | With --down: only this host (aws-3). | |
--no-wait | boolean | false | Return once the instances exist, without waiting for them to join. |
--list | boolean | false | The hosts cua cloud add aws made, their state and whether they joined. |
--down | boolean | false | Terminate the hosts cua cloud add aws made (all, or --name) and remove them from your pool. |
Examples
cua cloud add aws --count 2 --type c7i.large
cua cloud add aws --count 2 --type g6.xlarge --ttl-hours 6 --tag team=ml
cua cloud add aws --list
cua cloud add aws --downcua cloud plan#
What the elastic pool would do for some Spaces: where each goes (your devices first, then hosts with room, then new cloud machines at the least cost) and what it costs. Pins are constraints of the same solve. With --apply, adds the machines (then create the Spaces with --on auto).
cua cloud plan [OPTIONS]| Flag | Type | Default | Description |
|---|---|---|---|
--count | integer | 1 | How many Spaces. |
--image | string | Image (default linux). | |
--kind | string | container, vm or microvm. | |
--cpus | integer | vCPUs each. | |
--memory-mb | integer | Memory each, MiB. | |
--caller | string | interactive, batch, compat or persistent_agent. | |
--duration-secs | integer | Expected lifetime, seconds. | |
--provider | string | Only this cloud. | |
--region | string | Only this region. | |
--instance-type | string | Only this machine type. | |
--hosts | integer | Exactly this many new machines. | |
--max-per-hour | number | A $/hour cap for this plan. | |
--together | boolean | false | Keep them on one machine (forks of one checkpoint). |
--no-scale | boolean | false | Add no machines. |
--devices-only | boolean | false | Only your own devices. |
--apply | boolean | false | Add the machines the plan needs. |
Examples
cua cloud plan --count 256 --image linux:24.04-slim --caller batch --duration-secs 1800
cua cloud plan --count 20 --provider aws --instance-type c7g.xlarge --json
cua cloud plan --count 64 --no-scale
cua cloud plan --count 32 --applycua cloud hosts#
The hosts the elastic pool runs in your clouds: add them by hand (pinned: the scaler never removes them), list or remove them.
cua cloud hosts [OPTIONS] <COMMAND>cua cloud hosts list#
The hosts with their state and cost.
cua cloud hosts list [OPTIONS]Alias: cua cloud hosts ls.
Examples
cua cloud hosts lscua cloud hosts add#
Add hosts by hand (pinned: never removed by the scaler).
cua cloud hosts add [OPTIONS] --provider <PROVIDER> --type <INSTANCE_TYPE>| Flag | Type | Default | Description |
|---|---|---|---|
--provider | string | required | aws, gcp or hetzner. |
--type | string | required | Machine type (cua cloud plan --json lists the offers). |
--region | string | Region (default: the connection's). | |
--count | integer | 1 | How many. |
--ttl-hours | integer | Hours until each ends on its own (1 to 168, default 24). |
Examples
cua cloud hosts add --provider hetzner --type cax41 --region fsn1
cua cloud hosts add --provider aws --type c7g.xlarge --count 2 --ttl-hours 4cua cloud hosts remove#
Remove hosts this home added (their Spaces end).
cua cloud hosts remove [OPTIONS] <NAMES>...Alias: cua cloud hosts rm.
| Argument | Type | Default | Description |
|---|---|---|---|
<NAMES>... | string | required | Their names (hetzner-1). Repeatable. |
Examples
cua cloud hosts rm hetzner-1
cua cloud hosts rm aws-1 aws-2cua cloud budget#
The elastic pool's budget: a $/hour cap, a monthly cap, the autoscale switch. Without flags, shows them and what the clouds cost now.
cua cloud budget [OPTIONS]| Flag | Type | Default | Description |
|---|---|---|---|
--max-per-hour | number | Most USD per hour your clouds may cost at once. | |
--monthly | number | Most USD per calendar month on elastic hosts. | |
--autoscale | string | on or off: add and remove cloud hosts by itself. Off, you manage machines: --on auto uses only what runs, and --on <cloud> gives each Space a cloud machine of its own. | |
--max-new-hosts | integer | Most hosts one placement adds. | |
--warm | string | on or off: keep an idle host warm when demand predicts a Space soon. | |
--allow-metal | string | on or off: let one small VM Space buy a KVM metal host (dollars an hour). Off, such a request is refused and says so. |
Examples
cua cloud budget
cua cloud budget --max-per-hour 2 --monthly 40
cua cloud budget --autoscale offcua cloud reconcile#
Run the elastic pool's scale-in pass now (the daemon runs one every 30 s): idle hosts go at the end of their paid time.
cua cloud reconcile [OPTIONS]| Flag | Type | Default | Description |
|---|---|---|---|
--watch | boolean | false | Keep running a pass every 30 s. |
Examples
cua cloud reconcile
cua cloud reconcile --watchExit 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. |