OpenShell CLI Reference#
Environment Variables#
Variable |
Description |
|---|---|
|
Gateway name to operate on (resolved from stored metadata). |
|
Gateway endpoint URL (e.g. https://gateway.example.com). Connects directly without looking up gateway metadata. |
Command Tree#
openshell
├── sandbox
│ ├── create [COMMAND]
│ ├── get [NAME]
│ ├── list
│ ├── delete [NAME]
│ ├── connect [NAME]
│ ├── upload <NAME> <LOCAL_PATH> [DEST]
│ ├── download <NAME> <SANDBOX_PATH> [DEST]
│ └── ssh-config [NAME]
├── forward
│ ├── start <PORT> [NAME]
│ ├── stop <PORT> [NAME]
│ └── list
├── logs [NAME]
├── policy
│ ├── set [NAME]
│ ├── get [NAME]
│ └── list [NAME]
├── provider
│ ├── create
│ ├── get <NAME>
│ ├── list
│ ├── update <NAME>
│ └── delete <NAME>
├── gateway
│ ├── start
│ ├── stop
│ ├── destroy
│ ├── add <ENDPOINT>
│ ├── login [NAME]
│ ├── select [NAME]
│ └── info
├── status
├── inference
│ ├── set
│ ├── update
│ └── get
├── term
└── completions <SHELL>
Sandbox Commands#
Manage sandboxes.
openshell sandbox create [COMMAND]#
Create a sandbox.
Flag |
Description |
|---|---|
|
Optional sandbox name (auto-generated when omitted). |
|
Sandbox source: a community sandbox name (e.g., |
|
Upload local files into the sandbox before running. |
|
Disable |
|
Delete the sandbox after the initial command or shell exits. |
|
Launch a remote editor after the sandbox is ready. Keeps the sandbox alive and installs OpenShell-managed SSH config. |
|
SSH destination for remote bootstrap (e.g., user@hostname). Only used when no cluster exists yet; ignored if a cluster is already active. |
|
Path to SSH private key for remote bootstrap. |
|
Provider names to attach to this sandbox. |
|
Path to a custom sandbox policy YAML file. Overrides the built-in default and the |
|
Forward a local port to the sandbox before the initial command or shell starts. Keeps the sandbox alive. |
|
Allocate a pseudo-terminal for the remote command. Defaults to auto-detection (on when stdin and stdout are terminals). Use –tty to force a PTY even when auto-detection fails, or –no-tty to disable. |
|
Disable pseudo-terminal allocation. |
|
Never bootstrap a gateway automatically; error if none is available. |
|
Auto-create missing providers from local credentials. |
|
Never auto-create providers; error if required providers are missing. |
|
Command to run after “–” (defaults to an interactive shell). |
openshell sandbox get [NAME]#
Fetch a sandbox by name.
Flag |
Description |
|---|---|
|
Sandbox name (defaults to last-used sandbox). |
openshell sandbox list#
List sandboxes.
Flag |
Default |
Description |
|---|---|---|
|
|
Maximum number of sandboxes to return. |
|
|
Offset into the sandbox list. |
|
Print only sandbox ids (one per line). |
|
|
Print only sandbox names (one per line). |
openshell sandbox delete [NAME]#
Delete a sandbox by name.
Flag |
Description |
|---|---|
|
Sandbox names. |
|
Delete all sandboxes. |
openshell sandbox connect [NAME]#
Connect to a sandbox.
When no name is given, reconnects to the last-used sandbox.
Flag |
Description |
|---|---|
|
Sandbox name (defaults to last-used sandbox). |
|
Launch a remote editor instead of an interactive shell. Installs OpenShell-managed SSH config if needed. |
openshell sandbox upload <NAME> <LOCAL_PATH> [DEST]#
Upload local files to a sandbox.
Flag |
Description |
|---|---|
|
Sandbox name. |
|
Local path to upload. |
|
Destination path in the sandbox (defaults to |
|
Disable |
openshell sandbox download <NAME> <SANDBOX_PATH> [DEST]#
Download files from a sandbox.
Flag |
Description |
|---|---|
|
Sandbox name. |
|
Sandbox path to download. |
|
Local destination (defaults to |
openshell sandbox ssh-config [NAME]#
Print an SSH config entry for a sandbox.
Outputs a Host block suitable for appending to ~/.ssh/config, enabling tools like VSCode Remote-SSH to connect to the sandbox.
Flag |
Description |
|---|---|
|
Sandbox name (defaults to last-used sandbox). |
Forward Commands#
Manage port forwarding to a sandbox.
openshell forward start <PORT> [NAME]#
Start forwarding a local port to a sandbox.
Flag |
Description |
|---|---|
|
Port to forward (used as both local and remote port). |
|
Sandbox name (defaults to last-used sandbox). |
|
Run the forward in the background and exit immediately. |
openshell forward stop <PORT> [NAME]#
Stop a background port forward.
Flag |
Description |
|---|---|
|
Port that was forwarded. |
|
Sandbox name (defaults to last-used sandbox). |
openshell forward list#
List active port forwards.
Policy Commands#
Manage sandbox policy.
openshell policy set [NAME]#
Update policy on a live sandbox.
Flag |
Default |
Description |
|---|---|---|
|
Sandbox name (defaults to last-used sandbox). |
|
|
Path to the policy YAML file. |
|
|
Wait for the sandbox to load the policy. |
|
|
|
Timeout for –wait in seconds. |
openshell policy get [NAME]#
Show current active policy for a sandbox.
Flag |
Default |
Description |
|---|---|---|
|
Sandbox name (defaults to last-used sandbox). |
|
|
|
Show a specific policy revision (default: latest). |
|
Print the full policy as YAML. |
openshell policy list [NAME]#
List policy history for a sandbox.
Flag |
Default |
Description |
|---|---|---|
|
Sandbox name (defaults to last-used sandbox). |
|
|
|
Maximum number of revisions to return. |
Provider Commands#
Manage provider configuration.
openshell provider create#
Create a provider config.
Flag |
Description |
|---|---|
|
Provider name. |
|
Provider type. |
|
Load provider credentials/config from existing local state. |
|
Provider credential pair ( |
|
Provider config key/value pair. |
openshell provider get <NAME>#
Fetch a provider by name.
Flag |
Description |
|---|---|
|
Provider name. |
openshell provider list#
List providers.
Flag |
Default |
Description |
|---|---|---|
|
|
Maximum number of providers to return. |
|
|
Offset into the provider list. |
|
Print only provider names, one per line. |
openshell provider update <NAME>#
Update an existing provider’s credentials or config.
Flag |
Description |
|---|---|
|
Provider name. |
|
Re-discover credentials from existing local state (e.g. env vars, config files). |
|
Provider credential pair ( |
|
Provider config key/value pair. |
openshell provider delete <NAME>#
Delete providers by name.
Flag |
Description |
|---|---|
|
Provider names. |
Gateway Commands#
Manage the gateway lifecycle.
openshell gateway start#
Deploy/start the gateway.
Flag |
Default |
Description |
|---|---|---|
|
|
Gateway name. Env: |
|
SSH destination for remote deployment (e.g., user@hostname). |
|
|
Path to SSH private key for remote deployment. |
|
|
|
Host port to map to the gateway (default: 8080). |
|
Override the gateway host written into cluster metadata. |
|
|
Destroy and recreate the gateway from scratch if one already exists. |
|
|
Listen on plaintext HTTP instead of mTLS. |
|
|
Disable gateway authentication (mTLS client certificate requirement). |
|
|
Authentication token for pulling container images from ghcr.io. Env: |
|
|
Enable NVIDIA GPU passthrough. |
openshell gateway stop#
Stop the gateway (preserves state).
Flag |
Description |
|---|---|
|
Gateway name (defaults to active gateway). Env: |
|
Override SSH destination (auto-resolved from gateway metadata). |
|
Path to SSH private key for remote gateway. |
openshell gateway destroy#
Destroy the gateway and its state.
Flag |
Description |
|---|---|
|
Gateway name (defaults to active gateway). Env: |
|
Override SSH destination (auto-resolved from gateway metadata). |
|
Path to SSH private key for remote gateway. |
openshell gateway add <ENDPOINT>#
Add an existing gateway.
Registers a gateway endpoint so it appears in openshell gateway select.
Without extra flags the gateway is treated as an edge-authenticated (cloud) gateway and a browser is opened for authentication.
Pass --remote <ssh-dest> to register a remote mTLS gateway whose Docker daemon is reachable over SSH. Pass --local to register a local mTLS gateway running in Docker on this machine. In both cases the CLI extracts mTLS certificates from the running container automatically.
An ssh:// endpoint (e.g., ssh://user@host:8080) is shorthand for --remote user@host with the endpoint derived from the URL.
Flag |
Description |
|---|---|
|
Gateway endpoint URL (e.g., |
|
Gateway name (auto-derived from the endpoint hostname when omitted). |
|
Register a remote mTLS gateway accessible via SSH. |
|
SSH private key for the remote host (used with |
|
Register a local mTLS gateway running in Docker on this machine. |
openshell gateway login [NAME]#
Authenticate with an edge-authenticated gateway.
Opens a browser for the edge proxy’s login flow and stores the token locally. Use this to re-authenticate when a token expires.
Flag |
Description |
|---|---|
|
Gateway name (defaults to the active gateway). |
openshell gateway select [NAME]#
Select the active gateway.
When called without a name, opens an interactive chooser on a TTY and lists available gateways in non-interactive mode.
Flag |
Description |
|---|---|
|
Gateway name (omit to choose interactively or list in non-interactive mode). |
openshell gateway info#
Show gateway deployment details.
Flag |
Description |
|---|---|
|
Gateway name (defaults to active gateway). Env: |
Inference Commands#
Manage inference configuration.
openshell inference set#
Set gateway-level inference provider and model.
Flag |
Description |
|---|---|
|
Provider name. |
|
Model identifier to force for generation calls. |
|
Configure the system inference route instead of the user-facing route. System inference is used by platform functions (e.g. the agent harness) and is not accessible to user code. |
openshell inference update#
Update gateway-level inference configuration (partial update).
Flag |
Description |
|---|---|
|
Provider name (unchanged if omitted). |
|
Model identifier (unchanged if omitted). |
|
Target the system inference route. |
openshell inference get#
Get gateway-level inference provider and model.
Flag |
Description |
|---|---|
|
Show the system inference route instead of the user-facing route. When omitted, both routes are displayed. |
Additional Commands#
openshell logs [NAME]#
View sandbox logs.
Flag |
Default |
Description |
|---|---|---|
|
Sandbox name (defaults to last-used sandbox). |
|
|
|
Number of log lines to return. |
|
Stream live logs. |
|
|
Only show logs from this duration ago (e.g. 5m, 1h, 30s). |
|
|
|
Filter by log source: “gateway”, “sandbox”, or “all” (default). Can be specified multiple times: –source gateway –source sandbox. |
|
Minimum log level to display: error, warn, info (default), debug, trace. |
openshell status#
Show gateway status and information.
openshell term#
Launch the OpenShell interactive TUI.
Flag |
Default |
Description |
|---|---|---|
|
|
Color theme for the TUI: auto, dark, or light. Env: |
openshell completions <SHELL>#
Generate shell completions.
Flag |
Description |
|---|---|
|
Shell to generate completions for. |