--allow-network | | Network pattern to allow for cloud sandbox egress (cloud only; can be specified multiple times) |
--clone | | Run the agent on a private in-container clone of the host Git repository (mounted read-only) instead of bind-mounting the workspace; the agent's commits are accessible via the sandbox-<name> git remote on the host |
--cloud | | Dispatch to Docker Cloud Sandboxes API instead of local sandboxd (supported by a growing set of verbs — run 'sbx --cloud --help' for the current list) |
--cpus | 0 | Number of CPUs to allocate to the sandbox (0 = auto: all host CPUs, at most 16 on Linux arm64) |
-D, --debug | | Enable debug logging |
--deny-network | | Add a per-sandbox network deny rule at creation time. Can be specified multiple times. The rule applies only to the new sandbox and can be listed or removed later with 'sbx policy ls <NAME>' or 'sbx policy rm network --sandbox <NAME> --resource <HOST>'. Safe under centralized governance because a local deny can only narrow, never widen, egress. |
-e, --env | | Set an environment variable in the sandbox (can be repeated): KEY=VALUE, or a bare KEY to take the value from the current environment |
--env-file | | Read environment variables from a file (can be repeated). --env wins over any file; a later file wins over an earlier one |
--image-ref | | OCI image reference for inline-mode cloud create (mutually exclusive with --template; requires --cpus and --memory) |
--kit | | experimental
Additional kit reference (must be a mixin; directory, ZIP, git, or OCI). Can be specified multiple times |
--kit-arg | | experimental
Value for an argument the kit declares, as name=value for every kit or kit.name=value for one (can be repeated) |
--kit-args-file | | experimental
File of name=value kit arguments, one per line (can be repeated); --kit-arg overrides |
-m, --memory | | Memory limit in binary units (e.g., 512m, 8g). Minimum: 512 MiB. Default: 50% of host memory, clamped to 512 MiB–32 GiB. Maximum: max(75% of host memory, 512 MiB) |
--mount | | Bind a host directory to a kit host-mount@1 path (can be repeated): HOST:SANDBOX_PATH. Can only be used when creating a new sandbox. |
--name | | Name for the sandbox (defaults to <agent>-<workdir>; at least two characters, starting with a letter or number, containing only letters, numbers, hyphens and periods (periods are rejected with --cloud); 'default' is reserved) |
--no-progress | | Suppress progress output |
--on-timeout | | What happens when --ttl lapses: 'stop' stops the sandbox in place so it can be started again later, 'restart' keeps it running by stopping and immediately starting it, or 'delete' removes it. Omit the flag and the server stops the sandbox when it can be started again later, and deletes it otherwise. With 'restart' a supplied --ttl must be at least 1h (cloud only). |
--platform | | Target platform: linux/amd64 or linux/arm64 (cloud only). With --image-ref, omitting it lets the server resolve the platform from the image and the CLI sends the local CPU as a hint for multi-platform images. With --template, omitting it inherits the template platform. With a sandbox kit, the kit's template is built for this platform and cached apart from other platforms; omitting it keeps the server's choice. |
-p, --publish | | Publish a sandbox port to the host (can be repeated): [[HOST_IP:]HOST_PORT:]SANDBOX_PORT[/PROTOCOL] |
--pull | | Image pull policy (always|missing|never; default: never for saved local snapshots, missing for v3 kit compositions, otherwise always) |
--skills | | Shared skills store mode for the agent's skills directory (e.g. ~/.claude/skills): off, readonly (store linked in read-only, directory stays writable), or readwrite (store mounted over it, writes are shared). Default: readonly, or the configured skills.defaultMode setting. |
--static-mcp | | MCP server names that form the sandbox's fixed (static) MCP set. Accepts a comma-separated list (--static-mcp notion,atlassian), repeated flags (--static-mcp notion --static-mcp atlassian), or a mix; all forms accumulate into the same set. The set is chosen once at creation time. Local sandboxes take names registered with 'sbx mcp add'. Cloud sandboxes resolve names on the cloud MCP gateway. |
-t, --template | | Container image to use for the sandbox (default: agent-specific image) |
--ttl | | Cloud sandbox time-to-live before it times out (e.g. 30m, 2h, 1h30m; units are case-insensitive; cloud only; default: server-side) |
-v, --volume | | experimental
Attach an existing persistent volume, NAME:MOUNTPATH (cloud only, experimental; repeatable) |