Skip to main content

openshell sandbox

Alias: sb Manage sandbox lifecycle — create, connect to, list, delete, and inspect sandboxes.

openshell sandbox create

Create a new sandbox. If no gateway is active, a local gateway is bootstrapped automatically.
string
Command to run inside the sandbox after it is ready. Defaults to an interactive shell when omitted. Everything after -- is passed verbatim to the container.
string
Sandbox name. Auto-generated when omitted.
string
Sandbox source. Accepts:
  • A community sandbox name (e.g., openclaw) — resolved to ghcr.io/nvidia/openshell-community/sandboxes/<name>:latest.
  • A path to a local Dockerfile or directory containing one — the image is built and pushed automatically.
  • A full container image reference (e.g., myregistry.com/img:tag).
Override the community registry prefix with OPENSHELL_COMMUNITY_REGISTRY.
boolean
Request GPU resources. Auto-bootstraps a GPU-enabled gateway if none is active. GPU intent is also inferred automatically for community images with gpu in the name.
string
Provider name to attach to this sandbox. Repeatable: --provider openai --provider anthropic.
string
Path to a custom sandbox policy YAML file. Overrides the built-in default and the OPENSHELL_SANDBOX_POLICY env var.
string
Upload local files into the sandbox before the command runs. Format: <LOCAL_PATH>[:<SANDBOX_PATH>]. When SANDBOX_PATH is omitted, files land in /sandbox. .gitignore rules are applied by default.
boolean
Disable .gitignore filtering for --upload. Uploads all files, including those matched by .gitignore.
string
Forward a local port to the sandbox before the command starts. Format: [bind_address:]port (e.g., 8080 or 0.0.0.0:8080). Keeps the sandbox alive.
string
Launch a remote editor after the sandbox is ready. Valid values: vscode, cursor. Keeps the sandbox alive and installs the OpenShell-managed SSH config entry.
boolean
Delete the sandbox after the initial command or shell exits. Conflicts with --editor and --forward.
boolean
Force pseudo-terminal allocation for the remote command, even when auto-detection would skip it.
boolean
Disable pseudo-terminal allocation.
string
SSH destination for remote bootstrap (e.g., user@hostname). Only used when no gateway exists yet; ignored if a gateway is already active.
string
Path to SSH private key for remote bootstrap.
boolean
Never auto-bootstrap a gateway. Errors immediately if no gateway is available.
boolean
Auto-create missing providers from local environment credentials without prompting.
boolean
Never auto-create providers. Errors if required providers are missing.

Examples


openshell sandbox connect

SSH into a running sandbox. When no name is given, reconnects to the last-used sandbox.
string
Sandbox name. Defaults to the last-used sandbox.
string
Open a remote editor instead of an interactive shell. Valid values: vscode, cursor. Installs the OpenShell-managed SSH config entry if needed.

Examples


openshell sandbox list

List sandboxes on the active gateway.
integer
default:"100"
Maximum number of sandboxes to return.
integer
default:"0"
Offset into the sandbox list for pagination.
boolean
Print only sandbox IDs, one per line. Conflicts with --names.
boolean
Print only sandbox names, one per line. Conflicts with --ids.

Examples


openshell sandbox get

Fetch details for a single sandbox.
string
Sandbox name. Defaults to the last-used sandbox.

openshell sandbox delete

Delete one or more sandboxes by name.
string
required
One or more sandbox names to delete. Required unless --all is set.
boolean
Delete all sandboxes. Conflicts with positional NAME arguments.

Examples


openshell sandbox upload

Upload local files to a sandbox.
string
required
Sandbox name.
string
required
Local file or directory to upload.
string
Destination path in the sandbox. Defaults to /sandbox.
boolean
Upload everything, ignoring .gitignore rules.

openshell sandbox download

Download files from a sandbox to the local machine.
string
required
Sandbox name.
string
required
Path inside the sandbox to download.
string
Local destination. Defaults to ..

openshell sandbox ssh-config

Print an SSH Host block suitable for appending to ~/.ssh/config. Enables tools like VSCode Remote-SSH to connect to the sandbox by name.
string
Sandbox name. Defaults to the last-used sandbox.

openshell forward

Alias: fwd Manage port forwarding to a sandbox. Useful for exposing a web server, database, or any service running inside the sandbox to your local machine.

openshell forward start

Forward a local port to a running sandbox.
string
required
Port to forward. Format: [bind_address:]port (e.g., 8080 or 0.0.0.0:8080).
string
Sandbox name. Defaults to the last-used sandbox.
boolean
Run the forward in the background and exit immediately.

openshell forward stop

Stop a background port forward.
integer
required
Port that was forwarded.
string
Sandbox name. Auto-detected from active forwards if omitted.

openshell forward list

List all active port forwards.
You can also forward a port at sandbox creation time using --forward on openshell sandbox create:

openshell logs

Alias: lg View logs from a sandbox. Combines gateway and sandbox log sources.
string
Sandbox name. Defaults to the last-used sandbox.
integer
default:"200"
Number of log lines to return.
boolean
Stream live logs (follow mode).
string
Show only logs from this duration ago. Accepts Go-style durations: 5m, 1h, 30s.
string
default:"all"
Filter by log source. Valid values: gateway, sandbox, all. Repeatable for multiple sources: --source gateway --source sandbox.
string
Minimum log level to display. Valid values: error, warn, info, debug, trace. Defaults to showing all levels.

Examples


openshell term

Launch the OpenShell interactive TUI — a real-time, keyboard-driven dashboard for gateways, sandboxes, and providers.
string
default:"auto"
Color theme. Valid values: auto, dark, light. auto detects the terminal background. Also reads OPENSHELL_THEME.

Keyboard shortcuts

The TUI auto-refreshes every two seconds. Logs stream live when viewing a sandbox’s log panel.
openshell term requires an active gateway. Run openshell gateway start first if you have not deployed one.

openshell settings

Manage per-sandbox and gateway-global settings key/value pairs.

openshell settings get

Show effective settings for a sandbox or the gateway-global scope.
string
Sandbox name. Defaults to the last-used sandbox.
boolean
Show gateway-global settings instead of sandbox-level settings.
boolean
Output settings as JSON.

openshell settings set

Set a single setting key for a sandbox or gateway-global scope.
string
Sandbox name. Defaults to the last-used sandbox.
string
required
Setting key.
string
required
Setting value. Bool keys accept true/false/yes/no/1/0.
boolean
Apply at gateway-global scope.
boolean
Skip the confirmation prompt for global setting updates.

openshell settings delete

Delete a setting key.
string
Sandbox name. Defaults to the last-used sandbox.
string
required
Setting key to delete.
boolean
Delete at gateway-global scope.
boolean
Skip the confirmation prompt.

Examples