Spaces

Your Spaces, and a cua-spacesd by URL.

CommandDescription
cua spacesSpaces: registered ones and your computers on the relay.
cua spaces lsRegistered Spaces and your computers on the relay.
cua spaces addRegister a Space after a capabilities handshake with its cua-spacesd (or, for another URL, an MCP initialize).
cua spaces createCreate 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 prewarmKeep 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 egressChoose which destinations a Space may reach: block some, or block everything except a few.
cua spaces childrenLet a Space make child Spaces of its own, or stop it.
cua spaces budgetShow 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 orphansList child Spaces whose parent is gone or out of reach.
cua spaces serviceKeep 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 addKeep a command running (replaces a service of that name).
cua spaces service lsList a Space's services.
cua spaces service logsShow the end of a service's log.
cua spaces service startStart a stopped service.
cua spaces service stopStop a service and keep it stopped.
cua spaces service restartRestart a service.
cua spaces service rmStop a service and forget it.
cua spaces cancelCancel a create that is still running (here, in the daemon, or in another terminal): it stops and what it made is removed.
cua spaces gpusThe GPU options each runtime offers on this computer (or in your own cloud account).
cua spaces deleteDelete 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 stopTurn 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 suspendSuspend 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 resizeGive a local VM Space more or fewer vCPUs, more or less memory, or a bigger disk.
cua spaces startTurn a Space back on: resume a suspended one or boot a stopped one.
cua spaces rmForget a registered Space and its stored token.
cua spaces defaultYour default Space: where "my Space" goes when you do not say.
cua spaces renameGive a Space a new name; its id stays the same.
cua spaces setChange a setting of a Space.
cua spaces shareLet someone in your team watch (viewer) or use (editor) a Space, through the relay.
cua spaces unshareStop sharing a Space with one account at once, or with everyone.
cua spaces sharesWho a Space is shared with, and who of them is connected now.
cua spaces relay-registerPublish 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-unregisterTake a Space off the relay (every share with it ends).
cua spacesdTalk to a cua-spacesd directly by URL.
cua spacesd capsPrint capabilities.
cua spacesd execRun a command (argv, no shell).
cua spacesd cpCopy files: cua spacesd cp <URL> local :remote uploads, cua spacesd cp <URL> :remote local downloads.
cua spacesd shellInteractive shell (PTY).
cua spacesd targetsList streamable targets (displays, and windows with --windows).
cua spacesd callCall 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.

FlagTypeDefaultDescription
--labelstringOnly Spaces with this label (key=value; repeat to require several). Repeatable.
--no-sizebooleanfalseDo not measure what each Space takes on this computer's disk (that walk can take a moment with many Spaces).
--treebooleanfalseList 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=7

cua 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>
ArgumentTypeDefaultDescription
<URL>stringrequiredThe Space's cua-spacesd (http(s)://host:port, host:port, default port 3211), a Space id (local:<name>), or any MCP endpoint URL.
FlagTypeDefaultEnv varDescription
--tokenstringCUA_ENV_TOKENspacesd token (or the bearer an MCP endpoint needs).
--namestringDisplay name (default: the guest's hostname).
--servicestringFor an MCP endpoint URL: the service name to register it under (default mcp).
--hostbooleanfalseIt 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]
ArgumentTypeDefaultDescription
<IMAGE>stringoptionalImage: an alias (linux, macos, macos:26) or a registry reference. Default: the canonical Linux image.
FlagTypeDefaultDescription
--onstringWhere: 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).
--countinteger1How many (1 to 8).
--namestringName (with --count, -2, -3, ... are appended).
--kindstringauto | container | vm | microvm.
--runtimestringauto, or an engine the location offers (lume, runc, gvisor, qemu).
--cpusintegervCPUs.
--memory-mbintegerMemory in MiB.
--disk-gbintegerGrow a VM's disk to this many GiB.
--gpustringA 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-typestringThe cloud machine type of the pool host it runs on (with --on <cloud> or --on auto; default: the pool picks).
--regionstringThe cloud region or location of that host (default: the pool picks, near you).
--volumestringMount 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.
--labelstringA 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.
--networkstringIts 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.
--denystringBlock this destination (IP, CIDR or all; repeat for more). Alias: --egress-deny. Repeatable.
--allowstringAllow 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.
--parentstringCreate 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.
--durablebooleanfalseKeep 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.
--childrenbooleanfalseLet 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.
--forkablebooleanfalseA 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-relaybooleanfalseKeep 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.
--widenbooleanfalseWith --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=7

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 prewarm [OPTIONS] [IMAGE]
ArgumentTypeDefaultDescription
<IMAGE>stringoptionalImage (an alias or a registry reference).
FlagTypeDefaultDescription
--countinteger1How many to keep ready (1 to 256).
--onstringWhere: auto (default), local, a linked cloud or host:<machine>.
--ttlstringHow long to keep them (30m, 2h; default 1h, at most 7d).
--kindstringauto | container | vm | microvm.
--cpusintegervCPUs each.
--memory-mbintegerMemory each, MiB.
--instance-typestringOnly this cloud machine type.
--regionstringOnly this cloud region.
--removestringEnd a prewarm (its ready Spaces go).
--listbooleanfalseList 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-1a2b3c

cua 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>
ArgumentTypeDefaultDescription
<SPACE>stringrequiredSpace id or name.
FlagTypeDefaultDescription
--denystringA destination to block (IPv4/IPv6 address, CIDR or all; repeat for more). Repeatable.
--allowstringA destination that stays reachable where --deny blocks it (repeat for more). Repeatable.
--clearbooleanfalseRemove 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 --clear

cua 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>
ArgumentTypeDefaultDescription
<SPACE>stringrequiredSpace id or name.
<STATE>on | offrequiredon or off.

Examples

cua spaces children studio on
cua spaces children studio off

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. 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>
ArgumentTypeDefaultDescription
<SPACE>stringrequiredAny Space of the tree (id or name).
FlagTypeDefaultDescription
--spacesintegerChild Spaces at once (default 16).
--cpusintegervCPUs at once (default 16).
--memoryintegerMemory at once, in MiB (default 32768).
--usd-per-hournumberCost per hour in linked clouds, in dollars (default 2).
--usd-totalnumberCost in total, in dollars (default: none).
--clearbooleanfalseBack 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 --clear

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

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 [OPTIONS] <COMMAND>

cua spaces service add#

Keep a command running (replaces a service of that name).

cua spaces service add [OPTIONS] <SPACE> <NAME> -- <COMMAND>...
ArgumentTypeDefaultDescription
<SPACE>stringrequiredSpace id or name.
<NAME>stringrequiredService name (lowercase letters, digits, -, _, .).
<COMMAND>...stringrequiredThe command (after --). Repeatable.
FlagTypeDefaultDescription
--restartalways | on-failure | neveralwaysWhen to start it again: always, on-failure or never.
--httpstringHealth check: a URL that answers 2xx or 3xx.
--tcpstringHealth check: host:port that accepts a connection.
--checkstringHealth check: a shell command that exits 0 when healthy.
--envstringKEY=VALUE for its environment (repeat for more). Repeatable.
--cwdstringWorking directory in the Space.
--no-bootbooleanfalseDo 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.sh

cua spaces service ls#

List a Space's services.

cua spaces service ls [OPTIONS] <SPACE>
ArgumentTypeDefaultDescription
<SPACE>stringrequiredSpace id or name.

Examples

cua spaces service ls studio

cua spaces service logs#

Show the end of a service's log.

cua spaces service logs [OPTIONS] <SPACE> <NAME>
ArgumentTypeDefaultDescription
<SPACE>stringrequiredSpace id or name.
<NAME>stringrequiredService name.
FlagTypeDefaultDescription
--tailinteger65536Bytes from the end.

Examples

cua spaces service logs studio web

cua spaces service start#

Start a stopped service.

cua spaces service start [OPTIONS] <SPACE> <NAME>
ArgumentTypeDefaultDescription
<SPACE>stringrequiredSpace id or name.
<NAME>stringrequiredService name.

Examples

cua spaces service start studio web

cua spaces service stop#

Stop a service and keep it stopped.

cua spaces service stop [OPTIONS] <SPACE> <NAME>
ArgumentTypeDefaultDescription
<SPACE>stringrequiredSpace id or name.
<NAME>stringrequiredService name.

Examples

cua spaces service stop studio web

cua spaces service restart#

Restart a service.

cua spaces service restart [OPTIONS] <SPACE> <NAME>
ArgumentTypeDefaultDescription
<SPACE>stringrequiredSpace id or name.
<NAME>stringrequiredService name.

Examples

cua spaces service restart studio web

cua spaces service rm#

Stop a service and forget it.

cua spaces service rm [OPTIONS] <SPACE> <NAME>
ArgumentTypeDefaultDescription
<SPACE>stringrequiredSpace id or name.
<NAME>stringrequiredService name.

Examples

cua spaces service rm studio web

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. Finished image downloads stay cached. Ctrl-C during cua spaces create does the same.

cua spaces cancel [OPTIONS] <SPACE>
ArgumentTypeDefaultDescription
<SPACE>stringrequiredThe 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 studio

cua spaces gpus#

The GPU options each runtime offers on this computer (or in your own cloud account).

cua spaces gpus [OPTIONS]
FlagTypeDefaultDescription
--onstringlocal (default), aws, gcp or modal.

Examples

cua spaces gpus
cua spaces gpus --json

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 delete [OPTIONS] <SPACE>
ArgumentTypeDefaultDescription
<SPACE>stringrequiredSpace id or name.
FlagShortTypeDefaultDescription
--force-fbooleanfalseSkip the confirmation (required without a terminal).
--keep-childrenbooleanfalseKeep 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 --force

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). 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>
ArgumentTypeDefaultDescription
<SPACE>stringrequiredSpace id or name.

Examples

cua spaces stop local:studio
cua spaces stop relay:space-0123456789abcdef --json

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 stop frees the memory instead.

cua spaces suspend [OPTIONS] <SPACE>
ArgumentTypeDefaultDescription
<SPACE>stringrequiredSpace id or name.

Examples

cua spaces suspend local:studio

cua 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>
ArgumentTypeDefaultDescription
<SPACE>stringrequiredSpace id or name.
FlagTypeDefaultDescription
--cpusintegervCPUs.
--memory-mbintegerMemory in MiB.
--disk-gbintegerGrow the disk to this many GiB.

Examples

cua spaces resize local:builder --memory-mb 24576
cua spaces resize builder --cpus 8 --disk-gb 200 --json

cua spaces start#

Turn a Space back on: resume a suspended one or boot a stopped one.

cua spaces start [OPTIONS] <SPACE>
ArgumentTypeDefaultDescription
<SPACE>stringrequiredSpace id or name.

Examples

cua spaces start local:studio
cua spaces start studio --json

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

ArgumentTypeDefaultDescription
<SPACE>stringrequiredSpace id, address or display name (as cua spaces ls shows).
FlagShortTypeDefaultDescription
--delete-spacesbooleanfalseFor 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-ybooleanfalseRemove a computer without asking.

Examples

cua spaces rm direct:10.0.0.5:3211
cua spaces rm studio

cua 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]
ArgumentTypeDefaultDescription
<SPACE>stringoptionalThe Space to make your default: a name or id (as cua spaces ls shows).
FlagTypeDefaultDescription
--fallbackstringSpaces to try, in this order, when the default is offline (names or ids, comma separated). Repeatable.
--clearbooleanfalseHave no default.
--no-fallbackbooleanfalseWhen the default is offline, use this computer instead of trying the others.
--fallback-onbooleanfalseTry 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 --clear

cua 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>
ArgumentTypeDefaultDescription
<SPACE>stringrequiredSpace id or name (as cua spaces ls shows).
<NAME>stringrequiredThe new name.

Examples

cua spaces rename local:studio design-review
cua spaces rename relay:space-0123456789abcdef ci-runner

cua 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>
ArgumentTypeDefaultDescription
<SPACE>stringrequiredSpace id or name (as cua spaces ls shows).
FlagTypeDefaultDescription
--clipboardstringWhen viewers may move the clipboard: viewing, ask or off.
--volumestringWhat 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 off

cua 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>
ArgumentTypeDefaultDescription
<SPACE>stringrequiredSpace id, address or display name.
<WHO>stringrequiredTheir email (verified by cua.ai) or account id, in your team; or team:<id> for the whole team.
FlagShortTypeDefaultDescription
--roleviewer | editorviewerviewer: presence and a view-only stream. editor: full use.
--yes-ybooleanfalseConfirm 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 --yes

cua spaces unshare#

Stop sharing a Space with one account at once, or with everyone.

cua spaces unshare [OPTIONS] <SPACE> [WHO]
ArgumentTypeDefaultDescription
<SPACE>stringrequiredSpace id, address or display name.
<WHO>stringoptionalTheir email or account id.
FlagTypeDefaultDescription
--allbooleanfalseStop sharing with everyone (the Space leaves the relay).

Examples

cua spaces unshare local:studio bob@example.com
cua spaces unshare local:studio --all

cua spaces shares#

Who a Space is shared with, and who of them is connected now.

cua spaces shares [OPTIONS] <SPACE>
ArgumentTypeDefaultDescription
<SPACE>stringrequiredSpace id, address or display name.

Examples

cua spaces shares local:studio
cua spaces shares local:studio --json

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. Nobody else gets in until you share it.

cua spaces relay-register [OPTIONS] <SPACE>
ArgumentTypeDefaultDescription
<SPACE>stringrequiredSpace id, address or display name.

Examples

cua spaces relay-register local:studio

cua 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>
ArgumentTypeDefaultDescription
<SPACE>stringrequiredSpace id, address or display name.

Examples

cua spaces relay-unregister local:studio
cua spaces relay-unregister relay:space-0123abcd4567ef89

cua spacesd#

Talk to a cua-spacesd directly by URL.

cua spacesd [OPTIONS] <COMMAND>

cua spacesd caps#

Print capabilities.

cua spacesd caps [OPTIONS] <URL>
ArgumentTypeDefaultDescription
<URL>stringrequiredspacesd URL (http://host:port).
FlagTypeDefaultEnv varDescription
--tokenstringCUA_ENV_TOKENspacesd token.

Examples

cua spacesd caps http://127.0.0.1:3211

cua spacesd exec#

Run a command (argv, no shell).

cua spacesd exec [OPTIONS] <URL> <COMMAND>...
ArgumentTypeDefaultDescription
<URL>stringrequiredspacesd URL (http://host:port).
<COMMAND>...stringrequiredProgram and arguments. Repeatable.
FlagShortTypeDefaultEnv varDescription
--userstringRun as this guest user.
--cwdstringStart in this guest directory.
--timeoutintegerStop the command after this many seconds (0: no limit).
--tokenstringCUA_ENV_TOKENspacesd token.
--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).

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 cat

cua 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>
ArgumentTypeDefaultDescription
<URL>stringrequiredspacesd URL (http://host:port).
<SRC>stringrequiredSource: a local path, or :/guest/path.
<DST>stringrequiredDestination: a local path, or :/guest/path.
FlagTypeDefaultEnv varDescription
--tokenstringCUA_ENV_TOKENspacesd 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.txt

cua spacesd shell#

Interactive shell (PTY).

cua spacesd shell [OPTIONS] <URL>
ArgumentTypeDefaultDescription
<URL>stringrequiredspacesd URL (http://host:port).
FlagTypeDefaultEnv varDescription
--tokenstringCUA_ENV_TOKENspacesd token.

Examples

cua spacesd shell http://127.0.0.1:3211

cua spacesd targets#

List streamable targets (displays, and windows with --windows).

cua spacesd targets [OPTIONS] <URL>
ArgumentTypeDefaultDescription
<URL>stringrequiredspacesd URL (http://host:port).
FlagTypeDefaultEnv varDescription
--tokenstringCUA_ENV_TOKENspacesd token.
--windowsbooleanfalseInclude window targets.

Examples

cua spacesd targets http://127.0.0.1:3211 --windows

cua spacesd call#

Call any cua.env.v1 RPC with a proto3-JSON body.

cua spacesd call [OPTIONS] <URL> <METHOD> [BODY]
ArgumentTypeDefaultDescription
<URL>stringrequiredspacesd URL (http://host:port).
<METHOD>stringrequiredService/Method.
<BODY>string{}Request body (proto3 JSON).
FlagTypeDefaultEnv varDescription
--tokenstringCUA_ENV_TOKENspacesd token.

Examples

cua spacesd call http://127.0.0.1:3211 SystemService/GetCapabilities

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.