sandbox command (alias: sb). Create, list, pause, resume, and kill sandboxes from the command line.
Command Syntax
Subcommands
create
Create a new sandbox from a template.
Syntax:
--template, -t TEXT- Template name or ID (default:code-interpreter)--template-id TEXT- Template ID (alternative to--template)--timeout INTEGER- Auto-kill timeout in seconds (0 = no timeout)--region TEXT- Preferred deployment region (e.g.,us-east,eu-west)--env TEXT- Environment variable in KEY=VALUE format (repeatable)--env-file PATH- Load environment variables from file--no-internet- Disable internet access for sandbox--output, -o FORMAT- Output format:table,json,plain(default:table)
0- Success3- Authentication error4- Template not found7- Rate limit exceeded
list
List all sandboxes.
Syntax:
--status TEXT- Filter by status:running,paused,stopped--template TEXT- Filter by template--output, -o FORMAT- Output format:table,json,plain(default:table)
0- Success3- Authentication error
info
Get detailed information about a sandbox.
Syntax:
--output, -o FORMAT- Output format:table,json,plain(default:table)
0- Success3- Authentication error4- Sandbox not found
pause
Pause a running sandbox (preserves state, saves resources).
Syntax:
--force- Skip confirmation prompt
0- Success3- Authentication error4- Sandbox not found
resume
Resume a paused sandbox.
Syntax:
0- Success3- Authentication error4- Sandbox not found
kill
Kill a sandbox (permanently delete).
Syntax:
--force- Skip confirmation prompt
0- Success3- Authentication error4- Sandbox not found
url
Get preview URL for a service running on a port.
Syntax:
--port INTEGER- Port number (required)
0- Success3- Authentication error4- Sandbox not found
Shell Scripting Examples
Create and Use Sandbox
List and Process Sandboxes
Conditional Sandbox Management
Related
- CLI Quickstart - Get started with CLI
- Code Execution - Execute code in sandboxes
- File Operations - Manage files in sandboxes
- Python SDK: Sandbox - Python SDK sandbox methods
- JavaScript SDK: Sandbox - JavaScript SDK sandbox methods
- API: Create Sandbox - REST API endpoint
Next Steps
- Learn about Code Execution to execute code in sandboxes
- Explore File Operations to manage files
- Review Templates to list and build custom templates

