Spaces
Your Spaces, and a cua-spacesd by URL.
| Command | Description |
|---|---|
cua spaces | Spaces: registered ones and your computers on the relay. |
cua spaces ls | Registered Spaces and your computers on the relay. |
cua spaces add | Register a Space after a capabilities handshake with its cua-spacesd (or, for another URL, an MCP initialize). |
cua spaces create | Create Spaces: on this computer, on one of your computers that provides Spaces (cua host setup --share spaces there), or in your own cloud account. |
cua spaces prewarm | Keep Spaces of one image ready where the elastic pool puts them, so the next creates of that shape start in a fraction of a second (--list shows the prewarms, --remove ID ends one). |
cua spaces egress | Choose which destinations a Space may reach: block some, or block everything except a few. |
cua spaces children | Let a Space make child Spaces of its own, or stop it. |
cua spaces budget | Show or set a tree's budget: how many child Spaces, vCPUs and memory its children may hold at once, and what they may cost. |
cua spaces orphans | List child Spaces whose parent is gone or out of reach. |
cua spaces service | Keep a command running in a Space: started again when it exits or fails its health check (with a backoff), started when the Space boots, its output kept in a log file in the Space. |
cua spaces service add | Keep a command running (replaces a service of that name). |
cua spaces service ls | List a Space's services. |
cua spaces service logs | Show the end of a service's log. |
cua spaces service start | Start a stopped service. |
cua spaces service stop | Stop a service and keep it stopped. |
cua spaces service restart | Restart a service. |
cua spaces service rm | Stop a service and forget it. |
cua spaces cancel | Cancel a create that is still running (here, in the daemon, or in another terminal): it stops and what it made is removed. |
cua spaces gpus | The GPU options each runtime offers on this computer (or in your own cloud account). |
cua spaces delete | Delete a Space's sandbox (on this computer, on the computer that provides it, or in your own cloud account) and forget it (asks first). |
cua spaces stop | Turn a Space off: a local VM (QEMU or Lume) or a Space one of your computers provides is stopped, keeping its disk and freeing its memory, and so is a Space in your own cloud (--on aws, gcp: compute billing stops; hetzner: still billed). |
cua spaces suspend | Suspend a local Space (a container or QEMU VM): its memory is kept, and stays in use, so it resumes where it was with cua spaces start. |
cua spaces resize | Give a local VM Space more or fewer vCPUs, more or less memory, or a bigger disk. |
cua spaces start | Turn a Space back on: resume a suspended one or boot a stopped one. |
cua spaces rm | Forget a registered Space and its stored token. |
cua spaces default | Your default Space: where "my Space" goes when you do not say. |
cua spaces rename | Give a Space a new name; its id stays the same. |
cua spaces set | Change a setting of a Space. |
cua spaces share | Let someone in your team watch (viewer) or use (editor) a Space, through the relay. |
cua spaces unshare | Stop sharing a Space with one account at once, or with everyone. |
cua spaces shares | Who a Space is shared with, and who of them is connected now. |
cua spaces relay-register | Publish a Space on the relay for your other devices (a phone off this network): its own driver dials out, as cua host setup does for this computer. |
cua spaces relay-unregister | Take a Space off the relay (every share with it ends). |
cua spacesd | Talk to a cua-spacesd directly by URL. |
cua spacesd caps | Print capabilities. |
cua spacesd exec | Run a command (argv, no shell). |
cua spacesd cp | Copy files: cua spacesd cp <URL> local :remote uploads, cua spacesd cp <URL> :remote local downloads. |
cua spacesd shell | Interactive shell (PTY). |
cua spacesd targets | List streamable targets (displays, and windows with --windows). |
cua spacesd call | Call any cua.env.v1 RPC with a proto3-JSON body. |
Every command also accepts the global options.
cua spaces#
Spaces: registered ones and your computers on the relay.
cua spaces [OPTIONS] <COMMAND>cua spaces ls#
Registered Spaces and your computers on the relay.
CPU, MEMORY and the DISK column (on this computer) show what each Space was given and what it uses now (the numbers the Cua Spaces app shows); for another of your computers they show what it last reported. Numbers only: no file names.
cua spaces ls [OPTIONS]Alias: cua spaces list.
| Flag | Type | Default | Description |
|---|---|---|---|
--label | string | Only Spaces with this label (key=value; repeat to require several). Repeatable. | |
--no-size | boolean | false | Do not measure what each Space takes on this computer's disk (that walk can take a moment with many Spaces). |
--tree | boolean | false | List child Spaces under their parent, indented (otherwise the parent's row counts them). |
Examples
cua spaces ls
cua spaces ls --no-size
cua spaces ls --json
# Only the Spaces created with these labels
cua spaces ls --label team=research --label run=7cua spaces add#
Register a Space after a capabilities handshake with its cua-spacesd (or, for another URL, an MCP initialize). Re-adding an address updates it. The token is stored apart from the registry, 0600.
cua spaces add [OPTIONS] <URL>| Argument | Type | Default | Description |
|---|---|---|---|
<URL> | string | required | The Space's cua-spacesd (http(s)://host:port, host:port, default port 3211), a Space id (local:<name>), or any MCP endpoint URL. |
| Flag | Type | Default | Env var | Description |
|---|---|---|---|---|
--token | string | CUA_ENV_TOKEN | spacesd token (or the bearer an MCP endpoint needs). | |
--name | string | Display name (default: the guest's hostname). | ||
--service | string | For an MCP endpoint URL: the service name to register it under (default mcp). | ||
--host | boolean | false | It is a computer that provides Spaces over its direct address (Tailscale or LAN): --on host:<name> finds it without the relay. Its token is stored like any direct Space's. |
Examples
cua spaces add 10.0.0.5:3211 --token "$TOKEN" --name studio
cua spaces add local:my-sandbox
cua spaces add http://127.0.0.1:8765/mcp --service tools
# A computer that provides Spaces over Tailscale, without the relay (`cua host setup --direct ... --share both` on it prints this)
cua spaces add 100.101.102.103:3211 --host --name "Mac mini (spare)" --token "$TOKEN"cua spaces create#
Create Spaces: on this computer, on one of your computers that provides Spaces (cua host setup --share spaces there), or in your own cloud account.
cua spaces create [OPTIONS] [IMAGE]| Argument | Type | Default | Description |
|---|---|---|---|
<IMAGE> | string | optional | Image: an alias (linux, macos, macos:26) or a registry reference. Default: the canonical Linux image. |
| Flag | Type | Default | Description |
|---|---|---|---|
--on | string | Where: local, auto (the least-loaded of your computers), aws, gcp, modal, host:<computer>, or a computer name (mac-mini, "spare mac mini"). Default: your default location (local unless set). | |
--count | integer | 1 | How many (1 to 8). |
--name | string | Name (with --count, -2, -3, ... are appended). | |
--kind | string | auto | container | vm | microvm. | |
--runtime | string | auto, or an engine the location offers (lume, runc, gvisor, qemu). | |
--cpus | integer | vCPUs. | |
--memory-mb | integer | Memory in MiB. | |
--disk-gb | integer | Grow a VM's disk to this many GiB. | |
--gpu | string | A GPU: the runtime's own (--gpu), or an option cua spaces gpus lists. macOS VMs: GPU acceleration (experimental, Apple silicon; https://cua.ai/docs/lume/guides/gpu-passthrough). | |
--instance-type | string | The cloud machine type of the pool host it runs on (with --on <cloud> or --on auto; default: the pool picks). | |
--region | string | The cloud region or location of that host (default: the pool picks, near you). | |
--volume | string | Mount a named volume of Cua Volume in the Space: NAME:PATH[:ro|:rw], or NAME/SUBFOLDER:PATH[:ro|:rw] for a folder of it. With Secure Spaces on it is read-only unless you add :rw. Repeat for several. Make one with cua volume named create. Repeatable. | |
--label | string | A label to keep with the Space (key=value; repeat for more; up to 64, keys up to 63 bytes, values up to 256, none empty). Not with --durable. Repeatable. | |
--network | string | Its network: internet (the default: the internet and its own tree; this computer, your local network, cloud metadata and other trees are blocked), none, localhost:5432,3000 (also this computer's localhost on those ports), lan (also your local network), custom / custom:none (with --allow/--deny), or unprotected (No protection). Enforced by the host, outside the guest. See cua network. | |
--deny | string | Block this destination (IP, CIDR or all; repeat for more). Alias: --egress-deny. Repeatable. | |
--allow | string | Allow this destination, also where a block covers it (IP or CIDR; repeat for more). This computer itself opens only with --network localhost:<ports>. Alias: --egress-allow. Repeatable. | |
--parent | string | Create it as a child of this Space: it joins the parent's tree (they reach each other) and its network is no more open than the parent's. With --parent, the children are deleted, stopped and suspended with it. | |
--durable | boolean | false | Keep it on your machines (with --on auto): when its machine goes away it is created again on another one, with the same name (its disk starts fresh). cua spaces delete <name> deletes it for good. |
--children | boolean | false | Let it make child Spaces of its own: cua, the SDKs and the agent's tools in it create, list and delete Spaces that belong to it, on this computer, never wider than it (cua spaces children). Agent runs turn this on by themselves. |
--forkable | boolean | false | A fork source (a "bake" Space): 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. |
--no-relay | boolean | false | Keep it off your cua.ai account. By default a Space running on a computer signed in and sharing is listed there, so your phone and your other computers see and open it (cua config set relay.spaces off turns that off for all of them). A child Space follows its parent. Same as --label cua.relay=off. |
--widen | boolean | false | With --parent: let its network be more open than its parent's (recorded on the Space). |
Examples
cua spaces create linux
# On the least-loaded of your machines
cua spaces create linux --on auto
# Two macOS VMs on your spare Mac mini (matched by name)
cua spaces create macos:26 --on "spare mac mini" --count 2
cua spaces create --on host:0123abcd4567ef89 linux --json
# Kept on your machines: created again on another one if its machine goes away
cua spaces create linux --on auto --durable --name research
# In your AWS account, on a pool host of exactly this type and region
cua spaces create linux --on aws --instance-type c7g.xlarge --region us-west-2
# Labels are kept with the Space; `cua spaces ls --label team=research` filters
cua spaces create linux --label team=research --label run=7cua spaces prewarm#
Keep Spaces of one image ready where the elastic pool puts them, so the next creates of that shape start in a fraction of a second (--list shows the prewarms, --remove ID ends one).
cua spaces prewarm [OPTIONS] [IMAGE]| Argument | Type | Default | Description |
|---|---|---|---|
<IMAGE> | string | optional | Image (an alias or a registry reference). |
| Flag | Type | Default | Description |
|---|---|---|---|
--count | integer | 1 | How many to keep ready (1 to 256). |
--on | string | Where: auto (default), local, a linked cloud or host:<machine>. | |
--ttl | string | How long to keep them (30m, 2h; default 1h, at most 7d). | |
--kind | string | auto | container | vm | microvm. | |
--cpus | integer | vCPUs each. | |
--memory-mb | integer | Memory each, MiB. | |
--instance-type | string | Only this cloud machine type. | |
--region | string | Only this cloud region. | |
--remove | string | End a prewarm (its ready Spaces go). | |
--list | boolean | false | List the prewarms and how many each keeps ready. |
Examples
cua spaces prewarm ghcr.io/trycua/linux:24.04-slim --count 16 --on aws --ttl 1h
cua spaces prewarm linux --count 4 --kind container --cpus 1 --memory-mb 512
cua spaces prewarm --list
cua spaces prewarm --remove pw-1a2b3ccua spaces egress#
Choose which destinations a Space may reach: block some, or block everything except a few. The machine the Space runs on enforces it, outside the guest (nothing in the guest, root included, can change it). Replaces the whole policy at once; --clear removes it. By IP address or CIDR (all is every address), not by hostname. DNS works only while the resolver the guest uses is not blocked.
.
Everything is allowed unless a rule says otherwise: every --deny entry blocks that destination, and every --allow entry is an exception that wins over a --deny. --allow alone blocks nothing. Loopback, replies to connections made to the Space and IPv6 neighbor discovery are never filtered. Containers (runc, gVisor), and QEMU and Firecracker VMs on Linux take a policy; macOS VMs, Apple Containerization, Cua Cloud and your own cloud accounts refuse one and say why.
cua spaces egress [OPTIONS] <SPACE>| Argument | Type | Default | Description |
|---|---|---|---|
<SPACE> | string | required | Space id or name. |
| Flag | Type | Default | Description |
|---|---|---|---|
--deny | string | A destination to block (IPv4/IPv6 address, CIDR or all; repeat for more). Repeatable. | |
--allow | string | A destination that stays reachable where --deny blocks it (repeat for more). Repeatable. | |
--clear | boolean | false | Remove the policy. |
Examples
# Block one network
cua spaces egress studio --deny 10.0.0.0/8
# Only 1.1.1.1 and one network stay reachable
cua spaces egress studio --deny all --allow 1.1.1.1 --allow 203.0.113.0/24
# Back to unrestricted
cua spaces egress studio --clearcua spaces children#
Let a Space make child Spaces of its own, or stop it. While on, cua, the SDKs and the agent's tools inside it create, list and delete Spaces that belong to it: on this computer, with its egress rules, ending no later than it, through a channel only it can reach. Off ends its capability at once; children it made keep running until deleted or their lifetime ends.
cua spaces children [OPTIONS] <SPACE> <STATE>| Argument | Type | Default | Description |
|---|---|---|---|
<SPACE> | string | required | Space id or name. |
<STATE> | on | off | required | on or off. |
Examples
cua spaces children studio on
cua spaces children studio offcua spaces budget#
Show or set a tree's budget: how many child Spaces, vCPUs and memory its children may hold at once, and what they may cost. A child that does not fit is refused with what is left. Without flags it shows the budget and what the children use.
cua spaces budget [OPTIONS] <SPACE>| Argument | Type | Default | Description |
|---|---|---|---|
<SPACE> | string | required | Any Space of the tree (id or name). |
| Flag | Type | Default | Description |
|---|---|---|---|
--spaces | integer | Child Spaces at once (default 16). | |
--cpus | integer | vCPUs at once (default 16). | |
--memory | integer | Memory at once, in MiB (default 32768). | |
--usd-per-hour | number | Cost per hour in linked clouds, in dollars (default 2). | |
--usd-total | number | Cost in total, in dollars (default: none). | |
--clear | boolean | false | Back to the defaults. |
Examples
cua spaces budget studio
cua spaces budget studio --spaces 32 --cpus 64 --memory 131072
cua spaces budget studio --usd-per-hour 5 --usd-total 50
cua spaces budget studio --clearcua spaces orphans#
List child Spaces whose parent is gone or out of reach. The daemon ends a child only on proof its parent is gone, after a grace period; the others stay until you delete them or their lifetime ends.
cua spaces orphans [OPTIONS]Examples
cua spaces orphanscua spaces service#
Keep a command running in a Space: started again when it exits or fails its health check (with a backoff), started when the Space boots, its output kept in a log file in the Space.
cua spaces service [OPTIONS] <COMMAND>cua spaces service add#
Keep a command running (replaces a service of that name).
cua spaces service add [OPTIONS] <SPACE> <NAME> -- <COMMAND>...| Argument | Type | Default | Description |
|---|---|---|---|
<SPACE> | string | required | Space id or name. |
<NAME> | string | required | Service name (lowercase letters, digits, -, _, .). |
<COMMAND>... | string | required | The command (after --). Repeatable. |
| Flag | Type | Default | Description |
|---|---|---|---|
--restart | always | on-failure | never | always | When to start it again: always, on-failure or never. |
--http | string | Health check: a URL that answers 2xx or 3xx. | |
--tcp | string | Health check: host:port that accepts a connection. | |
--check | string | Health check: a shell command that exits 0 when healthy. | |
--env | string | KEY=VALUE for its environment (repeat for more). Repeatable. | |
--cwd | string | Working directory in the Space. | |
--no-boot | boolean | false | Do not start it when the Space boots. |
Examples
cua spaces service add studio web -- python3 -m http.server 8080
cua spaces service add studio web --http http://127.0.0.1:8080/ -- python3 -m http.server 8080
cua spaces service add studio job --restart on-failure -- ./run.shcua spaces service ls#
List a Space's services.
cua spaces service ls [OPTIONS] <SPACE>| Argument | Type | Default | Description |
|---|---|---|---|
<SPACE> | string | required | Space id or name. |
Examples
cua spaces service ls studiocua spaces service logs#
Show the end of a service's log.
cua spaces service logs [OPTIONS] <SPACE> <NAME>| Argument | Type | Default | Description |
|---|---|---|---|
<SPACE> | string | required | Space id or name. |
<NAME> | string | required | Service name. |
| Flag | Type | Default | Description |
|---|---|---|---|
--tail | integer | 65536 | Bytes from the end. |
Examples
cua spaces service logs studio webcua spaces service start#
Start a stopped service.
cua spaces service start [OPTIONS] <SPACE> <NAME>| Argument | Type | Default | Description |
|---|---|---|---|
<SPACE> | string | required | Space id or name. |
<NAME> | string | required | Service name. |
Examples
cua spaces service start studio webcua spaces service stop#
Stop a service and keep it stopped.
cua spaces service stop [OPTIONS] <SPACE> <NAME>| Argument | Type | Default | Description |
|---|---|---|---|
<SPACE> | string | required | Space id or name. |
<NAME> | string | required | Service name. |
Examples
cua spaces service stop studio webcua spaces service restart#
Restart a service.
cua spaces service restart [OPTIONS] <SPACE> <NAME>| Argument | Type | Default | Description |
|---|---|---|---|
<SPACE> | string | required | Space id or name. |
<NAME> | string | required | Service name. |
Examples
cua spaces service restart studio webcua spaces service rm#
Stop a service and forget it.
cua spaces service rm [OPTIONS] <SPACE> <NAME>| Argument | Type | Default | Description |
|---|---|---|---|
<SPACE> | string | required | Space id or name. |
<NAME> | string | required | Service name. |
Examples
cua spaces service rm studio webcua spaces cancel#
Cancel a create that is still running (here, in the daemon, or in another terminal): it stops and what it made is removed. Finished image downloads stay cached. Ctrl-C during cua spaces create does the same.
cua spaces cancel [OPTIONS] <SPACE>| Argument | Type | Default | Description |
|---|---|---|---|
<SPACE> | string | required | The id the Space will have (local:<name>, printed when the create starts) or its name. |
Examples
cua spaces cancel local:space-1a2b3c
cua spaces cancel studiocua spaces gpus#
The GPU options each runtime offers on this computer (or in your own cloud account).
cua spaces gpus [OPTIONS]| Flag | Type | Default | Description |
|---|---|---|---|
--on | string | local (default), aws, gcp or modal. |
Examples
cua spaces gpus
cua spaces gpus --jsoncua spaces delete#
Delete a Space's sandbox (on this computer, on the computer that provides it, or in your own cloud account) and forget it (asks first).
cua spaces delete [OPTIONS] <SPACE>| Argument | Type | Default | Description |
|---|---|---|---|
<SPACE> | string | required | Space id or name. |
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--force | -f | boolean | false | Skip the confirmation (required without a terminal). |
--keep-children | boolean | false | Keep its child Spaces: they become top-level Spaces and keep running (otherwise they are deleted first). |
Examples
cua spaces delete relay:space-0123456789abcdef
cua spaces delete local:studio --forcecua spaces stop#
Turn a Space off: a local VM (QEMU or Lume) or a Space one of your computers provides is stopped, keeping its disk and freeing its memory, and so is a Space in your own cloud (--on aws, gcp: compute billing stops; hetzner: still billed). A local container is stopped or suspended as its runtime can. cua spaces suspend keeps a local Space's memory instead. Modal sandboxes and Spaces added by address cannot be turned off.
cua spaces stop [OPTIONS] <SPACE>| Argument | Type | Default | Description |
|---|---|---|---|
<SPACE> | string | required | Space id or name. |
Examples
cua spaces stop local:studio
cua spaces stop relay:space-0123456789abcdef --jsoncua spaces suspend#
Suspend a local Space (a container or QEMU VM): its memory is kept, and stays in use, so it resumes where it was with cua spaces start. cua spaces stop frees the memory instead.
cua spaces suspend [OPTIONS] <SPACE>| Argument | Type | Default | Description |
|---|---|---|---|
<SPACE> | string | required | Space id or name. |
Examples
cua spaces suspend local:studiocua spaces resize#
Give a local VM Space more or fewer vCPUs, more or less memory, or a bigger disk. It shuts down and boots again from its own disk (a stopped one boots): its files stay, its running processes do not. A disk never shrinks.
cua spaces resize [OPTIONS] <SPACE>| Argument | Type | Default | Description |
|---|---|---|---|
<SPACE> | string | required | Space id or name. |
| Flag | Type | Default | Description |
|---|---|---|---|
--cpus | integer | vCPUs. | |
--memory-mb | integer | Memory in MiB. | |
--disk-gb | integer | Grow the disk to this many GiB. |
Examples
cua spaces resize local:builder --memory-mb 24576
cua spaces resize builder --cpus 8 --disk-gb 200 --jsoncua spaces start#
Turn a Space back on: resume a suspended one or boot a stopped one.
cua spaces start [OPTIONS] <SPACE>| Argument | Type | Default | Description |
|---|---|---|---|
<SPACE> | string | required | Space id or name. |
Examples
cua spaces start local:studio
cua spaces start studio --jsoncua spaces rm#
Forget a registered Space and its stored token. The sandbox keeps running. A Space cua created (on this computer or in a cloud) is refused while its sandbox exists: use cua spaces delete (or stop). The relay:<computer> record of a Space that registered itself and is gone (not connected) also leaves your relay directory.
cua spaces rm [OPTIONS] <SPACE>Alias: cua spaces remove.
| Argument | Type | Default | Description |
|---|---|---|---|
<SPACE> | string | required | Space id, address or display name (as cua spaces ls shows). |
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--delete-spaces | boolean | false | For one of your computers: also delete the Spaces it provides and their files (through the computer while it is reachable). Without it they stay on your account, detached, and come back if the computer is added again. | |
--yes | -y | boolean | false | Remove a computer without asking. |
Examples
cua spaces rm direct:10.0.0.5:3211
cua spaces rm studiocua spaces default#
Your default Space: where "my Space" goes when you do not say. With no argument it prints the Space it resolves to now and the order it tries (online or not); with a Space it sets the default.
cua spaces default [OPTIONS] [SPACE]| Argument | Type | Default | Description |
|---|---|---|---|
<SPACE> | string | optional | The Space to make your default: a name or id (as cua spaces ls shows). |
| Flag | Type | Default | Description |
|---|---|---|---|
--fallback | string | Spaces to try, in this order, when the default is offline (names or ids, comma separated). Repeatable. | |
--clear | boolean | false | Have no default. |
--no-fallback | boolean | false | When the default is offline, use this computer instead of trying the others. |
--fallback-on | boolean | false | Try the others again when the default is offline (every online computer, oldest first, unless --fallback names an order). |
Examples
cua spaces default
cua spaces default studio
cua spaces default studio --fallback office-pc,relay:0123abcd4567ef89
# Only the default, then this computer
cua spaces default --no-fallback
# Back to trying every online computer, oldest first
cua spaces default --fallback-on
cua spaces default --clearcua spaces rename#
Give a Space a new name; its id stays the same. Lowercase letters, digits and dashes, as at create. A Space you shared, or one of your computers provides, is renamed on the relay too, so your other devices and the people it is shared with see the new name. Only its owner can rename a Space.
cua spaces rename [OPTIONS] <SPACE> <NAME>| Argument | Type | Default | Description |
|---|---|---|---|
<SPACE> | string | required | Space id or name (as cua spaces ls shows). |
<NAME> | string | required | The new name. |
Examples
cua spaces rename local:studio design-review
cua spaces rename relay:space-0123456789abcdef ci-runnercua spaces set#
Change a setting of a Space. --clipboard says when its viewers may move the clipboard between this computer and the Space: viewing (the default) only while a viewer window is focused, when you paste or copy in it; ask asks for every transfer; off never. Viewers opened afterwards use it. An agent's own computer_clipboard_* tools act inside the Space and are not affected. --volume says what it sees of the Cua Volume: own (its own folder, the default) or off; it applies at once.
cua spaces set [OPTIONS] <SPACE>| Argument | Type | Default | Description |
|---|---|---|---|
<SPACE> | string | required | Space id or name (as cua spaces ls shows). |
| Flag | Type | Default | Description |
|---|---|---|---|
--clipboard | string | When viewers may move the clipboard: viewing, ask or off. | |
--volume | string | What it sees of the Cua Volume: own or off. |
Examples
cua spaces set local:studio --clipboard off
cua spaces set local:studio --clipboard viewing
cua spaces set local:studio --volume offcua spaces share#
Let someone in your team watch (viewer) or use (editor) a Space, through the relay. They open it as relay:<computer>. Sharing is for teams: you need a team, and they must be in it (or share with the whole team as team:<id>).
cua spaces share [OPTIONS] <SPACE> <WHO>| Argument | Type | Default | Description |
|---|---|---|---|
<SPACE> | string | required | Space id, address or display name. |
<WHO> | string | required | Their email (verified by cua.ai) or account id, in your team; or team:<id> for the whole team. |
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--role | viewer | editor | viewer | viewer: presence and a view-only stream. editor: full use. | |
--yes | -y | boolean | false | Confirm without a terminal prompt. Without a daemon the share happens at once. A running daemon still asks with Touch ID or your password on this computer; without a terminal, --yes says someone will answer there (otherwise the command fails at once instead of waiting for a prompt nobody sees). |
Examples
cua spaces share local:studio bob@example.com
cua spaces share local:studio bob@example.com --role editor
cua spaces share relay:0123abcd4567ef89 acct-42 --role viewer
# The whole team, to watch
cua spaces share local:studio team:acme --role viewer
# From a script or agent: confirm with Touch ID or your password here
cua spaces share local:studio bob@example.com --yescua spaces unshare#
Stop sharing a Space with one account at once, or with everyone.
cua spaces unshare [OPTIONS] <SPACE> [WHO]| Argument | Type | Default | Description |
|---|---|---|---|
<SPACE> | string | required | Space id, address or display name. |
<WHO> | string | optional | Their email or account id. |
| Flag | Type | Default | Description |
|---|---|---|---|
--all | boolean | false | Stop sharing with everyone (the Space leaves the relay). |
Examples
cua spaces unshare local:studio bob@example.com
cua spaces unshare local:studio --allcua spaces shares#
Who a Space is shared with, and who of them is connected now.
cua spaces shares [OPTIONS] <SPACE>| Argument | Type | Default | Description |
|---|---|---|---|
<SPACE> | string | required | Space id, address or display name. |
Examples
cua spaces shares local:studio
cua spaces shares local:studio --jsoncua spaces relay-register#
Publish a Space on the relay for your other devices (a phone off this network): its own driver dials out, as cua host setup does for this computer. Nobody else gets in until you share it.
cua spaces relay-register [OPTIONS] <SPACE>| Argument | Type | Default | Description |
|---|---|---|---|
<SPACE> | string | required | Space id, address or display name. |
Examples
cua spaces relay-register local:studiocua spaces relay-unregister#
Take a Space off the relay (every share with it ends). With a relay:<computer> id, removes that computer's record from your relay directory: a Space that registered itself (also after it was deleted), or a computer of yours that is gone. Only its owner can.
cua spaces relay-unregister [OPTIONS] <SPACE>| Argument | Type | Default | Description |
|---|---|---|---|
<SPACE> | string | required | Space id, address or display name. |
Examples
cua spaces relay-unregister local:studio
cua spaces relay-unregister relay:space-0123abcd4567ef89cua spacesd#
Talk to a cua-spacesd directly by URL.
cua spacesd [OPTIONS] <COMMAND>cua spacesd caps#
Print capabilities.
cua spacesd caps [OPTIONS] <URL>| Argument | Type | Default | Description |
|---|---|---|---|
<URL> | string | required | spacesd URL (http://host:port). |
| Flag | Type | Default | Env var | Description |
|---|---|---|---|---|
--token | string | CUA_ENV_TOKEN | spacesd token. |
Examples
cua spacesd caps http://127.0.0.1:3211cua spacesd exec#
Run a command (argv, no shell).
cua spacesd exec [OPTIONS] <URL> <COMMAND>...| Argument | Type | Default | Description |
|---|---|---|---|
<URL> | string | required | spacesd URL (http://host:port). |
<COMMAND>... | string | required | Program and arguments. Repeatable. |
| Flag | Short | Type | Default | Env var | 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). | |||
--token | string | CUA_ENV_TOKEN | spacesd token. | ||
--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). |
Examples
cua spacesd exec http://127.0.0.1:3211 uname -a
# A long-lived stdio stream (stdin forwarded, no time limit, killed with this command)
cua spacesd exec -i http://127.0.0.1:3211 catcua spacesd cp#
Copy files: cua spacesd cp <URL> local :remote uploads, cua spacesd cp <URL> :remote local downloads.
cua spacesd cp [OPTIONS] <URL> <SRC> <DST>| Argument | Type | Default | Description |
|---|---|---|---|
<URL> | string | required | spacesd URL (http://host:port). |
<SRC> | string | required | Source: a local path, or :/guest/path. |
<DST> | string | required | Destination: a local path, or :/guest/path. |
| Flag | Type | Default | Env var | Description |
|---|---|---|---|---|
--token | string | CUA_ENV_TOKEN | spacesd token. |
Examples
# Upload
cua spacesd cp http://127.0.0.1:3211 ./notes.txt :/tmp/notes.txt
# Download
cua spacesd cp http://127.0.0.1:3211 :/tmp/notes.txt ./notes.txtcua spacesd shell#
Interactive shell (PTY).
cua spacesd shell [OPTIONS] <URL>| Argument | Type | Default | Description |
|---|---|---|---|
<URL> | string | required | spacesd URL (http://host:port). |
| Flag | Type | Default | Env var | Description |
|---|---|---|---|---|
--token | string | CUA_ENV_TOKEN | spacesd token. |
Examples
cua spacesd shell http://127.0.0.1:3211cua spacesd targets#
List streamable targets (displays, and windows with --windows).
cua spacesd targets [OPTIONS] <URL>| Argument | Type | Default | Description |
|---|---|---|---|
<URL> | string | required | spacesd URL (http://host:port). |
| Flag | Type | Default | Env var | Description |
|---|---|---|---|---|
--token | string | CUA_ENV_TOKEN | spacesd token. | |
--windows | boolean | false | Include window targets. |
Examples
cua spacesd targets http://127.0.0.1:3211 --windowscua spacesd call#
Call any cua.env.v1 RPC with a proto3-JSON body.
cua spacesd call [OPTIONS] <URL> <METHOD> [BODY]| Argument | Type | Default | Description |
|---|---|---|---|
<URL> | string | required | spacesd URL (http://host:port). |
<METHOD> | string | required | Service/Method. |
<BODY> | string | {} | Request body (proto3 JSON). |
| Flag | Type | Default | Env var | Description |
|---|---|---|---|---|
--token | string | CUA_ENV_TOKEN | spacesd token. |
Examples
cua spacesd call http://127.0.0.1:3211 SystemService/GetCapabilitiesExit 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. |