CLI reference
ry sandbox
Short-lived machines for one task each - created from a template, removed at their deadline.
ry sandbox [options] [command]Subcommands
Section titled “Subcommands”ry sandbox create
Section titled “ry sandbox create”Create a sandbox from build:<id> or app:<name> and wait until it runs.
ry sandbox create [options] <template>Options:
--ttl <duration>: How long it lives, e.g. 10m, 2h (default 5m, at most 24h).--cpus <n>: vCPUs (default 1).--memory <mb>: Memory in MB (default 512).--port <port>: A further port reachable ashttps://<port>-<id>… (repeatable, at most 8).-e, --env <KEY=VALUE>: Environment of the sandbox (repeatable) - nothing is inherited from the template app.--public: Make its URLs public (default: only with a token signed by your org).--readiness <boot|port>: Up when the VM boots (default) or when its port answers.--idle <duration>: Sleep after this much idle time (default 5m).--egress <mode>: Outbound network: allow-all (default), deny-all (nothing, not even DNS) or allowlist.--allow <domain|cidr>: With an allowlist: a domain (api.example.com, *.example.com) or IPv4 range reachable on 80/443 (repeatable, implies –egress allowlist).
Example:
ry sandbox create app:web --ttl 30mry sandbox list
Section titled “ry sandbox list”The org’s sandboxes that run (with –all: also the ended ones of the last 14 days).
ry sandbox list [options]Options:
--all: Include ended sandboxes.
Example:
ry sandbox listry sandbox list --allry sandbox show
Section titled “ry sandbox show”One sandbox: state, deadline, URLs, machine.
ry sandbox show [options] <id>Example:
ry sandbox show sbx-1a2b3c4d5e6fry sandbox exec
Section titled “ry sandbox exec”Run one command in a sandbox and exit with its exit code (the command goes after –).
ry sandbox exec [options] <id> -- <command> [args...]Options:
--timeout <seconds>: Stop the command after this many seconds (default 60, at most 290; exit code 124).--dir <path>: Working directory in the sandbox (absolute).-e, --env <KEY=VALUE>: Env for this command only (repeatable).
Example:
ry sandbox exec sbx-1a2b3c4d5e6f -- uname -ary sandbox timeout
Section titled “ry sandbox timeout”Set a sandbox’s deadline to now + duration (e.g. 30m) - like E2B setTimeout.
ry sandbox timeout [options] <id> <duration>Example:
ry sandbox timeout sbx-1a2b3c4d5e6f 1hry sandbox kill
Section titled “ry sandbox kill”End a sandbox now - its machine and everything on its disk are gone.
ry sandbox kill [options] <id>Options:
-y, --yes: Skip confirmation (required for automation).
Example:
ry sandbox kill sbx-1a2b3c4d5e6f