|
| 1 | +# TAGLINE |
| 2 | + |
| 3 | +Sandbox runtime for autonomous AI agents |
| 4 | + |
| 5 | +# TLDR |
| 6 | + |
| 7 | +Check that the CLI can reach the **local gateway** |
| 8 | + |
| 9 | +```openshell status``` |
| 10 | + |
| 11 | +Create a sandbox and start a **login shell** in it |
| 12 | + |
| 13 | +```openshell sandbox create --name [demo]``` |
| 14 | + |
| 15 | +Create a sandbox from an **image** and run a command in it |
| 16 | + |
| 17 | +```openshell sandbox create --name [worker] --from [registry.example.com/agents/python:latest] -- [python] [agent.py]``` |
| 18 | + |
| 19 | +Create a sandbox with a **policy file** |
| 20 | + |
| 21 | +```openshell sandbox create --name [my-sandbox] --policy [policy.yaml]``` |
| 22 | + |
| 23 | +**Run one command** in a sandbox that is already up |
| 24 | + |
| 25 | +```openshell sandbox exec -n [my-sandbox] -- ls -la /workspace``` |
| 26 | + |
| 27 | +**Attach** to the sandbox's main process |
| 28 | + |
| 29 | +```openshell sandbox connect [my-sandbox]``` |
| 30 | + |
| 31 | +Show the **effective policy**, including rules added by providers |
| 32 | + |
| 33 | +```openshell policy get [my-sandbox] --full``` |
| 34 | + |
| 35 | +**Allow one binary** to call one host, and wait until the sandbox loads the rule |
| 36 | + |
| 37 | +```openshell policy update [my-sandbox] --rule-name [github_readonly] --binary [/usr/bin/curl] --add-endpoint [api.github.com:443:read-only:rest:enforce] --wait``` |
| 38 | + |
| 39 | +Read recent **sandbox logs** |
| 40 | + |
| 41 | +```openshell logs [my-sandbox] --since [10m] --source [sandbox]``` |
| 42 | + |
| 43 | +List registered gateways and **switch** the active one |
| 44 | + |
| 45 | +```openshell gateway list``` |
| 46 | + |
| 47 | +```openshell gateway select [production]``` |
| 48 | + |
| 49 | +# SYNOPSIS |
| 50 | + |
| 51 | +**openshell** [**-g** _name_] [_command_] [_subcommand_] [_options_] |
| 52 | + |
| 53 | +# DESCRIPTION |
| 54 | + |
| 55 | +**openshell** is the command-line client for NVIDIA OpenShell, an open-source runtime that runs AI agents in isolated sandboxes. A local or remote **gateway** is the control plane: it creates sandboxes, stores provider credentials, and delivers policy. Enforcement happens in the sandbox. Filesystem access is confined with Landlock, process privileges and dangerous system calls are restricted, and outbound connections are checked against policy before they leave. Agents do not receive real credentials; OpenShell attaches them only to requests for approved endpoints. |
| 56 | + |
| 57 | +The installer sets up the **openshell** CLI, the **openshell-gateway** service, and the **openshell-prover** policy checker, then starts a gateway. Sandboxes run through Docker, Podman, a microVM, or Kubernetes. Without **--from**, the gateway uses its configured image, which defaults to **nvcr.io/nvidia/base/ubuntu:24.04**. That image is a minimal Ubuntu userspace: it does not include an agent, and OpenShell applies a restrictive default policy when the sandbox has none of its own. |
| 58 | + |
| 59 | +Commands use the active gateway. **-g** or **OPENSHELL_GATEWAY** selects another one for a single invocation. When a sandbox name is omitted, many commands reuse the sandbox you most recently created, connected to, or ran a command in. |
| 60 | + |
| 61 | +# PARAMETERS |
| 62 | + |
| 63 | +**-g** _name_, **--gateway** _name_ |
| 64 | + |
| 65 | +> Gateway to use instead of the active one. Also read from **OPENSHELL_GATEWAY**. |
| 66 | +
|
| 67 | +**--gateway-endpoint** _url_ |
| 68 | + |
| 69 | +> Connect to this gateway URL directly. |
| 70 | +
|
| 71 | +**--gateway-insecure** |
| 72 | + |
| 73 | +> Skip TLS certificate verification. Also set by a non-empty **OPENSHELL_GATEWAY_INSECURE** other than **0** or **false**. |
| 74 | +
|
| 75 | +**--workspace** _name_ |
| 76 | + |
| 77 | +> Workspace scope. Defaults to **default**, or **OPENSHELL_WORKSPACE**. |
| 78 | +
|
| 79 | +**-v**, **--verbose** |
| 80 | + |
| 81 | +> Increase verbosity. Repeat for more detail. |
| 82 | +
|
| 83 | +**--color** _when_ |
| 84 | + |
| 85 | +> **auto**, **always**, or **never**. **auto** colors output only on a terminal. Also **OPENSHELL_COLOR**. |
| 86 | +
|
| 87 | +**-h**, **--help** |
| 88 | + |
| 89 | +> Show help. **openshell** _command_ **--help** lists that command's subcommands. |
| 90 | +
|
| 91 | +**-V**, **--version** |
| 92 | + |
| 93 | +> Print the version. |
| 94 | +
|
| 95 | +**sandbox** (alias **sb**) |
| 96 | + |
| 97 | +> Create, list, get, start, stop, and delete sandboxes. **create** accepts **--name**, **--from** (an image reference or a **.tar** / **.tar.gz** / **.tgz** rootfs), **--policy**, **--cpu**, **--memory**, **--gpu**, **--env**, **--env-from**, **--detach**, **--no-keep**, and a trailing command. **exec -n** _name_ runs one command; **connect** attaches to the main process. **upload** and **download** copy files. Disconnect from **connect** with **Ctrl-D**, or **Ctrl-P** then **Ctrl-Q**; the main process keeps running. |
| 98 | +
|
| 99 | +**policy** (alias **pol**) |
| 100 | + |
| 101 | +> **get**, **list**, **set**, **update**, and **delete**. **set --policy** _file_ replaces the whole policy. **update** adds or removes network endpoints and allow or deny rules on a running sandbox. **--global** applies or inspects one policy for every sandbox on the gateway. **--wait** waits until the sandbox loads the revision (exit **124** on timeout). |
| 102 | +
|
| 103 | +**gateway** (alias **gw**) |
| 104 | + |
| 105 | +> **add**, **list**, **select**, **info**, **remove**, **login**, and **logout**. **add** registers an endpoint. **remove** drops the local registration and does not stop the gateway service. **select** with no name opens a chooser on a terminal. |
| 106 | +
|
| 107 | +**service** (alias **svc**) |
| 108 | + |
| 109 | +> **expose**, **list**, **get**, and **delete** HTTP services listening on loopback inside a sandbox. The gateway prints a URL that reaches that port. |
| 110 | +
|
| 111 | +**forward** (alias **fwd**) |
| 112 | + |
| 113 | +> **start**, **stop**, **list**, and **service**. Forward a local TCP port into a sandbox. |
| 114 | +
|
| 115 | +**logs** (alias **lg**) |
| 116 | + |
| 117 | +> Show sandbox or gateway logs. **-n** sets the line count (default **200**). **--tail** streams. **--since** takes a duration such as **5m** or **1h**. **--source** is **gateway**, **sandbox**, or **all**. |
| 118 | +
|
| 119 | +**provider** |
| 120 | + |
| 121 | +> **create**, **get**, **list**, **update**, and **delete** credential providers. Example: **provider create --name openai --type openai --credential OPENAI_API_KEY**. |
| 122 | +
|
| 123 | +**profile** |
| 124 | + |
| 125 | +> **list**, **describe**, **export**, **import**, **update**, **lint**, and **delete** provider profiles. |
| 126 | +
|
| 127 | +**settings** |
| 128 | + |
| 129 | +> **get**, **set --key** _name_ **--value** _value_, and **delete** sandbox or **--global** settings. |
| 130 | +
|
| 131 | +**workspace** (alias **ws**) |
| 132 | + |
| 133 | +> **create**, **get**, **list**, and **delete** workspaces. |
| 134 | +
|
| 135 | +**status** |
| 136 | + |
| 137 | +> Report whether the gateway is reachable, whether authentication succeeded, and the gateway version. **--output json** or **--output yaml** for scripts. |
| 138 | +
|
| 139 | +**whoami** |
| 140 | + |
| 141 | +> Show the identity the gateway validated. |
| 142 | +
|
| 143 | +**doctor check** |
| 144 | + |
| 145 | +> Check that a Docker-compatible runtime is installed and reachable. Hidden from the default command list; the alias is **dr**. |
| 146 | +
|
| 147 | +**term** |
| 148 | + |
| 149 | +> Open the interactive terminal UI. **--theme** is **auto**, **dark**, or **light** (**OPENSHELL_THEME**). |
| 150 | +
|
| 151 | +**completions** _shell_ |
| 152 | + |
| 153 | +> Print a shell completion script. |
| 154 | +
|
| 155 | +# CONFIGURATION |
| 156 | + |
| 157 | +The CLI stores gateway registrations under **~/.config/openshell/**. **openshell gateway select** writes the active gateway; installer-provided entries may also appear from **/etc/openshell** and are labeled **system** in **gateway list**. |
| 158 | + |
| 159 | +The gateway reads **~/.config/openshell/gateway.toml** when that file exists. On macOS with Homebrew it otherwise uses **$(brew --prefix)/var/openshell/gateway.toml**. Debian and RPM packages also load **~/.config/openshell/gateway.env** (for example **OPENSHELL_SANDBOX_RUNTIME_IMAGE** and **OPENSHELL_SUPERVISOR_IMAGE**). Check a file before restarting the service: |
| 160 | + |
| 161 | +```openshell-gateway config preflight --path ~/.config/openshell/gateway.toml``` |
| 162 | + |
| 163 | +A sandbox policy is YAML. Pass it with **sandbox create --policy** or set **OPENSHELL_SANDBOX_POLICY** to a file used for every new sandbox. An image may ship **/etc/openshell/policy.yaml**; an explicit policy replaces it. **openshell-prover** checks policy files locally and does not connect to the gateway. On snap that binary is **openshell.prover**. |
| 164 | + |
| 165 | +To turn off anonymous gateway telemetry, set **OPENSHELL_TELEMETRY_ENABLED=false** on the gateway (or **server.telemetryEnabled=false** in a Helm install). |
| 166 | + |
| 167 | +# CAVEATS |
| 168 | + |
| 169 | +Every sandbox command needs a gateway. A fresh install starts one and registers it; otherwise register an endpoint with **gateway add** and select it. |
| 170 | + |
| 171 | +Filesystem, Landlock, and process settings take effect when the sandbox starts. Network rules can be changed on a running sandbox with **policy update** or **policy set**; tightening filesystem or process rules after start is rejected, so those changes need a new sandbox. **--wait** confirms that the sandbox loaded a revision. Without it, success only means the gateway accepted the change. |
| 172 | + |
| 173 | +**--from** does not build a Dockerfile or expand a short catalog name. Pass an image reference the compute driver can see, or a rootfs tar. Rootfs tar sources work only with a local gateway using the VM driver, and the CLI and gateway must share a filesystem and user. Docker, Podman, and Kubernetes gateways reject them. |
| 174 | + |
| 175 | +Values passed with **--env** are visible to every process in the sandbox. Names that look like credentials print a warning. Put secrets on a provider profile and attach it with **--provider** so the agent does not see the raw credential. Names beginning with **OPENSHELL_** are reserved. |
| 176 | + |
| 177 | +The documented desktop installs are Linux (glibc 2.28 or newer) and macOS on Apple Silicon. Windows is experimental and uses WSL 2. Docker, Podman, or host virtualization must be available. Snap, Debian, RPM, and Homebrew installs do not migrate into each other; remove the old install before switching. A snap user gateway binds **127.0.0.1:17670**, so only one user on the machine should run it. |
| 178 | + |
| 179 | +# HISTORY |
| 180 | + |
| 181 | +NVIDIA published OpenShell in **March 2026** as an open-source runtime for running agents under a sandbox, a policy engine, and a privacy boundary. The **0.1.x** line is the stable release cadence; current documentation tracks that line (Apache License 2.0). In **October 2026** NVIDIA announced an OpenShell Reference Architecture that uses the same runtime as the software foundation for larger deployments. **0.1.0** changed **sandbox create --from**: Dockerfile paths and bare catalog names are no longer accepted. |
| 182 | + |
| 183 | +# INSTALL |
| 184 | + |
| 185 | +```aur: yay -S openshell``` |
| 186 | + |
| 187 | +```brew: brew install openshell``` |
| 188 | + |
| 189 | +```nix: nix profile install nixpkgs#openshell``` |
| 190 | + |
| 191 | +<!-- packages: 2026-10-22 --> |
| 192 | + |
| 193 | +# SEE ALSO |
| 194 | + |
| 195 | +[docker](/man/docker)(1), [podman](/man/podman)(1), [kubectl](/man/kubectl)(1), [ssh](/man/ssh)(1) |
| 196 | + |
| 197 | +# RESOURCES |
| 198 | + |
| 199 | +```[Source code](https://github.com/NVIDIA/OpenShell)``` |
| 200 | + |
| 201 | +```[Homepage](https://www.nvidia.com/en-us/ai/openshell/)``` |
| 202 | + |
| 203 | +```[Documentation](https://docs.nvidia.com/openshell/latest/index.html)``` |
| 204 | + |
| 205 | +<!-- verified: 2026-10-22 --> |
0 commit comments