Skip to main content
Manage sandbox lifecycle with the 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:
Options:
  • --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)
Examples:
Expected Output (Table):
Expected Output (JSON):
Exit Codes:
  • 0 - Success
  • 3 - Authentication error
  • 4 - Template not found
  • 7 - Rate limit exceeded

list

List all sandboxes. Syntax:
Options:
  • --status TEXT - Filter by status: running, paused, stopped
  • --template TEXT - Filter by template
  • --output, -o FORMAT - Output format: table, json, plain (default: table)
Examples:
Expected Output (Table):
Exit Codes:
  • 0 - Success
  • 3 - Authentication error

info

Get detailed information about a sandbox. Syntax:
Options:
  • --output, -o FORMAT - Output format: table, json, plain (default: table)
Examples:
Expected Output (Table):
Exit Codes:
  • 0 - Success
  • 3 - Authentication error
  • 4 - Sandbox not found

pause

Pause a running sandbox (preserves state, saves resources). Syntax:
Options:
  • --force - Skip confirmation prompt
Examples:
Expected Output:
Exit Codes:
  • 0 - Success
  • 3 - Authentication error
  • 4 - Sandbox not found

resume

Resume a paused sandbox. Syntax:
Examples:
Expected Output:
Exit Codes:
  • 0 - Success
  • 3 - Authentication error
  • 4 - Sandbox not found

kill

Kill a sandbox (permanently delete). Syntax:
Options:
  • --force - Skip confirmation prompt
Examples:
Expected Output:
Exit Codes:
  • 0 - Success
  • 3 - Authentication error
  • 4 - Sandbox not found

url

Get preview URL for a service running on a port. Syntax:
Options:
  • --port INTEGER - Port number (required)
Examples:
Expected Output:
Exit Codes:
  • 0 - Success
  • 3 - Authentication error
  • 4 - Sandbox not found

Shell Scripting Examples

Create and Use Sandbox

List and Process Sandboxes

Conditional Sandbox Management

Next Steps