CLI reference
This page lists every command of ons and its main flags. Every command also has --help with
examples, for example ons exec --help.
Global flags
Section titled “Global flags”These flags work with every command, anywhere before --.
| Flag | Effect |
|---|---|
--json |
Print one stable JSON object on stdout: {"ok": true, …}, or {"ok": false, "errors": [{"message", "fix"}]}. Diagnostics go to stderr. |
--api-url <url> |
Use this API URL instead of https://api.<domain>. |
--ca-file <pem> |
Trust only this PEM CA instead of the public web PKI, for a deployment with a private CA. |
-h, --help |
Print help. |
-V, --version |
Print the version. |
Environment variables
Section titled “Environment variables”| Variable | Effect |
|---|---|
ONS_API_KEY |
An API key. When set, it wins over the saved login. Use it in CI. |
ONS_DOMAIN |
The deployment’s domain. ons calls https://api.<domain>. A release of ons defaults to onshore.sh. An alpha build (any version with a suffix, such as 0.2.0-alpha.3) points at the development platform instead: set ONS_DOMAIN=onshore.sh, or pass ons login --domain onshore.sh. |
ONS_API_URL, ONS_CA_FILE |
The environment forms of --api-url and --ca-file (a flag wins). ons says on stderr when one of them chose the API or the CA it uses. A CA from ONS_CA_FILE replaces the public web PKI and is used only with ONS_API_KEY, never with the saved login. |
ONS_GATEWAY_URL |
Self-hosted runners only: the URL of your order gateway. See Hybrid. |
E2B_API_KEY, E2B_DOMAIN |
Read by the E2B SDKs, not by ons. Set E2B_DOMAIN=onshore.sh and E2B_API_KEY to your onshore.sh key. |
ons login saves the key and the domain in ~/.config/onshore/config.toml (mode 0600).
Exit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
0 |
Success. For exec, the command exited 0. |
1 |
ons failed. The error says why and what to do. |
2 |
Bad usage: an unknown flag or a missing argument. |
124 |
proc wait, agent wait, device add --wait or egress requests --wait: --timeout passed first. pause: the miniVM is still pausing after 10 minutes. |
255 |
exec, shell or proc wait could not run the command (network, auth, miniVM state), or a signal ended it. |
| other | exec, run, proc wait: the command’s own exit code. |
ons agent wait exits 0 idle or done, 10 needs input, 1 failed, 2 canceled, 3 paused
(the organization is out of credits or on hold), 4 stalled, 124 timeout, 255 when ons
itself failed. ons agent new exits 0 idle, 10 needs input, 1 failed, 2 canceled, 3 paused,
130 on Ctrl-C, 255 when ons itself failed.
In the commands below, <MINIVM_ID> is a miniVM’s id, as ons create printed it (ons ls lists
yours). See Agent runs for ons agent and
Run miniVMs on your own servers for ons pool, ons trust and ons keys.
ons also ships commands the managed service does not offer yet: disk snapshots (ons snapshot,
ons create --from-snapshot), ons fork, ons reset, open egress (ons egress open and close,
ons create --egress-open) and ons report. They are marked below.
Commands
Section titled “Commands”Generated from ons 0.2.0 --help. Run ons <command> --help for the help of the version you have.
ons login
Section titled “ons login”Sign in in the browser and save a new API key; —key saves one you paste instead
ons login [OPTIONS]| Option | Description |
|---|---|
--domain <DOMAIN> |
The deployment to log in to, stored for the next logins [default: ONS_DOMAIN, else the stored domain, else the channel’s: the dev domain for alpha, production for stable] |
--key |
Read an API key from a prompt or stdin (the default when stdin is not a terminal) |
--agent |
Sign in as an AI agent with its agent identity: the key lasts 1 hour, in its owner’s organization |
--org <ID> |
The organization the key belongs to, when you belong to several |
--paste |
Paste the address the browser ends on, when it runs on another machine |
Examples:
ons login approve in the browserons login --agent an AI agent signs in with its agent identityprintf '%s\n' "$ONS_API_KEY" | ons login --key save an API key read from stdinons login --domain <DOMAIN> another deploymentons create
Section titled “ons create”Create miniVMs and print their ids
ons create [OPTIONS]| Option | Description |
|---|---|
--template <TEMPLATE> |
The template to start from: a name, name:tag or template id (ons template ls) [default: base] |
--from-snapshot <SNAPSHOT_ID> |
Start from a disk snapshot (ons snapshot ls) instead of a template: the miniVM gets a copy of the snapshot’s disk and its own identity Not available on the managed service yet. |
--count <COUNT> |
How many miniVMs, all admitted or none (at most 50) [default: 1] |
--timeout <SECONDS> |
Seconds before the miniVM is killed [default: 300] |
--name <NAME> |
A name to tell the miniVM apart, not unique (1 to 64 characters). Every member of the organization sees it: no secret or personal data |
--label <KEY=VALUE> |
A label to find the miniVM by (ons ls —label); repeatable, at most 16. Every member of the organization sees it: no secret or personal data |
--metadata <KEY=VALUE> |
key=value, repeatable. msb.ai_account=NAME binds that AI account instead of the defaults, msb.ai_account=none binds none |
--egress-credential <HOST=HEADER:[bearer:|github-basic:]env:VAR|file:PATH> |
A header miniSandbox adds to the miniVM’s requests to HOST, with a value read from an env var or a file (never the command line); the guest sends msb-egress-credential in its place. Repeatable |
--egress-route <HOST=ROUTE[:/PREFIX]> |
Also serve HOST’s credentials at http://172.16.0.1:8080/r/ROUTE in the miniVM, forwarded to https://HOST/PREFIX. Repeatable |
--egress-allow <NAME|PRESET> |
Restrict egress to these names or presets, each one the template allows (ons egress allow widens a running miniVM instead). Quote wildcards (‘*.domain’). Repeatable |
--egress-add <NAME|PRESET> |
Also allow egress to these names or presets the template does not allow, up to the organization’s ceiling. Quote wildcards (‘*.domain’). Repeatable |
--egress-open |
Egress mode open: every public name (private networks, cloud metadata and outgoing mail ports stay blocked), if the organization and the deployment allow it Not available on the managed service yet. |
--auto-pause |
Pause the miniVM instead of killing it when its timeout ends |
--auto-pause-idle <SECONDS> |
Seconds without activity before the miniVM pauses (0 = never, else 60 to 86400); the organization’s delay when unset |
--agents |
Ready for agent runs (ons agent start): pauses at its timeout and holds a token to report its runs’ states |
--env <KEY> |
Set the miniVM’s env var KEY to your own $KEY, never KEY=VALUE; repeatable, wins over —env-file. Lowercase names work, but an error names only an UPPER_SNAKE_CASE KEY that none of your exported variables holds as a value (else —env #N), as it may be a value typed by mistake. An env var is readable by everything in the miniVM, including the agent: ons create —egress-credential keeps a value out of it (the guest only sees msb-egress-credential) |
--env-file <PATH> |
Set the miniVM’s env vars from a dotenv file (KEY=VALUE lines, # comments, optional export, quoted values, ${…} never expanded); repeatable, a later file wins over an earlier one. Readable by everything in the miniVM, including the agent |
Examples:
ons create one miniVM from the base templateons create --template my-app --timeout 3600 from your template, for an hourons create --name fix-cache-test --label task=cache-fix named and labelled for ons ls --label task=cache-fixons create --count 3 --metadata job=ci three, found by ons ls --metadata job=cions create --egress-allow pypi egress to the template's pypi hosts onlyons create --egress-add api.example.com egress to one more name than the template'sons create --egress-open egress to every public name (ons egress close ends it)ons create --from-snapshot <SNAPSHOT_ID> --count 4 four miniVMs with the snapshot's diskons ls
Section titled “ons ls”List running and paused miniVMs
ons ls [OPTIONS]| Option | Description |
|---|---|
--metadata <KEY=VALUE> |
Only the miniVMs whose metadata has KEY=VALUE; repeatable, all must match |
--label <KEY=VALUE> |
Only the miniVMs labelled KEY=VALUE; repeatable, all must match |
Examples:
ons ls --label task=cache-fix the miniVMs of one taskons ls --label team=red --label task=cache-fix both labels must matchons inspect
Section titled “ons inspect”Show one miniVM, including why it ended once killed
ons inspect [OPTIONS] <MINIVM_ID>| Argument | Description |
|---|---|
<MINIVM_ID> |
The miniVM’s id, as ons create printed it (ons ls lists yours) |
ons exec
Section titled “ons exec”Run a command in a miniVM (no shell) and exit with its code
ons exec [OPTIONS] <MINIVM_ID> -- <COMMAND>...| Argument | Description |
|---|---|
<MINIVM_ID> |
The miniVM’s id, as ons create printed it (ons ls lists yours) |
<COMMAND>... |
The program and its arguments, after -- |
| Option | Description |
|---|---|
--timeout <SECONDS> |
Seconds before the command is killed [default: 60] |
Examples:
ons exec <MINIVM_ID> -- uname -aons exec <MINIVM_ID> -- sh -c 'cd /home/user/work && make test'ons exec <MINIVM_ID> --timeout 600 -- npm ciGet a MINIVM_ID with ons create, or list yours with ons ls.
When the command fails on a name lookup, ons prints on stderr the names egress refused since it
started, with the ons egress allow of the preset that opens it (6 s at most; —json: egressRefused).
ons shell
Section titled “ons shell”Open an interactive shell in a miniVM
ons shell [OPTIONS] <MINIVM_ID>| Argument | Description |
|---|---|
<MINIVM_ID> |
The miniVM’s id, as ons create printed it (ons ls lists yours) |
Examples:
ons shell <MINIVM_ID> exit or Ctrl-D leaves; the miniVM keeps runningons push
Section titled “ons push”Push a directory’s files (what git tracks or would track) into a running miniVM
ons push [OPTIONS] <MINIVM_ID> [DIR]| Argument | Description |
|---|---|
<MINIVM_ID> |
The miniVM’s id, as ons create printed it (ons ls lists yours) |
[DIR] |
The local directory to push [default: .] |
| Option | Description |
|---|---|
--to <PATH> |
Absolute directory in the miniVM, created if missing; existing files are overwritten [default: /home/user/work] |
--no-git |
Push every file under DIR, for a directory outside any git repository |
--delete |
Also remove from —to what DIR does not have, except what .gitignore ignores |
--untracked <UNTRACKED> |
In a git repository, what git does not track: none, or include what it would track Possible values: - none: Only the files git tracks - include: Also the files git would track: untracked and not ignored [default: none] |
--include-secrets |
Push files not in git’s upstream branch as they are here even when they look like a secret (.env, *.pem, a token…) |
-h, --help |
Print help (see a summary with ‘-h’) |
Examples:
ons push <MINIVM_ID> this git repository to /home/user/workons push <MINIVM_ID> ./app --to /srv/app --deleteons push <MINIVM_ID> ./data --no-git a directory outside any git repositoryons rename
Section titled “ons rename”Name a miniVM, or clear its name; ended miniVMs keep theirs read-only
ons rename [OPTIONS] <MINIVM_ID> <NAME|--clear>| Argument | Description |
|---|---|
<MINIVM_ID> |
The miniVM’s id, as ons create printed it (ons ls lists yours) |
[NAME] |
The new name, 1 to 64 characters. Every member of the organization sees it: no secret or personal data |
| Option | Description |
|---|---|
--clear |
Remove the name |
Examples:
ons rename <MINIVM_ID> fix-cache-testons rename <MINIVM_ID> --clearons label
Section titled “ons label”A miniVM’s labels: set or remove them; ons ls —label finds miniVMs by them
ons label [OPTIONS] <COMMAND>| Command | Description |
|---|---|
ons label set |
Set labels on a miniVM; other labels stay as they are |
ons label rm |
Remove labels from a miniVM; a key it does not have is ignored |
ons label set
Section titled “ons label set”Set labels on a miniVM; other labels stay as they are
ons label set [OPTIONS] <MINIVM_ID> <KEY=VALUE>...| Argument | Description |
|---|---|
<MINIVM_ID> |
The miniVM’s id, as ons create printed it (ons ls lists yours) |
<KEY=VALUE>... |
key=value, at least one; a miniVM holds at most 16 labels |
Examples:
ons label set <MINIVM_ID> task=cache-fix team=redons ls --label task=cache-fixons label rm
Section titled “ons label rm”Remove labels from a miniVM; a key it does not have is ignored
ons label rm [OPTIONS] <MINIVM_ID> <KEY>...| Argument | Description |
|---|---|
<MINIVM_ID> |
The miniVM’s id, as ons create printed it (ons ls lists yours) |
<KEY>... |
The label keys, at least one |
Examples:
ons label rm <MINIVM_ID> task teamons pause
Section titled “ons pause”Pause a miniVM: its memory and disk are saved and it stops counting as running
ons pause [OPTIONS] <MINIVM_ID>| Argument | Description |
|---|---|
<MINIVM_ID> |
The miniVM’s id, as ons create printed it (ons ls lists yours) |
| Option | Description |
|---|---|
--no-wait |
Return as soon as miniSandbox took the pause, before the snapshot ends |
Exit 0 once paused, 124 when it is still pausing after 10 minutes.
ons resume
Section titled “ons resume”Resume a paused miniVM, or extend a running one
ons resume [OPTIONS] <MINIVM_ID>| Argument | Description |
|---|---|
<MINIVM_ID> |
The miniVM’s id, as ons create printed it (ons ls lists yours) |
| Option | Description |
|---|---|
--timeout <SECONDS> |
Seconds from now before the miniVM times out (default: a paused miniVM gets the timeout it last had, a running one keeps its own) |
--egress-credential <HOST=HEADER:[bearer:|github-basic:]env:VAR|file:PATH> |
The value of a static egress credential given at create, read from an env var or a file (never the command line), for a miniVM whose credentials are missing. Repeatable |
ons kill
Section titled “ons kill”Kill a miniVM, or every miniVM with some labels, and delete its disk
ons kill [OPTIONS] <MINIVM_ID|--label <KEY=VALUE>>| Argument | Description |
|---|---|
[MINIVM_ID] |
The miniVM’s id, as ons create printed it (ons ls lists yours) |
| Option | Description |
|---|---|
--label <KEY=VALUE> |
Kill the running and paused miniVMs labelled KEY=VALUE; repeatable, all must match |
--yes |
Kill more than one miniVM without asking |
--dry-run |
Print what —label matches and kill nothing |
Examples:
ons kill <MINIVM_ID>ons kill --label task=cache-fix every running or paused miniVM of one taskons kill --label team=red --label task=x --yes both labels must match; no question askedons snapshot
Section titled “ons snapshot”Not available on the managed service yet.
Disk snapshots of miniVMs of fork templates: take, list, delete
ons snapshot [OPTIONS] <COMMAND>| Command | Description |
|---|---|
ons snapshot create |
Snapshot a running miniVM’s disk (its episode); miniVMs start from it with ons create —from-snapshot |
ons snapshot ls |
List the organization’s snapshots, newest first |
ons snapshot rm |
Delete a snapshot; miniVMs started from it keep their disk |
ons snapshot create
Section titled “ons snapshot create”Not available on the managed service yet.
Snapshot a running miniVM’s disk (its episode); miniVMs start from it with ons create —from-snapshot
ons snapshot create [OPTIONS] <MINIVM_ID>| Argument | Description |
|---|---|
<MINIVM_ID> |
The miniVM’s id, as ons create printed it (ons ls lists yours) |
| Option | Description |
|---|---|
--name <NAME> |
A name to find the snapshot by, unique in the organization (1 to 128 letters, digits, ’.’, ’_’ or ’-’) |
Examples:
ons snapshot create <MINIVM_ID> --name repo-readyons create --from-snapshot <SNAPSHOT_ID> --count 4Only miniVMs of a template built with fork: {mode: disk} have one; memory is never snapshotted.
ons snapshot ls
Section titled “ons snapshot ls”Not available on the managed service yet.
List the organization’s snapshots, newest first
ons snapshot ls [OPTIONS]| Option | Description |
|---|---|
--sandbox <MINIVM_ID> |
Only the snapshots of this miniVM |
--name <NAME> |
Only the snapshot of this name |
Examples:
ons snapshot ls --sandbox <MINIVM_ID>ons snapshot ls --name repo-ready --jsonons snapshot rm
Section titled “ons snapshot rm”Not available on the managed service yet.
Delete a snapshot; miniVMs started from it keep their disk
ons snapshot rm [OPTIONS] <SNAPSHOT_ID>| Argument | Description |
|---|---|
<SNAPSHOT_ID> |
The snapshot’s id, as ons snapshot create printed it |
ons fork
Section titled “ons fork”Not available on the managed service yet.
Snapshot a running miniVM’s disk and start miniVMs from it; prints one id per child
ons fork [OPTIONS] --count <N> <MINIVM_ID>| Argument | Description |
|---|---|
<MINIVM_ID> |
The miniVM’s id, as ons create printed it (ons ls lists yours) |
| Option | Description |
|---|---|
-n, --count <N> |
How many children (1 to 100) |
--timeout <SECONDS> |
Seconds before each child is killed [default: 300] |
--name <NAME> |
A name for every child, not unique (1 to 64 characters). Every member of the organization sees it: no secret or personal data |
--label <KEY=VALUE> |
A label on every child (ons ls —label, ons kill —label); repeatable, at most 16. Every member of the organization sees it: no secret or personal data |
--metadata <KEY=VALUE> |
key=value on every child, repeatable |
Examples:
ons fork <MINIVM_ID> -n 8 --label run=r42 eight children with the miniVM's diskons kill --label run=r42 --yes end them all (a label the parent lacks)ons fork <MINIVM_ID> -n 4 --timeout 3600 --jsonChildren get the miniVM’s disk as it was, never its memory or identity. Only miniVMs of a template
built with fork: {mode: disk} fork.
ons reset
Section titled “ons reset”Not available on the managed service yet.
Restart a running miniVM from where it started (its snapshot, or an empty disk), same id
ons reset [OPTIONS] <MINIVM_ID>| Argument | Description |
|---|---|
<MINIVM_ID> |
The miniVM’s id, as ons create printed it (ons ls lists yours) |
Examples:
ons reset <MINIVM_ID> a fresh start for the next attemptons proc
Section titled “ons proc”Processes that outlive ons: start one, read its output later, send it input, wait for it
ons proc [OPTIONS] <COMMAND>| Command | Description |
|---|---|
ons proc start |
Start a process that outlives ons, with stdin open, under a tag unique among running ones |
ons proc ls |
List the running processes; with —all also the ended ones envd remembers (24 h, last 64) |
ons proc logs |
Print a process’s output kept by envd (its last 4 MiB), then follow it with —follow |
ons proc send |
Write TEXT and a newline (Enter on a pty) to a process’s input, or - to pass on stdin |
ons proc wait |
Wait for a process to end and exit with its code (255 when a signal ended it) |
ons proc kill |
Signal a running process and its process group |
ons proc start
Section titled “ons proc start”Start a process that outlives ons, with stdin open, under a tag unique among running ones
ons proc start [OPTIONS] --tag <TAG> <MINIVM_ID> -- <COMMAND>...| Argument | Description |
|---|---|
<MINIVM_ID> |
The miniVM’s id, as ons create printed it (ons ls lists yours) |
<COMMAND>... |
The program and its arguments, after -- |
| Option | Description |
|---|---|
--tag <TAG> |
A name for the process, to find it again with logs, send, wait and kill |
--pty |
Run it on a terminal: one output stream, and input goes to the terminal |
--env <KEY=VALUE> |
KEY=VALUE, repeatable |
--cwd <DIR> |
Working directory, instead of the template’s |
Examples:
ons proc start <MINIVM_ID> --tag agent -- opencode run 'fix the tests'ons proc start <MINIVM_ID> --tag web --cwd /home/user/work -- npm run devons proc start <MINIVM_ID> --tag repl --pty -- python3ons proc ls
Section titled “ons proc ls”List the running processes; with —all also the ended ones envd remembers (24 h, last 64)
ons proc ls [OPTIONS] <MINIVM_ID>| Argument | Description |
|---|---|
<MINIVM_ID> |
The miniVM’s id, as ons create printed it (ons ls lists yours) |
| Option | Description |
|---|---|
--all |
Also list the processes that ended |
ons proc logs
Section titled “ons proc logs”Print a process’s output kept by envd (its last 4 MiB), then follow it with —follow
ons proc logs [OPTIONS] <MINIVM_ID> [TAG]| Argument | Description |
|---|---|
<MINIVM_ID> |
The miniVM’s id, as ons create printed it (ons ls lists yours) |
[TAG] |
The tag given to ons proc start |
| Option | Description |
|---|---|
--pid <PID> |
Select the process by pid instead of tag |
--from <OFFSET> |
Byte offset to start from; the oldest kept byte by default |
--follow |
Keep printing until the process ends, reconnecting when the stream drops |
Examples:
ons proc logs <MINIVM_ID> agent what it printed so farons proc logs <MINIVM_ID> agent --follow then follow it until it endsons proc send
Section titled “ons proc send”Write TEXT and a newline (Enter on a pty) to a process’s input, or - to pass on stdin
ons proc send [OPTIONS] <MINIVM_ID> <TAG> [TEXT|-]| Argument | Description |
|---|---|
<MINIVM_ID> |
The miniVM’s id, as ons create printed it (ons ls lists yours) |
<TAG> |
The tag given to ons proc start |
[TEXT|-] |
The text to write, or - to pass stdin on |
| Option | Description |
|---|---|
--no-newline |
Do not add the newline after TEXT |
--eof |
Then close its stdin (Ctrl-D on a pty) |
ons proc wait
Section titled “ons proc wait”Wait for a process to end and exit with its code (255 when a signal ended it)
ons proc wait [OPTIONS] <MINIVM_ID> [TAG]| Argument | Description |
|---|---|
<MINIVM_ID> |
The miniVM’s id, as ons create printed it (ons ls lists yours) |
[TAG] |
The tag given to ons proc start |
| Option | Description |
|---|---|
--pid <PID> |
Select the process by pid instead of tag |
--timeout <DURATION> |
Give up after DURATION (30s, 5m, 2h) and exit 124 |
Examples:
ons proc wait <MINIVM_ID> agent exit with the process's codeons proc wait <MINIVM_ID> agent --timeout 30mons proc kill
Section titled “ons proc kill”Signal a running process and its process group
ons proc kill [OPTIONS] <MINIVM_ID> [TAG]| Argument | Description |
|---|---|
<MINIVM_ID> |
The miniVM’s id, as ons create printed it (ons ls lists yours) |
[TAG] |
The tag given to ons proc start |
| Option | Description |
|---|---|
--pid <PID> |
Select the process by pid instead of tag |
--signal <SIGNAL> |
The signal to send [default: TERM] [possible values: TERM, KILL] |
ons secret
Section titled “ons secret”Secrets given to a running miniVM as files in /run/msb/secrets (not env vars)
ons secret [OPTIONS] <COMMAND>| Command | Description |
|---|---|
ons secret provide |
Give a running miniVM a secret as the file /run/msb/secrets/NAME, readable by the template’s user (the agent included); replaces one of the same name |
ons secret rm |
Delete the file /run/msb/secrets/NAME of a miniVM |
ons secret ls |
List the names of a miniVM’s secrets in /run/msb/secrets, never their values |
ons secret requests |
Secret requests made from inside miniVMs (msb-agent secret request), newest first |
ons secret deny |
Deny a secret request: the agent waiting on it learns it gets no secret |
ons secret provide
Section titled “ons secret provide”Give a running miniVM a secret as the file /run/msb/secrets/NAME, readable by the template’s user (the agent included); replaces one of the same name
ons secret provide [OPTIONS] <MINIVM_ID> <NAME>| Argument | Description |
|---|---|
<MINIVM_ID> |
The miniVM’s id, as ons create printed it (ons ls lists yours) |
<NAME> |
The file’s name: [A-Z_][A-Z0-9_]*, at most 64 bytes, not MSB_* or E2B_* |
| Option | Description |
|---|---|
--from-env <VAR> |
Read the value from your own $VAR, never VAR=VALUE |
--from-file <PATH> |
Read the value from a UTF-8 file (at most 32 KiB) |
--request <REQUEST_ID> |
Mark only this secret request provided (scr_…), as ons secret requests lists it |
Examples:
ons secret provide <MINIVM_ID> DATABASE_URL --from-env DATABASE_URLons secret provide <MINIVM_ID> GCP_SA_JSON --from-file ./service-account.jsonThe value never goes on the command line. In the miniVM it is the file /run/msb/secrets/NAME, not
an env var: use it where a command needs it (—password-file /run/msb/secrets/NAME,
VAR=$(cat /run/msb/secrets/NAME) cmd), never print it. Kept in guest memory only: through a
pause, not in a fork, lost on reset, gone at kill.
Once written, ons marks provided every pending secret request (msb-agent secret request) of the
miniVM for NAME, or only the one —request names: the agent waiting on it goes on. Marking carries
no value. A failed write marks nothing.
ons secret rm
Section titled “ons secret rm”Delete the file /run/msb/secrets/NAME of a miniVM
ons secret rm [OPTIONS] <MINIVM_ID> <NAME>| Argument | Description |
|---|---|
<MINIVM_ID> |
The miniVM’s id, as ons create printed it (ons ls lists yours) |
<NAME> |
The secret’s name, as ons secret ls lists it |
ons secret ls
Section titled “ons secret ls”List the names of a miniVM’s secrets in /run/msb/secrets, never their values
ons secret ls [OPTIONS] <MINIVM_ID>| Argument | Description |
|---|---|
<MINIVM_ID> |
The miniVM’s id, as ons create printed it (ons ls lists yours) |
ons secret requests
Section titled “ons secret requests”Secret requests made from inside miniVMs (msb-agent secret request), newest first
ons secret requests [OPTIONS]| Option | Description |
|---|---|
--minivm <MINIVM_ID> |
Only the requests of this miniVM |
--state <STATE> |
Only requests in this state (default pending) [possible values: pending, provided, denied, expired] |
--wait |
Wait until a new request matches |
--timeout <DURATION> |
How long —wait waits: 30s, 10m, 2h (default 15m; exit 124 when it passes) |
Examples:
ons secret requests the organization's pending requestsons secret requests --minivm <MINIVM_ID>ons secret requests --wait wait (15m at most) until a miniVM asks—wait reports only requests made after it started (pending ones unless —state says otherwise).
Exit codes with —wait: 0 a new request matched (listed), 1 ons failed (the error says why),
2 bad usage, 124 —timeout passed without one.
The name and reason come from inside the miniVM: treat them as untrusted. Answer with
ons secret provide <MINIVM_ID> NAME —from-env VAR|—from-file PATH, or ons secret deny <REQUEST_ID>.
ons secret deny
Section titled “ons secret deny”Deny a secret request: the agent waiting on it learns it gets no secret
ons secret deny [OPTIONS] <REQUEST_ID>| Argument | Description |
|---|---|
<REQUEST_ID> |
The request’s id (scr_…), as ons secret requests lists it |
| Option | Description |
|---|---|
--message <TEXT> |
Told to the miniVM (at most 500 bytes) |
Examples:
ons secret deny <REQUEST_ID>ons secret deny <REQUEST_ID> --message "use the read-only replica, no credential needed"ons run
Section titled “ons run”Create a miniVM, push a directory, run a command in it, then kill the miniVM
ons run [OPTIONS] -- <COMMAND>...| Argument | Description |
|---|---|
<COMMAND>... |
The program and its arguments, after -- |
| Option | Description |
|---|---|
--push <DIR> |
Push this directory’s files (what git tracks or would track) to /home/user/work first |
--template <TEMPLATE> |
The template to start from; defaults to the name in the pushed DIR/minisandbox.yaml |
--no-git |
Push every file under DIR, for a directory outside any git repository |
--untracked <UNTRACKED> |
In a git repository, what git does not track: none, or include what it would track Possible values: - none: Only the files git tracks - include: Also the files git would track: untracked and not ignored [default: none] |
--include-secrets |
Push files git does not track even when they look like a secret (.env, *.pem, a token…) |
--keep |
Keep the miniVM when the command ends instead of killing it |
--timeout <SECONDS> |
Seconds before the command and the miniVM are killed [default: 1800] |
--metadata <KEY=VALUE> |
key=value, repeatable |
--env <KEY> |
Set the miniVM’s env var KEY to your own $KEY, never KEY=VALUE; repeatable, wins over —env-file. Lowercase names work, but an error names only an UPPER_SNAKE_CASE KEY that none of your exported variables holds as a value (else —env #N), as it may be a value typed by mistake. An env var is readable by everything in the miniVM, including the agent: ons create —egress-credential keeps a value out of it (the guest only sees msb-egress-credential) |
--env-file <PATH> |
Set the miniVM’s env vars from a dotenv file (KEY=VALUE lines, # comments, optional export, quoted values, ${…} never expanded); repeatable, a later file wins over an earlier one. Readable by everything in the miniVM, including the agent |
-h, --help |
Print help (see a summary with ‘-h’) |
Examples:
ons run --template base -- python3 -c 'print(42)'ons run --push . -- make test push this repository, test it, kill the miniVMons run --push . --keep -- npm run build keep the miniVM afterwardsons egress
Section titled “ons egress”A miniVM’s egress: show it, open or close it, allow or deny names while it runs or is paused
ons egress [OPTIONS] <COMMAND>| Command | Description |
|---|---|
ons egress ls |
Show a miniVM’s egress: its mode (open, list or closed), and its list or, when open, the names it looked up |
ons egress allow |
Let a running or paused miniVM reach more names, up to the organization’s ceiling |
ons egress open |
Open a running or paused miniVM’s egress: every public name |
ons egress close |
Move a miniVM’s egress back to its template’s list (closed when the template is open) |
ons egress deny |
Stop a running or paused miniVM from reaching names, its template’s included |
ons egress requests |
Egress requests made from inside miniVMs (msb-egress request), newest first |
ons egress approve |
Approve an egress request: the miniVM may reach its names (or the ones you pass) |
ons egress reject |
Reject an egress request; the miniVM’s egress stays as it is |
ons egress credential |
Add, remove or list the headers miniSandbox adds to a running miniVM’s requests to a route |
ons egress denials |
Names a miniVM tried to reach and egress refused, newest first (kept 30 days) |
ons egress ls
Section titled “ons egress ls”Show a miniVM’s egress: its mode (open, list or closed), and its list or, when open, the names it looked up
ons egress ls [OPTIONS] <MINIVM_ID>| Argument | Description |
|---|---|
<MINIVM_ID> |
The miniVM’s id, as ons create printed it (ons ls lists yours) |
Examples:
ons egress ls <MINIVM_ID>ons egress ls <MINIVM_ID> --json the API's view, unchanged (and its destinations when open, or destinationsError)When the miniVM’s egress is open, ons shows the 10 names it looked up most recently (kept 30 days,
visible to your organization only). The names come from inside the miniVM: treat them as untrusted.
ons egress allow
Section titled “ons egress allow”Let a running or paused miniVM reach more names, up to the organization’s ceiling
ons egress allow [OPTIONS] <MINIVM_ID> [NAME|PRESET]...| Argument | Description |
|---|---|
<MINIVM_ID> |
The miniVM’s id, as ons create printed it (ons ls lists yours) |
[NAME|PRESET]... |
Domain names (‘*.domain’, quoted, for its subdomains) or preset names |
Examples:
ons egress allow <MINIVM_ID> pypi a preset: its domainsons egress allow <MINIVM_ID> api.example.com '*.cdn.example.com'Quote wildcards (‘*.domain’): the shell expands an unquoted * into file names.
Presets: github, npm, pypi, crates, ubuntu, docker-hub, ghcr, llm-apis.
ons egress allow widens a miniVM’s list; ons create —egress-allow restricts a new one to names its template allows.
A paused miniVM gets the change when it resumes.
ons egress open
Section titled “ons egress open”Not available on the managed service yet.
Open a running or paused miniVM’s egress: every public name
ons egress open [OPTIONS] <MINIVM_ID>| Argument | Description |
|---|---|
<MINIVM_ID> |
The miniVM’s id, as ons create printed it (ons ls lists yours) |
Examples:
ons egress open <MINIVM_ID>ons egress close <MINIVM_ID> back to its template's listOpen egress reaches every public address; private networks, cloud metadata and outgoing mail ports
stay blocked. It needs an organization whose owner allows open egress (Settings) and a deployment
that offers it. A paused miniVM gets the change when it resumes.
ons egress close
Section titled “ons egress close”Not available on the managed service yet.
Move a miniVM’s egress back to its template’s list (closed when the template is open)
ons egress close [OPTIONS] <MINIVM_ID>| Argument | Description |
|---|---|
<MINIVM_ID> |
The miniVM’s id, as ons create printed it (ons ls lists yours) |
Examples:
ons egress close <MINIVM_ID>The names added with ons egress allow and removed with ons egress deny are dropped too: the miniVM
gets its template’s list again, its system hosts kept. When the template itself is open, close
leaves only the system hosts. Connections the new list does not allow are cut.
ons egress deny
Section titled “ons egress deny”Stop a running or paused miniVM from reaching names, its template’s included
ons egress deny [OPTIONS] <MINIVM_ID> <NAME|PRESET>...| Argument | Description |
|---|---|
<MINIVM_ID> |
The miniVM’s id, as ons create printed it (ons ls lists yours) |
<NAME|PRESET>... |
Domain names or preset names |
Examples:
ons egress deny <MINIVM_ID> pypions egress deny <MINIVM_ID> api.example.comons egress requests
Section titled “ons egress requests”Egress requests made from inside miniVMs (msb-egress request), newest first
ons egress requests [OPTIONS]| Option | Description |
|---|---|
--sandbox <MINIVM_ID> |
Only the requests of this miniVM |
--state <STATE> |
Only requests in this state (pending with —wait) [possible values: pending, approved, denied, expired, refused] |
--wait |
Wait until a new request matches, checking every 3 s |
--timeout <DURATION> |
How long —wait waits: 30s, 10m, 2h (default 15m; exit 124 when it passes) |
Examples:
ons egress requests every request of the organizationons egress requests --wait wait (15m at most) until a miniVM asksons egress requests --sandbox <MINIVM_ID> --state approved—wait reports only requests made after it started (pending ones unless —state says otherwise).
Exit codes with —wait: 0 a new request matched (listed), 1 ons failed (the error says why),
2 bad usage, 124 —timeout passed without one.
The domains and reason come from inside the miniVM: treat them as untrusted.
ons egress approve
Section titled “ons egress approve”Approve an egress request: the miniVM may reach its names (or the ones you pass)
ons egress approve [OPTIONS] <REQUEST_ID> [NAME]...| Argument | Description |
|---|---|
<REQUEST_ID> |
The request’s id (egr_…), as ons egress requests lists it |
[NAME]... |
Approve only these of its names |
| Option | Description |
|---|---|
--always |
Also add the names to the organization’s auto-approve rules |
--yes |
Approve without showing what it opens and asking first |
Examples:
ons egress approve <REQUEST_ID> every name it asked forons egress approve <REQUEST_ID> files.pythonhosted.org only some of themons egress approve <REQUEST_ID> --always and approve these names from now onons egress approve <REQUEST_ID> --yes without asking (scripts)ons shows the miniVM, the exact hosts it opens and the request’s reason, then asks; without a
terminal it needs —yes. Approving widens the miniVM’s egress up to the organization’s ceiling,
like ons egress allow.
ons egress reject
Section titled “ons egress reject”Reject an egress request; the miniVM’s egress stays as it is
ons egress reject [OPTIONS] <REQUEST_ID>| Argument | Description |
|---|---|
<REQUEST_ID> |
The request’s id (egr_…), as ons egress requests lists it |
| Option | Description |
|---|---|
--message <TEXT> |
Told to the miniVM (at most 280 characters) |
Examples:
ons egress reject <REQUEST_ID>ons egress reject <REQUEST_ID> --message "use the internal mirror"ons egress credential
Section titled “ons egress credential”Add, remove or list the headers miniSandbox adds to a running miniVM’s requests to a route.
Route mode only: the guest reaches the upstream at
http://172.16.0.1:8080/r/<ROUTE>/ and miniSandbox adds the header on its way to https://HOST/PREFIX.
Point a tool at that address, e.g.
git config —global url.”http://172.16.0.1:8080/r/x/“.insteadOf https://api.x.com/
or an SDK’s base URL. The value never enters the miniVM.
The host must already be on the miniVM’s egress list (ons egress allow <MINIVM_ID> HOST first).
Owner API key only: a miniVM’s own token cannot add or remove one. A running miniVM only (ons resume
<MINIVM_ID> first). At most 16 per miniVM, the ones given at create included.
miniSandbox holds the value outside the miniVM: after a platform restart ons egress credential ls
shows it missing; supply it again with ons resume <MINIVM_ID> —egress-credential HOST=HEADER:env:VAR, or rm and add it.
A paused miniVM refuses rm (409). To revoke a value while paused, resume it with only the values to
keep: ons resume <MINIVM_ID> —egress-credential … for each, or the API’s
{“egressCredentials”: []} on POST /sandboxes/{id}/resume, which clears them all. A route whose
value was cleared answers 503 until rm; or kill the miniVM.
ons egress credential [OPTIONS] <COMMAND>| Command | Description |
|---|---|
ons egress credential add |
Add a header miniSandbox sends to HOST for the miniVM’s requests to a route |
ons egress credential rm |
Remove a route’s credential from a running miniVM |
ons egress credential ls |
List a miniVM’s egress credentials, never their values |
| Option | Description |
|---|---|
-h, --help |
Print help (see a summary with ‘-h’) |
ons egress credential add
Section titled “ons egress credential add”Add a header miniSandbox sends to HOST for the miniVM’s requests to a route.
Route mode only: the guest reaches the upstream at
http://172.16.0.1:8080/r/<ROUTE>/ and miniSandbox adds the header on its way to https://HOST/PREFIX.
Point a tool at that address, e.g.
git config —global url.”http://172.16.0.1:8080/r/x/“.insteadOf https://api.x.com/
or an SDK’s base URL. The value never enters the miniVM.
The host must already be on the miniVM’s egress list (ons egress allow <MINIVM_ID> HOST first).
Owner API key only: a miniVM’s own token cannot add or remove one. A running miniVM only (ons resume
<MINIVM_ID> first). At most 16 per miniVM, the ones given at create included.
miniSandbox holds the value outside the miniVM: after a platform restart ons egress credential ls
shows it missing; supply it again with ons resume <MINIVM_ID> —egress-credential HOST=HEADER:env:VAR, or rm and add it.
A paused miniVM refuses rm (409). To revoke a value while paused, resume it with only the values to
keep: ons resume <MINIVM_ID> —egress-credential … for each, or the API’s
{“egressCredentials”: []} on POST /sandboxes/{id}/resume, which clears them all. A route whose
value was cleared answers 503 until rm; or kill the miniVM.
ons egress credential add [OPTIONS] --host <HOST> --header <NAME> --route <ROUTE> <MINIVM_ID> <VALUE>| Argument | Description |
|---|---|
<MINIVM_ID> |
The miniVM’s id, as ons create printed it (ons ls lists yours) |
<VALUE> |
Where the value is read: [bearer:|github-basic:]env:VAR|file:PATH |
| Option | Description |
|---|---|
--host <HOST> |
The upstream host, already on the miniVM’s egress list |
--header <NAME> |
The header miniSandbox sets, e.g. authorization or x-api-key |
--route <ROUTE> |
The guest reaches HOST at http://172.16.0.1:8080/r/ROUTE/ (a-z, 0-9 and -, at most 32) |
--prefix </PREFIX> |
A path put before the guest’s path on the upstream, e.g. /v1 |
-h, --help |
Print help (see a summary with ‘-h’) |
Examples:
ons egress credential add <MINIVM_ID> --host api.x.com --header authorization --route x bearer:env:X_TOKENons egress credential add <MINIVM_ID> --host llm.example.com --header x-api-key --route llm --prefix /v1 file:./keyVALUE is [bearer:|github-basic:]env:VAR or […]file:PATH, as in ons create —egress-credential:
bearer: sends Bearer <value>, github-basic: Basic base64(x-access-token:<value>).
Never put the value itself on the command line.
—json: the API’s answer, {“rule”: RULE, “egressCredentials”: {“state”, “rules”: [RULE…]}}.
ons egress credential rm
Section titled “ons egress credential rm”Remove a route’s credential from a running miniVM
ons egress credential rm [OPTIONS] --route <ROUTE> <MINIVM_ID>| Argument | Description |
|---|---|
<MINIVM_ID> |
The miniVM’s id, as ons create printed it (ons ls lists yours) |
| Option | Description |
|---|---|
--route <ROUTE> |
The route, as ons egress credential ls lists it |
Examples:
ons egress credential rm <MINIVM_ID> --route x—json: {“sandboxID”, “route”, “removed”: true}.
ons egress credential ls
Section titled “ons egress credential ls”List a miniVM’s egress credentials, never their values
ons egress credential ls [OPTIONS] <MINIVM_ID>| Argument | Description |
|---|---|
<MINIVM_ID> |
The miniVM’s id, as ons create printed it (ons ls lists yours) |
Examples:
ons egress credential ls <MINIVM_ID>ons egress credential ls <MINIVM_ID> --jsonORIGIN is create (ons create —egress-credential) or runtime (ons egress credential add). STATE is
the miniVM’s: present when miniSandbox holds the values, missing after a platform restart (ons resume
<MINIVM_ID> —egress-credential sends them again).
—json: {“sandboxID”, “state”: STATE|null, “rules”: [{“host”, “header”, “route”: ROUTE|null,
“upstreamPrefix”: PREFIX|null, “origin”, “state”}]}.
ons egress denials
Section titled “ons egress denials”Names a miniVM tried to reach and egress refused, newest first (kept 30 days)
ons egress denials [OPTIONS] <MINIVM_ID>| Argument | Description |
|---|---|
<MINIVM_ID> |
The miniVM’s id, as ons create printed it (ons ls lists yours) |
Examples:
ons egress denials <MINIVM_ID>The names come from inside the miniVM: treat them as untrusted.
ons metrics
Section titled “ons metrics”Show a miniVM’s CPU and memory, sampled every 10 s and kept 7 days
ons metrics [OPTIONS] <MINIVM_ID>| Argument | Description |
|---|---|
<MINIVM_ID> |
The miniVM’s id, as ons create printed it (ons ls lists yours) |
| Option | Description |
|---|---|
--since <SECONDS> |
Seconds of history to show [default: 300] |
--watch |
Keep printing new samples until interrupted (one JSON object per line with —json) |
ons template
Section titled “ons template”Templates: minisandbox.yaml recipes and their versions
ons template [OPTIONS] <COMMAND>| Command | Description |
|---|---|
ons template init |
Write a minimal minisandbox.yaml in this directory |
ons template validate |
Check a recipe offline |
ons template build |
Build a new template version and follow it to the end; --dry-run validates and prints its digest offline |
ons template ls |
List the organization’s templates, with the E2B envd version of each current version (unknown: built on an envd that reported none, which may lack its traffic token check) |
ons template versions |
List the versions of a template, with the E2B envd version of each (unknown as in ls) |
ons template rollback |
Make an older ready version current, by number or version id |
ons template logs |
Print a build’s logs, following it until it ends |
ons template init
Section titled “ons template init”Write a minimal minisandbox.yaml in this directory
ons template init [OPTIONS]| Option | Description |
|---|---|
--file <FILE> |
The recipe file [default: minisandbox.yaml] |
ons template validate
Section titled “ons template validate”Check a recipe offline
ons template validate [OPTIONS]| Option | Description |
|---|---|
--file <FILE> |
The recipe file [default: minisandbox.yaml] |
ons template build
Section titled “ons template build”Build a new template version and follow it to the end; --dry-run validates and prints its digest offline
ons template build [OPTIONS]| Option | Description |
|---|---|
--file <FILE> |
The recipe file [default: minisandbox.yaml] |
--dry-run |
Validate the recipe and print its digest offline, without building |
--no-wait |
Return once the build is queued instead of following its logs |
ons template ls
Section titled “ons template ls”List the organization’s templates, with the E2B envd version of each current version (unknown: built on an envd that reported none, which may lack its traffic token check)
ons template ls [OPTIONS]ons template versions
Section titled “ons template versions”List the versions of a template, with the E2B envd version of each (unknown as in ls)
ons template versions [OPTIONS] <TEMPLATE>| Argument | Description |
|---|---|
<TEMPLATE> |
The template’s name |
ons template rollback
Section titled “ons template rollback”Make an older ready version current, by number or version id
ons template rollback [OPTIONS] <TEMPLATE> <VERSION>| Argument | Description |
|---|---|
<TEMPLATE> |
The template’s name |
<VERSION> |
The version to make current: its number or its id (ons template versions) |
ons template logs
Section titled “ons template logs”Print a build’s logs, following it until it ends
ons template logs [OPTIONS] <BUILD_ID>| Argument | Description |
|---|---|
<BUILD_ID> |
The build’s id, as ons template build printed it |
| Option | Description |
|---|---|
--from <SEQ> |
The first log sequence number to print [default: 0] |
ons auth
Section titled “ons auth”AI accounts and API keys the miniVMs use without ever seeing them
ons auth [OPTIONS] <COMMAND>| Command | Description |
|---|---|
ons auth add |
Connect a subscription in the browser (when the operator allows subscriptions). Connecting one the organization already has refreshes its account |
ons auth add-key |
Add an API key, read from the terminal without echo, piped stdin or —from-file |
ons auth ls |
List the organization’s AI accounts, who added each and when |
ons auth usage |
Requests, statuses and utilisation of the last 30 days, per account |
ons auth revoke |
Delete an account: its key or login, its bindings and their grants |
ons auth block |
Stop a miniVM’s AI accounts at once; the miniVM keeps running without them |
ons auth default |
Make a subscription the organization’s default, bound to its new miniVMs. Any key of the organization can. The default API-key account is set by the operator |
ons auth add
Section titled “ons auth add”Connect a subscription in the browser (when the operator allows subscriptions). Connecting one the organization already has refreshes its account
ons auth add [OPTIONS] <PROVIDER>| Argument | Description |
|---|---|
<PROVIDER> |
The subscription to connect [possible values: claude, chatgpt] |
| Option | Description |
|---|---|
--name <NAME> |
Account name, lowercase letters, digits and dashes; defaults to the provider |
--paste |
Paste the code the provider shows instead of catching it on localhost |
ons auth add-key
Section titled “ons auth add-key”Add an API key, read from the terminal without echo, piped stdin or —from-file
ons auth add-key [OPTIONS] <PROVIDER>| Argument | Description |
|---|---|
<PROVIDER> |
Whose API key it is Possible values: - anthropic - openai - openai-compatible - github-pat: A fine-grained personal access token, for api.github.com and git over HTTPS |
| Option | Description |
|---|---|
--name <NAME> |
Account name, lowercase letters, digits and dashes; defaults to the provider |
--from-file <PATH> |
A file holding the key (first line) |
--base-url <URL> |
openai-compatible: https://<host><prefix> of a provider the operator allows |
--route <ROUTE> |
openai-compatible: the route the miniVM reaches it on (default custom) |
-h, --help |
Print help (see a summary with ‘-h’) |
ons auth ls
Section titled “ons auth ls”List the organization’s AI accounts, who added each and when
ons auth ls [OPTIONS]ons auth usage
Section titled “ons auth usage”Requests, statuses and utilisation of the last 30 days, per account
ons auth usage [OPTIONS] [ACCOUNT]| Argument | Description |
|---|---|
[ACCOUNT] |
Only this account (ons auth ls lists them); every account by default |
ons auth revoke
Section titled “ons auth revoke”Delete an account: its key or login, its bindings and their grants
ons auth revoke [OPTIONS] <ACCOUNT>| Argument | Description |
|---|---|
<ACCOUNT> |
The account’s name (ons auth ls lists them) |
ons auth block
Section titled “ons auth block”Stop a miniVM’s AI accounts at once; the miniVM keeps running without them
ons auth block [OPTIONS] <MINIVM_ID>| Argument | Description |
|---|---|
<MINIVM_ID> |
The miniVM’s id, as ons create printed it (ons ls lists yours) |
ons auth default
Section titled “ons auth default”Make a subscription the organization’s default, bound to its new miniVMs. Any key of the organization can. The default API-key account is set by the operator
ons auth default [OPTIONS] [ACCOUNT]| Argument | Description |
|---|---|
[ACCOUNT] |
The account’s name (ons auth ls lists them) |
| Option | Description |
|---|---|
--unset |
Remove the organization’s default instead: the only one, or the one of —host |
--host <HOST> |
With —unset, the host whose default to remove; required when there are several |
ons github
Section titled “ons github”GitHub: the App installation whose repositories miniVMs reach through msb.github_repos
ons github [OPTIONS] <COMMAND>| Command | Description |
|---|---|
ons github connect |
Install the miniSandbox GitHub App on your GitHub organization or account, in the browser; miniVMs then reach the repositories their msb.github_repos metadata names |
ons github status |
The installation, the repositories it reaches and each running miniVM’s permissions |
ons github disconnect |
Remove the installation from miniSandbox and revoke the tokens miniVMs hold; uninstalls the miniSandbox App from GitHub, or deletes your own App’s key and prints where to delete it |
ons github upgrade |
Where the installation’s owner accepts the App’s new permissions on GitHub, when a permission is refused as not granted by the App |
ons github grant |
Give a running miniVM GitHub permissions, each at least at the level given; answers its pending GitHub requests for them |
ons github revoke |
Take GitHub permissions back from a running miniVM: name:write lowers it to read, name or name:read removes it |
ons github requests |
GitHub permission requests made from inside miniVMs (msb-agent github request), newest first |
ons github deny |
Deny a GitHub permission request: the agent waiting on it learns it gets no permission |
ons github connect
Section titled “ons github connect”Install the miniSandbox GitHub App on your GitHub organization or account, in the browser; miniVMs then reach the repositories their msb.github_repos metadata names
ons github connect [OPTIONS]| Option | Description |
|---|---|
--name <NAME> |
Account name; defaults to github |
--own-app |
Create and install a GitHub App owned by your organization instead of installing the miniSandbox App |
--permission <NAME:LEVEL> |
A permission the App asks for besides the default ones: name:level, level read or write |
--github-dangerous |
Allow the dangerous permissions among them |
--github-org <LOGIN> |
The GitHub organization that owns the App; without it, your GitHub user does |
--yes |
Switch from the current GitHub App without asking, even when the new installation does not cover running miniVMs |
Examples:
ons github connectons github connect --own-app --github-org acmeons github connect --own-app --permission issues:write --permission workflows:write --github-dangerous—own-app creates a GitHub App your organization owns, on GitHub, then installs it. It asks for
contents:write, pull_requests:write, metadata:read, checks:read and statuses:read, plus each
—permission. Dangerous: workflows, administration, secrets, dependabot_secrets (any level) and
actions:write.
With a GitHub App already connected, the connect switches to the new one once GitHub confirmed it:
new miniVMs use the new App, running ones keep the current App until they end. ons asks first when
the new installation does not cover the repositories or permissions of running miniVMs.
ons github status
Section titled “ons github status”The installation, the repositories it reaches and each running miniVM’s permissions
ons github status [OPTIONS]ons github disconnect
Section titled “ons github disconnect”Remove the installation from miniSandbox and revoke the tokens miniVMs hold; uninstalls the miniSandbox App from GitHub, or deletes your own App’s key and prints where to delete it
ons github disconnect [OPTIONS]| Option | Description |
|---|---|
--draining |
End the draining GitHub App, the one the last switch replaced, instead of the current one |
--yes |
End it without asking |
Examples:
ons github disconnect the GitHub App new miniVMs useons github disconnect --draining the App a switch replaced, before its miniVMs endAfter a switch, the previous GitHub App drains: miniVMs started before it keep using it until they
end, then it is closed on its own. —draining ends it now; those miniVMs lose GitHub.
ons github upgrade
Section titled “ons github upgrade”Where the installation’s owner accepts the App’s new permissions on GitHub, when a permission is refused as not granted by the App
ons github upgrade [OPTIONS]The installation’s owner opens the URL printed and accepts the permissions the App
requests. A permission the App itself does not request must first be added to the App’s
settings by whoever owns the App; the installation’s owner then accepts it there. For your
organization’s own App, both pages are printed.
ons github grant
Section titled “ons github grant”Give a running miniVM GitHub permissions, each at least at the level given; answers its pending GitHub requests for them
ons github grant [OPTIONS] <MINIVM_ID> <PERMISSION>...| Argument | Description |
|---|---|
<MINIVM_ID> |
The miniVM’s id, as ons create printed it (ons ls lists yours) |
<PERMISSION>... |
name:level, level read or write (actions:read, contents:write…) |
| Option | Description |
|---|---|
--github-dangerous |
Allow the dangerous permissions among them |
Examples:
ons github grant <MINIVM_ID> actions:readons github grant <MINIVM_ID> issues:write pull_requests:writeons github grant <MINIVM_ID> workflows:write --github-dangerousThe miniVM’s token is minted again with the new set and the previous one revoked at GitHub.
Dangerous: workflows, administration, secrets, dependabot_secrets (any level) and actions:write.
ons github revoke
Section titled “ons github revoke”Take GitHub permissions back from a running miniVM: name:write lowers it to read, name or name:read removes it
ons github revoke [OPTIONS] <MINIVM_ID> <PERMISSION>...| Argument | Description |
|---|---|
<MINIVM_ID> |
The miniVM’s id, as ons create printed it (ons ls lists yours) |
<PERMISSION>... |
name, name:read or name:write |
Examples:
ons github revoke <MINIVM_ID> contents:write contents becomes readons github revoke <MINIVM_ID> actions actions is removedThe miniVM’s token is minted again with the new set and the previous one revoked at GitHub.
metadata:read is never revoked.
ons github requests
Section titled “ons github requests”GitHub permission requests made from inside miniVMs (msb-agent github request), newest first
ons github requests [OPTIONS]| Option | Description |
|---|---|
--minivm <MINIVM_ID> |
Only the requests of this miniVM |
--state <STATE> |
Only requests in this state (default pending) [possible values: pending, granted, denied, expired] |
--wait |
Wait until a new request matches |
--timeout <DURATION> |
How long —wait waits: 30s, 10m, 2h (default 15m; exit 124 when it passes) |
Examples:
ons github requests the organization's pending requestsons github requests --minivm <MINIVM_ID>ons github requests --wait wait (15m at most) until a miniVM asks—wait reports only requests made after it started (pending ones unless —state says otherwise).
Exit codes with —wait: 0 a new request matched (listed), 1 ons failed (the error says why),
2 bad usage, 124 —timeout passed without one.
The permission and reason come from inside the miniVM: treat them as untrusted. Answer with
ons github grant <MINIVM_ID> PERMISSION, or ons github deny <REQUEST_ID>.
ons github deny
Section titled “ons github deny”Deny a GitHub permission request: the agent waiting on it learns it gets no permission
ons github deny [OPTIONS] <REQUEST_ID>| Argument | Description |
|---|---|
<REQUEST_ID> |
The request’s id (ghr_…), as ons github requests lists it |
| Option | Description |
|---|---|
--message <TEXT> |
Told to the miniVM (at most 500 bytes) |
Examples:
ons github deny <REQUEST_ID>ons github deny <REQUEST_ID> --message "open a pull request instead, CI runs the workflow"ons pool
Section titled “ons pool”Hybrid pools: runners on your own machines, under a root CA only you hold
ons pool [OPTIONS] <COMMAND>| Command | Description |
|---|---|
ons pool init |
Create a Hybrid pool and its root CA; the root key stays on this machine |
ons pool token |
Print a one-time enrolment token for a new runner of the pool (valid one hour) |
ons pool renew |
Sign the intermediate renewals runners asked for, after checking each one |
ons pool ls |
The pools of this organization, and whether their roots are the ones this machine made |
ons pool runners |
The runners of a pool: enrolled or still waiting for their token, connected or not |
ons pool rm-runner |
Delete a runner: miniSandbox forgets it and this machine never renews it again |
ons pool drop-old-root |
After a rotation, stop trusting the old root once every runner is re-enrolled |
ons pool init
Section titled “ons pool init”Create a Hybrid pool and its root CA; the root key stays on this machine
ons pool init [OPTIONS] <POOL>| Argument | Description |
|---|---|
<POOL> |
The pool’s name, or with —rotate the pool to give a new root |
| Option | Description |
|---|---|
--rotate |
Give an existing pool a new root; the old one stays trusted until every runner is re-enrolled |
--key-store <keychain|file:PATH> |
Where the root key goes: keychain (macOS keychain or Linux secret-tool), or a file your secret store or KMS protects |
--yes |
Confirm without a prompt that a first order gateway key makes the organization Hybrid |
ons pool token
Section titled “ons pool token”Print a one-time enrolment token for a new runner of the pool (valid one hour)
ons pool token [OPTIONS] <POOL>| Argument | Description |
|---|---|
<POOL> |
The pool’s name (ons pool ls lists them) |
| Option | Description |
|---|---|
--accept-new-order-keys |
Trust the order keys the gateway now publishes, though they differ from the ones this machine recorded: after an announced order key rotation only |
ons pool renew
Section titled “ons pool renew”Sign the intermediate renewals runners asked for, after checking each one
ons pool renew [OPTIONS] [POOL]| Argument | Description |
|---|---|
[POOL] |
The pool’s name; the only pool on this machine by default |
| Option | Description |
|---|---|
--all |
Every pool this machine holds the root of |
ons pool ls
Section titled “ons pool ls”The pools of this organization, and whether their roots are the ones this machine made
ons pool ls [OPTIONS]ons pool runners
Section titled “ons pool runners”The runners of a pool: enrolled or still waiting for their token, connected or not
ons pool runners [OPTIONS] <POOL>| Argument | Description |
|---|---|
<POOL> |
The pool’s name (ons pool ls lists them) |
ons pool rm-runner
Section titled “ons pool rm-runner”Delete a runner: miniSandbox forgets it and this machine never renews it again
ons pool rm-runner [OPTIONS] <POOL> <RUNNER_ID>| Argument | Description |
|---|---|
<POOL> |
The pool’s name (ons pool ls lists them) |
<RUNNER_ID> |
The runner’s id (ons pool runners lists them) |
ons pool drop-old-root
Section titled “ons pool drop-old-root”After a rotation, stop trusting the old root once every runner is re-enrolled
ons pool drop-old-root [OPTIONS] <POOL>| Argument | Description |
|---|---|
<POOL> |
The pool’s name (ons pool ls lists them) |
| Option | Description |
|---|---|
--force |
Drop it even though some runners still chain to it (they stop working) |
ons trust
Section titled “ons trust”The CA bundle that makes this machine’s clients trust your Hybrid runners
ons trust [OPTIONS] <COMMAND>| Command | Description |
|---|---|
ons trust export |
Write the system CAs plus every pool root this machine trusts, for SSL_CERT_FILE and co |
ons trust add |
Trust a pool root your pool admin gave you (a PEM file), on a machine without the root key |
ons trust export
Section titled “ons trust export”Write the system CAs plus every pool root this machine trusts, for SSL_CERT_FILE and co
ons trust export [OPTIONS]| Option | Description |
|---|---|
--out <FILE> |
Write the bundle there instead of stdout |
ons trust add
Section titled “ons trust add”Trust a pool root your pool admin gave you (a PEM file), on a machine without the root key
ons trust add [OPTIONS] <PEM>| Argument | Description |
|---|---|
<PEM> |
The pool root’s PEM file |
ons keys
Section titled “ons keys”Order gateway keys: the API keys of an organization with Hybrid pools
ons keys [OPTIONS] <COMMAND>| Command | Description |
|---|---|
ons keys ls |
Every gateway key of the organization, who made it and when |
ons keys mint |
Make a key, for an application or a teammate; it is shown once |
ons keys revoke |
Revoke a key; the last one cannot be |
ons keys bootstrap |
Make the organization’s first gateway key with its API key (ons pool init does). The organization becomes Hybrid: its own template builds are refused from then on |
ons keys use |
Save a key a holder made with ons keys mint, read from a prompt or stdin |
ons keys ls
Section titled “ons keys ls”Every gateway key of the organization, who made it and when
ons keys ls [OPTIONS]ons keys mint
Section titled “ons keys mint”Make a key, for an application or a teammate; it is shown once
ons keys mint [OPTIONS] <NAME>| Argument | Description |
|---|---|
<NAME> |
Who or what the key is for, shown by ons keys ls |
ons keys revoke
Section titled “ons keys revoke”Revoke a key; the last one cannot be
ons keys revoke [OPTIONS] <KEY_ID>| Argument | Description |
|---|---|
<KEY_ID> |
The key’s id (ons keys ls lists them) |
ons keys bootstrap
Section titled “ons keys bootstrap”Make the organization’s first gateway key with its API key (ons pool init does). The organization becomes Hybrid: its own template builds are refused from then on
ons keys bootstrap [OPTIONS]| Option | Description |
|---|---|
--name <NAME> |
The key’s name, shown by ons keys ls [default: ons] |
--yes |
Confirm without a prompt that the organization becomes Hybrid |
ons keys use
Section titled “ons keys use”Save a key a holder made with ons keys mint, read from a prompt or stdin
ons keys use [OPTIONS]ons org
Section titled “ons org”Organizations: create one you own (ons login —org <ID> then works in it)
ons org [OPTIONS] <COMMAND>| Command | Description |
|---|---|
ons org create |
Create an organization you own, with its own miniVMs, keys and billing; your current login stays in its organization until you run ons login —org <ID> |
ons org create
Section titled “ons org create”Create an organization you own, with its own miniVMs, keys and billing; your current login stays in its organization until you run ons login —org <ID>
ons org create [OPTIONS] <NAME>| Argument | Description |
|---|---|
<NAME> |
The organization’s name |
Examples:
ons org create acme-research prints the new organization's idons login --org <ID> then work in it with a key of its ownons org create acme-research --json {"id", "name", "role", "created_at", "next"}The name is 1 to 63 lowercase letters, digits or ’-’, starting with a letter or digit, and
unique on the deployment. Each person may create a few organizations (the deployment sets
how many); a deployment may also take new organizations by invitation only.
ons forward
Section titled “ons forward”Reach a port of a miniVM from a local port (loopback only), as HTTP and WebSocket, on the managed pool and on Hybrid runners alike
ons forward [OPTIONS] --sandbox <MINIVM_ID> <PORT>| Argument | Description |
|---|---|
<PORT> |
The port in the miniVM |
| Option | Description |
|---|---|
--sandbox <MINIVM_ID> |
The miniVM |
--local-port <PORT> |
The local port; defaults to the miniVM’s port, 0 picks a free one |
--bind <IP> |
The local address: 127.0.0.1 or ::1, never another one [default: 127.0.0.1] |
--pool <POOL> |
Hybrid runners: also trust a pool added with ons trust add (by default only pools this machine created) |
--relay <HOST:PORT> |
Hybrid runners: dial this relay instead of the runner host’s address (tests, private relays) |
--allow-origin <ORIGIN> |
Also accept browser requests from this web origin (repeatable); by default only pages served by this forward itself may call it |
ons agent
Section titled “ons agent”Coding agents in miniVMs: start runs, wait for them, answer them, read their results
ons agent [OPTIONS] <COMMAND>| Command | Description |
|---|---|
ons agent new |
Start a coding agent on a task in a new miniVM, clone its repositories, and follow it |
ons agent start |
Start a coding agent (a run) in a miniVM, with a first prompt |
ons agent send |
Send a message to a run; answers its pending request when it needs input |
ons agent attach |
Show a run’s live stream: text, tool calls and plan |
ons agent wait |
Wait until runs reach a state; exits 0 idle, 10 needs_input, 1 failed, 2 canceled, 3 paused, 4 stalled, 5 background, 124 timeout |
ons agent status |
Show what a run does now: turn, tool calls and their output, processes, disk, context |
ons agent log |
Print a run’s history: messages, tool calls, their output, states (wakes the miniVM) |
ons agent ls |
List runs; never wakes a miniVM |
ons agent result |
Print a run’s last message, diffs, artifacts and pull requests (untrusted output) |
ons agent close |
Close a run (state done) and stop its harness; a paused miniVM is not resumed, its agentd stops the harness when it runs again |
ons agent cancel |
Cancel a run’s current turn; the harness is killed if it does not stop within 10 s |
ons agent events |
Print run events from a cursor, as JSON lines |
ons agent conformance |
Check a harness plugin end to end in a miniVM: start, question, image, cancel, pause mid-turn, resume |
ons agent new
Section titled “ons agent new”Start a coding agent on a task in a new miniVM, clone its repositories, and follow it
ons agent new [OPTIONS] --harness <HARNESS> <PROMPT|--prompt-file <FILE>>| Argument | Description |
|---|---|
[PROMPT] |
The task |
| Option | Description |
|---|---|
--prompt-file <FILE> |
Read the task from this file instead |
--harness <HARNESS> |
The coding agent: claude, codex or opencode |
--repo <OWNER/NAME> |
A GitHub repository, owner/name, cloned into /home/user/work/<name> before the run starts, through the organization’s GitHub App; repeatable |
--github-permission <NAME:LEVEL> |
A GitHub permission the miniVM’s token gets, name:level (actions:read, contents:write…), instead of the default set; repeatable, needs —repo. metadata:read is always added |
--github-dangerous |
Allow the dangerous permissions —github-permission names: workflows, administration, secrets, dependabot_secrets (any level) and actions:write |
--template <TEMPLATE> |
The template; by default the organization’s agents, built from dev-agents on first use |
--ai-account <NAME> |
Bind this AI account (ons auth ls) instead of the defaults |
--no-ai-account |
Bind no AI account: the agent signs in with your own token in the miniVM |
--label <KEY=VALUE> |
A label to find the run by (ons agent wait —label) and its miniVM by (ons ls —label); repeatable, at most 16. No secret or personal data: every member of the organization sees them |
--name <NAME> |
A name for the miniVM (1 to 64 characters, seen by every member of the organization) |
--metadata <KEY=VALUE> |
Metadata of the new miniVM, key=value, repeatable |
--timeout <SECONDS> |
Seconds before the miniVM pauses; default 4 hours, or the organization’s maximum if lower |
--permissions <MODE> |
auto (the default) never stops for a permission, ask stops the run in needs_input at each Possible values: - auto: The harness runs in its most permissive mode; only real questions stop the run - ask: Every permission request stops the run in needs_input [default: auto] |
--image <FILE> |
An image for the prompt (png, jpeg, gif, webp; 5 MiB); repeatable |
--file <FILE> |
A file dropped in the run’s inbox and linked in the prompt (64 MiB, 20); repeatable |
--detach |
Print the run and miniVM ids and return at once instead of following the run |
--stall-after <DURATION> |
Mark the run stalled after this long working without activity (1m to 24h, 0 off); agentd’s default is 10m |
--no-auto-wake |
Never prompt the agent when its background tasks end (it is still idle, waiting for them) |
--background-wait <DURATION> |
Hold the miniVM awake at most this long while the run waits for background tasks (up to 24h; agentd’s default is 2h). With 0 the hold is never renewed and the wait never times out: wait with --until …,background or a --timeout |
--idle-stop <DURATION> |
Stop the harness after the run is idle this long with no client attached (1m to 24h, 0 never); it restarts on the next prompt. agentd’s default is 30m |
--env <KEY> |
Set the miniVM’s env var KEY to your own $KEY, never KEY=VALUE; repeatable, wins over —env-file. Lowercase names work, but an error names only an UPPER_SNAKE_CASE KEY that none of your exported variables holds as a value (else —env #N), as it may be a value typed by mistake. An env var is readable by everything in the miniVM, including the agent: ons create —egress-credential keeps a value out of it (the guest only sees msb-egress-credential) |
--env-file <PATH> |
Set the miniVM’s env vars from a dotenv file (KEY=VALUE lines, # comments, optional export, quoted values, ${…} never expanded); repeatable, a later file wins over an earlier one. Readable by everything in the miniVM, including the agent |
-h, --help |
Print help (see a summary with ‘-h’) |
Examples:
ons agent new --harness claude --repo acme/app 'fix the flaky test'ons agent new --harness codex --repo acme/app --label batch=42 --detach --json 'add tests for the parser'ons agent new --harness opencode --no-ai-account --prompt-file task.mdThe miniVM comes from the organization’s agents template, built from dev-agents the first time
(a few minutes, once); —template picks another. It pauses when the run stops working and lives
4 hours by default. Following ends when the run is idle, needs input, failed, was canceled or
was paused by a hold (out of credits).
Exit codes: 0 idle, 10 needs_input, 1 failed, 2 canceled, 3 paused, 130 interrupted (Ctrl-C:
before the run starts its miniVM is killed, after it the run goes on), 255 ons itself failed.
ons agent start
Section titled “ons agent start”Start a coding agent (a run) in a miniVM, with a first prompt
ons agent start [OPTIONS] --harness <HARNESS> --prompt <TEXT> <MINIVM_ID|--template <TEMPLATE>>| Argument | Description |
|---|---|
[MINIVM_ID] |
The miniVM, created with ons create —agents |
| Option | Description |
|---|---|
--template <TEMPLATE> |
Create a miniVM for the run from this template instead |
--harness <HARNESS> |
The coding agent: claude, codex or opencode (what the template installs) |
--prompt <TEXT> |
The first prompt |
--label <KEY=VALUE> |
A label to find the run by (ons agent wait —label); repeatable, at most 16. With —template, also the new miniVM’s label (ons ls —label). No secret or personal data: every member of the organization sees them |
--name <NAME> |
With —template: a name for the new miniVM (1 to 64 characters, seen by every member of the organization) |
--image <FILE> |
An image for the prompt (png, jpeg, gif, webp; 5 MiB); repeatable |
--file <FILE> |
A file dropped in the run’s inbox and linked in the prompt (64 MiB, 20); repeatable |
--sink <SINK> |
A sink plugin of the template that also gets the run’s events, in the miniVM (github-pr-comment); repeatable, at most 4 |
--once |
Close the run at its first idle |
--permissions <MODE> |
Sent with every start: auto (the default) never stops for a permission, ask stops the run in needs_input at each request Possible values: - auto: The harness runs in its most permissive mode; only real questions stop the run - ask: Every permission request stops the run in needs_input [default: auto] |
--metadata <KEY=VALUE> |
With —template: metadata of the new miniVM, key=value, repeatable |
--timeout <SECONDS> |
With —template: seconds before the new miniVM pauses [default: 3600] |
--stall-after <DURATION> |
Mark the run stalled after this long working without activity (1m to 24h, 0 off); agentd’s default is 10m |
--idle-stop <DURATION> |
Stop the harness after the run is idle this long with no client attached (1m to 24h, 0 never); it restarts on the next prompt. agentd’s default is 30m |
--no-auto-wake |
Never prompt the agent when its background tasks end (it is still idle, waiting for them) |
--background-wait <DURATION> |
Hold the miniVM awake at most this long while the run waits for background tasks (up to 24h; agentd’s default is 2h). With 0 the hold is never renewed and the wait never times out: wait with --until …,background or a --timeout |
--env <KEY> |
Set the miniVM’s env var KEY to your own $KEY, never KEY=VALUE; repeatable, wins over —env-file. Lowercase names work, but an error names only an UPPER_SNAKE_CASE KEY that none of your exported variables holds as a value (else —env #N), as it may be a value typed by mistake. An env var is readable by everything in the miniVM, including the agent: ons create —egress-credential keeps a value out of it (the guest only sees msb-egress-credential) |
--env-file <PATH> |
Set the miniVM’s env vars from a dotenv file (KEY=VALUE lines, # comments, optional export, quoted values, ${…} never expanded); repeatable, a later file wins over an earlier one. Readable by everything in the miniVM, including the agent |
-h, --help |
Print help (see a summary with ‘-h’) |
Examples:
ons agent start <MINIVM_ID> --harness claude --prompt 'fix the failing test'ons agent start --template agents --harness codex --label batch=42 --file spec.pdf --prompt 'implement spec.pdf'ons agent start <MINIVM_ID> --harness opencode --once --prompt 'summarize the repo'The miniVM must be created with ons create —agents; —template creates one.
ons agent send
Section titled “ons agent send”Send a message to a run; answers its pending request when it needs input
ons agent send [OPTIONS] <RUN_ID> [TEXT]| Argument | Description |
|---|---|
<RUN_ID> |
The run, as ons agent start printed it (ons agent ls lists yours) |
[TEXT] |
The message |
| Option | Description |
|---|---|
--steer |
Inject into the current turn instead of queueing after it |
--allow-once |
Allow the pending permission request once |
--allow-always |
Allow the pending permission request and its kind from now on |
--deny |
Deny the pending permission request |
--image <FILE> |
An image (png, jpeg, gif, webp; 5 MiB); repeatable |
--file <FILE> |
A file dropped in the run’s inbox and linked in the message (64 MiB, 20); repeatable |
--wait |
Then wait for the end of this message’s turn (exit codes of ons agent wait) |
--timeout <DURATION> |
With —wait: how long to wait (30s, 10m, 2h); without it, until the turn ends |
Examples:
ons agent send <RUN_ID> 'also update the docs' queued after the current turnons agent send <RUN_ID> --steer 'stop, use the v2 API' injected into the current turnons agent send <RUN_ID> --deny --image shot.png 'no, push to a branch'ons agent attach
Section titled “ons agent attach”Show a run’s live stream: text, tool calls and plan
ons agent attach [OPTIONS] <RUN_ID>| Argument | Description |
|---|---|
<RUN_ID> |
The run, as ons agent start printed it (ons agent ls lists yours) |
ons agent wait
Section titled “ons agent wait”Wait until runs reach a state; exits 0 idle, 10 needs_input, 1 failed, 2 canceled, 3 paused, 4 stalled, 5 background, 124 timeout
ons agent wait [OPTIONS] <RUN_ID|--label <KEY=VALUE>>| Argument | Description |
|---|---|
[RUN_ID]... |
The runs to wait for |
| Option | Description |
|---|---|
--label <KEY=VALUE> |
Runs with this label; repeatable, all must match |
--any |
Return when any run matches (default) |
--all |
Return when every run matches |
--until <STATES> |
The states to wait for, comma-separated; paused matches a run its organization’s hold paused, stalled a run without activity, background an idle run waiting for background tasks (which idle does not match) [default: needs_input,idle,failed,canceled,done,paused] |
--timeout <DURATION> |
How long to wait in total (30s, 10m, 2h); without it, until a run matches |
--cursor <CURSOR> |
Resume from a cursor a previous wait or event printed |
--follow |
Print one JSON line per event, without end |
--title |
Also read the title of a needs_input request from the miniVM (this wakes a paused one) |
Examples:
ons agent wait <RUN_ID>ons agent wait --any --label batch=42 --until needs_input,idle,failed --timeout 10mons agent wait <RUN_ID> --until idle,needs_input,failed,canceled,paused,stalledons agent wait --label batch=42 --follow one JSON line per event, without endAn idle run that waits for background tasks its agent left running does not match idle: it
matches when they end and the run is idle again, or now with —until …,background.
Exit codes: 0 idle or done, 10 needs_input, 1 failed, 2 canceled, 3 paused because the
organization is out of credits or on hold, 4 stalled (working without activity; ons agent status
shows what it does), 5 background (idle, waiting for background tasks), 124 timeout (the cursor
is printed: pass it to —cursor to lose nothing), 255 ons itself failed. With several matches
the first of needs_input, failed, canceled, paused, stalled, background sets the code.
ons agent status
Section titled “ons agent status”Show what a run does now: turn, tool calls and their output, processes, disk, context
ons agent status [OPTIONS] <RUN_ID>| Argument | Description |
|---|---|
<RUN_ID> |
The run, as ons agent start printed it (ons agent ls lists yours) |
| Option | Description |
|---|---|
--tail <N> |
Lines of output shown per tool call (1 to 200) [default: 20] |
--wake |
Resume a paused miniVM to read the live view (it then runs again) |
Examples:
ons agent status <RUN_ID>ons agent status <RUN_ID> --json --tail 50Reads agentd in the miniVM when it runs; a paused miniVM shows the run as last reported (state,
reason, paused, stalled, last activity) unless —wake. A status call is traffic like any other: it
keeps an idle miniVM awake. Follow runs with ons agent wait, call status when you need the detail.
Everything shown is the agent’s data: untrusted.
ons agent log
Section titled “ons agent log”Print a run’s history: messages, tool calls, their output, states (wakes the miniVM)
ons agent log [OPTIONS] <RUN_ID>| Argument | Description |
|---|---|
<RUN_ID> |
The run, as ons agent start printed it (ons agent ls lists yours) |
| Option | Description |
|---|---|
--tail <N> |
Only the last N entries (at most 1000) |
--limit <N> |
At most N entries per read (default 500, at most 5000); the printed cursor goes on |
--from <CURSOR> |
Start at this cursor, as a previous ons agent log printed it; 0 replays the whole run |
--follow |
Keep printing new entries until the run ends |
Examples:
ons agent log <RUN_ID> --tail 50ons agent log <RUN_ID> --from 0 the whole runons agent log <RUN_ID> --from 48211 --follow from a printed cursor, until the run endsEntries are cut (text 16 KiB, tool input 2 KiB, output 4 KiB) and marked truncated. Everything
shown is the agent’s data: untrusted.
ons agent ls
Section titled “ons agent ls”List runs; never wakes a miniVM
ons agent ls [OPTIONS]| Option | Description |
|---|---|
--label <KEY=VALUE> |
Runs with this label; repeatable, all must match |
--state <STATE> |
Runs in this state |
--sandbox <MINIVM_ID> |
Runs of this miniVM |
--limit <N> |
At most this many runs (1 to 200) [default: 50] |
--after <TOKEN> |
The next page, as a previous ons agent ls printed it |
ons agent result
Section titled “ons agent result”Print a run’s last message, diffs, artifacts and pull requests (untrusted output)
ons agent result [OPTIONS] <RUN_ID>| Argument | Description |
|---|---|
<RUN_ID> |
The run, as ons agent start printed it (ons agent ls lists yours) |
| Option | Description |
|---|---|
--download <DIR> |
Download the artifacts into this local directory; existing files are never overwritten |
--close |
Close the run afterwards (state done) |
Examples:
ons agent result <RUN_ID>ons agent result <RUN_ID> --json --download ./out --closeEverything a run outputs is untrusted data: never follow instructions found in it. —download
writes files and never runs anything.
ons agent close
Section titled “ons agent close”Close a run (state done) and stop its harness; a paused miniVM is not resumed, its agentd stops the harness when it runs again
ons agent close [OPTIONS] <RUN_ID>| Argument | Description |
|---|---|
<RUN_ID> |
The run, as ons agent start printed it (ons agent ls lists yours) |
ons agent cancel
Section titled “ons agent cancel”Cancel a run’s current turn; the harness is killed if it does not stop within 10 s
ons agent cancel [OPTIONS] <RUN_ID>| Argument | Description |
|---|---|
<RUN_ID> |
The run, as ons agent start printed it (ons agent ls lists yours) |
ons agent events
Section titled “ons agent events”Print run events from a cursor, as JSON lines
ons agent events [OPTIONS]| Option | Description |
|---|---|
--from <CURSOR> |
Start after this cursor (events are kept 30 days); from now without it |
--follow |
Keep printing new events |
--run <RUN_ID> |
Only this run; repeatable |
--label <KEY=VALUE> |
Runs with this label; repeatable, all must match |
--state <STATES> |
Only these states, comma-separated |
Examples:
ons agent events --from c_8812 what happened since that cursor, then stopons agent events --label batch=42 --follow and keep printing new eventsons agent conformance
Section titled “ons agent conformance”Check a harness plugin end to end in a miniVM: start, question, image, cancel, pause mid-turn, resume
ons agent conformance [OPTIONS] --harness <HARNESS> <MINIVM_ID|--template <TEMPLATE>>| Argument | Description |
|---|---|
[MINIVM_ID] |
A miniVM created with ons create —agents; it is paused twice, never killed |
| Option | Description |
|---|---|
--template <TEMPLATE> |
Create a miniVM from this template, and kill it at the end |
--harness <HARNESS> |
The harness plugin to check: claude, codex, opencode or one the template adds |
--metadata <KEY=VALUE> |
With —template: metadata of the new miniVM, key=value, repeatable |
--timeout <DURATION> |
How long each journey may take (30s, 10m) [default: 5m] |
Examples:
ons agent conformance --template agents --harness claude --metadata purpose=testons agent conformance <MINIVM_ID> --harness my-agent --jsonEach journey runs the harness against its real model, which costs tokens. With —template the
miniVM is killed at the end, also on Ctrl-C; a given miniVM is paused twice and its runs are
closed. In a given miniVM the agent runs unattended: auto mode, and the question journey allows
up to 4 permission requests once without reading them.
Exit codes: 0 every journey passed, 1 one failed, 130 interrupted, 255 ons itself failed.
ons device
Section titled “ons device”Cloud mobile devices (Android, iOS) attached to a miniVM, on miniSandbox managed cloud
ons device [OPTIONS] <COMMAND>| Command | Description |
|---|---|
ons device add |
Attach a cloud mobile device to a running miniVM |
ons device ls |
List a miniVM’s cloud mobile devices, released ones included |
ons device rm |
Release a cloud mobile device now; its billing stops |
ons device keep |
Keep an idle cloud mobile device for longer than 5 minutes (at most 60 minutes per call) |
ons device kinds |
The device kinds and OS versions this deployment offers |
Examples:
ons device kinds the kinds and OS versions offeredons device add <MINIVM_ID> android_phone --wait prints the device id once it is readyons device ls <MINIVM_ID> --jsonons device keep <MINIVM_ID> <DEVICE_ID> --for 45m idle devices are released after 5 minutesons device rm <MINIVM_ID> <DEVICE_ID>Inside a miniVM, agents drive the devices with the device command instead: use device --help.
Devices are billed per started minute and released when their miniVM pauses or ends.
ons device add
Section titled “ons device add”Attach a cloud mobile device to a running miniVM
ons device add [OPTIONS] <MINIVM_ID> <KIND>| Argument | Description |
|---|---|
<MINIVM_ID> |
The miniVM’s id, as ons create printed it (ons ls lists yours) |
<KIND> |
The device kind (ons device kinds lists them) |
| Option | Description |
|---|---|
--os <VERSION> |
The OS version, instead of the kind’s default |
--wait |
Return once the device is ready, not while it is still creating |
--timeout <DURATION> |
How long —wait waits (e.g. 90s, 10m) [default: 10m] |
Examples:
ons device add <MINIVM_ID> android_phone --waitons device add <MINIVM_ID> ios_simulator --os 26 --wait --timeout 15m --jsonons device add <MINIVM_ID> ipad returns at once, state creatingThe device is billed per started minute until it is removed, its miniVM pauses or ends, or it
stays idle 5 minutes (ons device keep extends that).
ons device ls
Section titled “ons device ls”List a miniVM’s cloud mobile devices, released ones included
ons device ls [OPTIONS] <MINIVM_ID>| Argument | Description |
|---|---|
<MINIVM_ID> |
The miniVM’s id, as ons create printed it (ons ls lists yours) |
Examples:
ons device ls <MINIVM_ID>ons device ls <MINIVM_ID> --json | jq '.devices[] | select(.state == "ready") | .id'ons device rm
Section titled “ons device rm”Release a cloud mobile device now; its billing stops
ons device rm [OPTIONS] <MINIVM_ID> <DEVICE_ID>| Argument | Description |
|---|---|
<MINIVM_ID> |
The miniVM’s id, as ons create printed it (ons ls lists yours) |
<DEVICE_ID> |
The device’s id, as ons device add printed it (ons device ls lists them) |
Examples:
ons device rm <MINIVM_ID> dev_7f3k2qons device rm <MINIVM_ID> dev_7f3k2q --jsonons device keep
Section titled “ons device keep”Keep an idle cloud mobile device for longer than 5 minutes (at most 60 minutes per call)
ons device keep [OPTIONS] <MINIVM_ID> <DEVICE_ID>| Argument | Description |
|---|---|
<MINIVM_ID> |
The miniVM’s id, as ons create printed it (ons ls lists yours) |
<DEVICE_ID> |
The device’s id, as ons device add printed it (ons device ls lists them) |
| Option | Description |
|---|---|
--for <DURATION> |
How long from now, idle, before it is released (e.g. 10m, 1h; at most 1h) [default: 30m] |
Examples:
ons device keep <MINIVM_ID> dev_7f3k2q kept 30 minutes from nowons device keep <MINIVM_ID> dev_7f3k2q --for 1h --jsonons device kinds
Section titled “ons device kinds”The device kinds and OS versions this deployment offers
ons device kinds [OPTIONS]Examples:
ons device kindsons device kinds --json | jq -r '.kinds[].name'ons report
Section titled “ons report”Not available on the managed service yet.
Send a problem to support, with what ons kept of the last failed command
ons report [OPTIONS]ons report <COMMAND>| Command | Description |
|---|---|
ons report status |
A request you sent: its state and the messages sent on it |
ons report list |
The requests your organization sent |
| Option | Description |
|---|---|
--last |
Attach what ons kept of the last failed command |
-m, --message <TEXT> |
What happened, instead of reading it from stdin |
--impact <IMPACT> |
How much it stops you [default: degraded with —last, else question] [possible values: blocked, degraded, question] |
--allow-inspect <MINIVM_ID> |
Allow support to inspect this miniVM for 72 hours |
--yes |
Send without showing the preview and asking first |
Examples:
ons report --last -m 'resume never ends' the last failure and what happenedecho 'how do I keep a miniVM longer?' | ons report --yesons report --last --allow-inspect <MINIVM_ID> --impact blockedons report list the requests your organization sentons report status 1042 one request and the answers sent on itons shows exactly what it sends and asks first (—yes skips it; —json without —yes prints
the preview and sends nothing). It never sends flag values, arguments, environment variables,
files, command output or API keys.
ons report status
Section titled “ons report status”Not available on the managed service yet.
A request you sent: its state and the messages sent on it
ons report status [OPTIONS] <NUMBER>| Argument | Description |
|---|---|
<NUMBER> |
Its number, as ons report printed it (1042 or MSB-T-1042) |
ons report list
Section titled “ons report list”Not available on the managed service yet.
The requests your organization sent
ons report list [OPTIONS]ons acp
Section titled “ons acp”An ACP agent on stdio (Zed, JetBrains, any ACP client) whose coding agent runs in a miniVM
ons acp [OPTIONS] --harness <HARNESS> <--template <TEMPLATE>|--sandbox <MINIVM_ID>>| Option | Description |
|---|---|
--template <TEMPLATE> |
Create the miniVM from this template (once per agent) |
--sandbox <MINIVM_ID> |
Run in this miniVM instead, created with ons create —agents |
--harness <HARNESS> |
The coding agent: claude, codex or opencode |
--label <KEY=VALUE> |
A label of the run (and of the miniVM ons creates); repeatable |
--metadata <KEY=VALUE> |
Metadata of the miniVM ons creates, key=value; repeatable |
--timeout <SECONDS> |
Seconds before the miniVM ons creates pauses [default: 3600] |
--permissions <MODE> |
Sent with every start: auto (the default) never stops for a permission, ask stops the run in needs_input at each request Possible values: - auto: The harness runs in its most permissive mode; only real questions stop the run - ask: Every permission request stops the run in needs_input [default: auto] |
--resume-env <VAR> |
The environment variable holding the client’s id for this agent, to find its run again |
--owner-requests <MODE> |
forward (the default) shows the miniVM’s egress, secret and GitHub requests to the client as permission cards, decided with this key; off leaves them to ons and the console Possible values: - forward: As permission cards, decided with this key - off: Never: decide them with ons or in the console [default: forward] |
-h, --help |
Print help (see a summary with ‘-h’) |
Examples:
ons acp --template agents --harness claude --resume-env MY_CLIENT_AGENT_IDons acp --sandbox <MINIVM_ID> --harness codex --label team=webNothing is created before the client’s first prompt. With —resume-env VAR, when VAR holds the
client’s id for this agent, the run is labelled acp.resume=<value> and found again when the
client restarts.
ons skill
Section titled “ons skill”The agent skill for this ons version: show it or install it for a coding agent
ons skill [OPTIONS] <COMMAND>| Command | Description |
|---|---|
ons skill show |
Print the agent skill of this ons version |
ons skill install |
Install the agent skill where a coding agent reads it |
ons skill ls |
List the home-directory skill of each agent: path, the ons version that wrote it, current or stale |
ons skill update |
Reinstall the skill of this ons version wherever an older one is installed in the home directory |
ons skill path |
Print where install puts SKILL.md for a target |
ons skill show
Section titled “ons skill show”Print the agent skill of this ons version
ons skill show [OPTIONS]ons skill install
Section titled “ons skill install”Install the agent skill where a coding agent reads it
ons skill install [OPTIONS]| Option | Description |
|---|---|
--target <AGENT> |
Repeatable; agents is ~/.agents/skills, read by OpenCode and Codex Possible values: - claude - opencode - codex: Codex reads ~/.agents/skills: the same place as agents - agents [default: agents] |
--project |
Install into ./.<agent>/skills of this directory instead of the home directory |
--dir <SKILLS_DIR> |
Install into this skills directory, for any other agent |
-h, --help |
Print help (see a summary with ‘-h’) |
ons skill ls
Section titled “ons skill ls”List the home-directory skill of each agent: path, the ons version that wrote it, current or stale
ons skill ls [OPTIONS]ons skill update
Section titled “ons skill update”Reinstall the skill of this ons version wherever an older one is installed in the home directory
ons skill update [OPTIONS]ons skill path
Section titled “ons skill path”Print where install puts SKILL.md for a target
ons skill path [OPTIONS]| Option | Description |
|---|---|
--target <AGENT> |
The coding agent; agents is ~/.agents/skills, read by OpenCode and Codex Possible values: - claude - opencode - codex: Codex reads ~/.agents/skills: the same place as agents - agents [default: agents] |
--project |
Where it goes in ./.<agent>/skills of this directory instead of the home directory |
-h, --help |
Print help (see a summary with ‘-h’) |
ons update
Section titled “ons update”Replace ons with the newest signed release of its channel (alpha or stable, stored in the config)
ons update [OPTIONS]| Option | Description |
|---|---|
--version <VERSION> |
Install this version instead of the newest release, e.g. 0.2.0-alpha.1, even one the index no longer lists |
--allow-downgrade |
Allow —version to be older than the running ons |
--check |
Only print the running and the newest version |
--channel <CHANNEL> |
Follow this release channel from now on and store it; the domain ons talks to stays [possible values: alpha, stable] |
Examples:
ons update the newest release of the stored channelons update --check print it, install nothingons update --channel stable move to stable releases; ons still talks to the same domain until ons login --domain <DOMAIN>ONS_CHANNEL=stable ons update the stable channel for this run onlydevice (inside a miniVM)
Section titled “device (inside a miniVM)”device is the command your agent runs inside a miniVM of an organization with
cloud devices turned on. It is not part of ons and this section is not generated: run
device --help or device <command> --help in the miniVM for every option and examples. Every
command takes --json: one JSON value on stdout, or one JSON error line on stderr.
| Command | Description |
|---|---|
device add |
Add a cloud device to this miniVM |
device list (ls) |
List the cloud devices of this miniVM |
device kinds |
List the device kinds and OS versions you can add |
device wait |
Wait until a device is ready |
device install |
Install an app: .apk on Android; .ipa, zipped .app or .app folder on iOS |
device launch |
Launch an installed app by package name (Android) or bundle id (iOS) |
device ui |
Print the on-screen UI tree as JSON |
device tap |
Tap a point (screenshot pixels) or the element showing some text |
device type |
Type text into the focused field |
device swipe |
Swipe up, down, left or right, or from x1 y1 to x2 y2 |
device press |
Press a key or button |
device open-url |
Open a URL or deep link |
device screenshot |
Save a screenshot to a file |
device adb |
Android only: run adb against the device through a local tunnel |
device tunnel |
Make the device’s localhost:PORT reach 127.0.0.1:PORT in this miniVM, while the command runs |
device keep |
Keep a device from the idle release for a while (at most 60m per call) |
device remove (rm) |
Remove a device (it stops being billed) |
device build |
Build an app from source on a cloud builder and install it on this miniVM’s device |
device builds |
List this miniVM’s builds, newest first |
device build-logs |
Follow a build’s log to its end (an ended build’s log is replayed) |
device build-cancel |
Cancel a running build |
device builders |
List this miniVM’s builders (one per platform, released after idling) |
device builder-rm |
Release a builder now (the next build starts a new one) |
See App builds for the build commands.
device build
Section titled “device build”device build ios [OPTIONS] [PATH]device build android [OPTIONS] [PATH]PATH is the folder of the app (default: the current folder).
| Option | Description |
|---|---|
--install[=<DEV>] |
Install on this miniVM’s single ready device of the platform (the default), or on DEV |
--no-install |
Build only, install nothing |
--clean |
Build from scratch rather than incrementally |
--include <GLOB> |
Also send paths matching GLOB that .gitignore, the default skips or the secret-like rule leave out (repeatable) |
--include-secrets |
Also send every secret-like file git does not ignore (.env, keys, keystores, credentials…) |
--detach |
Return once the build has started, printing its id |
-o, --output <FILE> |
Also write the whole build log to this file (created 0600) |
--timeout <TIMEOUT> |
Longest the build may run (1m to 60m) [default: 30m] |
--replace |
Cancel the build already running on this platform’s builder and start this one |
--scheme <SCHEME> |
iOS: Xcode scheme (default: the builder picks the app’s scheme) |
--workspace <WORKSPACE> |
iOS: .xcworkspace to build, relative to the app folder |
--project <PROJECT> |
iOS: .xcodeproj to build, relative to the app folder |
--configuration <CONFIGURATION> |
iOS: build configuration (default: Debug) |
--expo-app-dir <DIR> |
iOS: folder of the Expo app in a monorepo, relative to the app folder |
--task <TASK> |
Android: Gradle task (default: assembleDebug) |
--module <MODULE> |
Android: Gradle module (default: the app module) |
Examples:
device build iosdevice build ios ./MyApp --scheme MyApp --install dev_9q1w8edevice build ios --expo-app-dir apps/mobiledevice build android --task assembleRelease --no-installdevice --json build android --detachThe source is sent from this miniVM (gitignored files, build outputs and secret-like files stay
here; secret-like files are named, and --include or --include-secrets sends them); only what
changed since the last build is sent again. Building from /, your home folder or a folder holding
credentials is refused. See What is sent. One build runs at a time per platform.
device builds, device build-logs, device build-cancel
Section titled “device builds, device build-logs, device build-cancel”device buildsdevice build-logs [OPTIONS] [ID]device build-cancel [ID]ID is a build’s id (bld_…). Without it, build-logs takes this miniVM’s newest build and
build-cancel its running build. build-logs -o <FILE> also writes the whole log to a file.
Examples:
device buildsdevice build-logs -o build.logdevice --json build-logs | jq '.errors'device build-cancel && device build iosdevice builders, device builder-rm
Section titled “device builders, device builder-rm”device buildersdevice builder-rm <ID>ID is a builder’s id (bldr_…), from device builders. builder-rm is refused while a build
runs on the builder: run device build-cancel first.
Examples:
device buildersdevice --json builders | jq -r '.builders[] | select(.platform == "ios") | .id' | xargs -n1 device builder-rmdevice tunnel
Section titled “device tunnel”device tunnel <PORT> [ID]PORT is 1024 to 65535, the same on both sides. ID is the device’s id (dev_…); leave it out
when the miniVM has a single device. It runs in the foreground until Ctrl-C, prints one line once
the tunnel is live and one line each time it reconnects after a drop. One tunnel runs per device.
Apps that connected to the port before the tunnel was live keep their old connection: relaunch
them.
Examples:
device tunnel 8081device tunnel 8081 dev_7f3k2qdevice tunnel 8081 > tunnel.log 2>&1 &See Install the CLI.