Skip to content

CLI

Install with pip install 'zoo-sdk[cli]', then run zoo login. ZOO_URL and ZOO_API_KEY override the stored login; ZOO_WORKSPACE selects a workspace.

Store the server URL and an API key in ~/.config/zoo/config.toml.

zoo login [--url VALUE] [--api-key VALUE]
Argument / optionTypeDefaultDescription
--urlstr'http://localhost:8000'The API’s URL.
--api-keystr''From Settings → API keys.

Create a sandbox.

zoo create [--kind VALUE] [--name VALUE] [--label VALUE] [--wait/--no-wait] [--json]
Argument / optionTypeDefaultDescription
--kindstr'desktop'desktop, code, browser, macos or windows.
--namestr | NoneNoneA name; one is made up by default.
--labellist[str][]key=value; repeat for more.
--wait/--no-waitboolTrueWait until it runs.
--jsonboolFalsePrint JSON.

List sandboxes.

zoo ls [--label VALUE] [--json]
Argument / optionTypeDefaultDescription
--labellist[str][]Only those with key=value; repeat for more.
--jsonboolFalsePrint JSON.

Run a command in a sandbox, streaming its output; exits with the command’s exit code.

zoo exec SANDBOX_ID -- COMMAND... [--timeout VALUE]
Argument / optionTypeDefaultDescription
SANDBOX_IDstrrequired
COMMAND...list[str]requiredThe command, after —.
--timeoutint300Seconds before it is stopped (at most 300).

An interactive shell in a sandbox (Linux).

zoo shell SANDBOX_ID
Argument / optionTypeDefaultDescription
SANDBOX_IDstrrequired

Open a sandbox’s live screen in the browser (through a short-lived viewer link).

zoo view SANDBOX_ID [--control/--no-control] [--minutes VALUE] [--print]
Argument / optionTypeDefaultDescription
SANDBOX_IDstrrequired
--control/--no-controlboolTrueAllow typing and clicking, not just watching.
--minutesint60How long the link works.
--printboolFalsePrint the link instead of opening it.

Copy a file into (./a :b) or out of (:b ./a) a sandbox. Remote paths are relative to its home.

zoo cp SOURCE DESTINATION
Argument / optionTypeDefaultDescription
SOURCEstrrequired
DESTINATIONstrrequired

A sandbox’s recent tool calls and, with -f, its events (state changes) as they happen.

zoo logs SANDBOX_ID [--follow] [--limit VALUE] [--json]
Argument / optionTypeDefaultDescription
SANDBOX_IDstrrequired
--follow, -fboolFalseThen follow its events.
--limitint20How many recent tool calls.
--jsonboolFalsePrint JSON.

Delete sandboxes.

zoo rm SANDBOX_IDS... [--wait/--no-wait]
Argument / optionTypeDefaultDescription
SANDBOX_IDS...list[str]required
--wait/--no-waitboolFalseWait until it’s gone.

List database backups in object storage (admin only).

zoo backups [--json]
Argument / optionTypeDefaultDescription
--jsonboolFalsePrint JSON.

zoo backups [--json] lists existing backups through GET /v1/admin/backups with an admin key. There is no restore CLI or live destructive restore API. Restore remains a deliberate offline administrator operation with API, worker and gateway stopped; see backups. Use docker compose or helm directly for deployment and upgrades, not sandbox CLI server commands. See upgrading and the install guide.