From f3d7d98099d0807e8551bf09cd888518aa27cb45 Mon Sep 17 00:00:00 2001 From: miyoungc Date: Fri, 13 Mar 2026 02:30:42 +0000 Subject: [PATCH] =?UTF-8?q?Deploy=20preview=20for=20PR=20270=20?= =?UTF-8?q?=F0=9F=9B=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pr-preview/pr-270/about/architecture.json | 2 +- pr-preview/pr-270/about/overview.json | 2 +- pr-preview/pr-270/about/release-notes.json | 2 +- pr-preview/pr-270/get-started/quickstart.json | 2 +- pr-preview/pr-270/inference/configure.json | 2 +- pr-preview/pr-270/inference/index.json | 2 +- pr-preview/pr-270/reference/cli-generated.json | 2 +- pr-preview/pr-270/reference/cli.json | 2 +- pr-preview/pr-270/reference/default-policy.json | 2 +- pr-preview/pr-270/reference/policy-schema.json | 2 +- pr-preview/pr-270/reference/support-matrix.json | 2 +- pr-preview/pr-270/resources/eula.json | 2 +- pr-preview/pr-270/sandboxes/community-sandboxes.json | 2 +- pr-preview/pr-270/sandboxes/create-and-manage.json | 2 +- pr-preview/pr-270/sandboxes/index.json | 2 +- pr-preview/pr-270/sandboxes/policies.json | 2 +- pr-preview/pr-270/sandboxes/providers.json | 2 +- pr-preview/pr-270/tutorials/github-sandbox.json | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) diff --git a/pr-preview/pr-270/about/architecture.json b/pr-preview/pr-270/about/architecture.json index bd4a58373..5dd218f80 100644 --- a/pr-preview/pr-270/about/architecture.json +++ b/pr-preview/pr-270/about/architecture.json @@ -1 +1 @@ -{"id":"about/architecture","title":"How OpenShell Works","url":"about/architecture.html","last_modified":"2026-03-13T02:26:28.122105+00:00","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"OpenShell architecture overview covering the gateway, sandbox, policy engine, and privacy router.","tags":["AI Agents","Sandboxing","Security","Architecture"],"topics":["Generative AI","Cybersecurity"],"content_type":"concept","learning_level":"technical_beginner","audience":["engineer","data_scientist"],"content":"How OpenShell Works OpenShell runs as a K3s Kubernetes cluster inside a Docker container. Each sandbox is an isolated Kubernetes pod managed through the gateway. Four components work together to keep agents secure. Components The following table describes each component and its role in the system: Component Role Gateway Control-plane API that coordinates sandbox lifecycle and state, acts as the auth boundary, and brokers requests across the platform. Sandbox Isolated runtime that includes container supervision and policy-enforced egress routing. Policy Engine Policy definition and enforcement layer for filesystem, network, and process constraints. Defense in depth enforces policies from the application layer down to infrastructure and kernel layers. Privacy Router Privacy-aware LLM routing layer that keeps sensitive context on sandbox compute and routes based on cost and privacy policy. How a Request Flows Every outbound connection from agent code passes through the same decision path: The agent process opens an outbound connection (API call, package install, git clone, and so on). The proxy inside the sandbox intercepts the connection and identifies which binary opened it. The proxy queries the policy engine with the destination, port, and calling binary. The policy engine returns one of three decisions: Allow — the destination and binary match a policy block. Traffic flows directly to the external service. Route for inference — no policy block matched, but inference routing is configured. The privacy router intercepts the request, strips the original credentials, injects the configured backend credentials, and forwards to the managed model endpoint. Deny — no match and no inference route. The connection is blocked and logged. For REST endpoints with TLS termination enabled, the proxy also decrypts TLS and checks each HTTP request against per-method, per-path rules before allowing it through. Deployment Modes OpenShell can run locally or on a remote host. The architecture is identical in both cases — only the Docker container location changes. Local : the k3s cluster runs inside Docker on your workstation. The CLI provisions it automatically on first use. Remote : the cluster runs on a remote host. Deploy with openshell gateway start --remote user@host . For example, connect to your DGX Spark. $ openshell gateway start --remote @.local\nopenshell status\nNext Steps Continue with one of the following: To create your first sandbox, refer to the Quickstart . To learn how OpenShell enforces isolation across all protection layers, refer to Sandboxes","format":"text","summary":"OpenShell runs as a K3s Kubernetes cluster inside a Docker container. Each sandbox is an isolated Kubernetes pod managed through the gateway. Four components work together to keep agents secure.","headings":[{"text":"How OpenShell Works","level":1},{"text":"Components","level":2},{"text":"How a Request Flows","level":2},{"text":"Deployment Modes","level":2},{"text":"Next Steps","level":2}]} \ No newline at end of file +{"id":"about/architecture","title":"How OpenShell Works","url":"about/architecture.html","last_modified":"2026-03-13T02:30:39.354694+00:00","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"OpenShell architecture overview covering the gateway, sandbox, policy engine, and privacy router.","tags":["AI Agents","Sandboxing","Security","Architecture"],"topics":["Generative AI","Cybersecurity"],"content_type":"concept","learning_level":"technical_beginner","audience":["engineer","data_scientist"],"content":"How OpenShell Works OpenShell runs as a K3s Kubernetes cluster inside a Docker container. Each sandbox is an isolated Kubernetes pod managed through the gateway. Four components work together to keep agents secure. Components The following table describes each component and its role in the system: Component Role Gateway Control-plane API that coordinates sandbox lifecycle and state, acts as the auth boundary, and brokers requests across the platform. Sandbox Isolated runtime that includes container supervision and policy-enforced egress routing. Policy Engine Policy definition and enforcement layer for filesystem, network, and process constraints. Defense in depth enforces policies from the application layer down to infrastructure and kernel layers. Privacy Router Privacy-aware LLM routing layer that keeps sensitive context on sandbox compute and routes based on cost and privacy policy. How a Request Flows Every outbound connection from agent code passes through the same decision path: The agent process opens an outbound connection (API call, package install, git clone, and so on). The proxy inside the sandbox intercepts the connection and identifies which binary opened it. The proxy queries the policy engine with the destination, port, and calling binary. The policy engine returns one of three decisions: Allow — the destination and binary match a policy block. Traffic flows directly to the external service. Route for inference — no policy block matched, but inference routing is configured. The privacy router intercepts the request, strips the original credentials, injects the configured backend credentials, and forwards to the managed model endpoint. Deny — no match and no inference route. The connection is blocked and logged. For REST endpoints with TLS termination enabled, the proxy also decrypts TLS and checks each HTTP request against per-method, per-path rules before allowing it through. Deployment Modes OpenShell can run locally or on a remote host. The architecture is identical in both cases — only the Docker container location changes. Local : the k3s cluster runs inside Docker on your workstation. The CLI provisions it automatically on first use. Remote : the cluster runs on a remote host. Deploy with openshell gateway start --remote user@host . For example, connect to your DGX Spark. $ openshell gateway start --remote @.local\nopenshell status\nNext Steps Continue with one of the following: To create your first sandbox, refer to the Quickstart . To learn how OpenShell enforces isolation across all protection layers, refer to Sandboxes","format":"text","summary":"OpenShell runs as a K3s Kubernetes cluster inside a Docker container. Each sandbox is an isolated Kubernetes pod managed through the gateway. Four components work together to keep agents secure.","headings":[{"text":"How OpenShell Works","level":1},{"text":"Components","level":2},{"text":"How a Request Flows","level":2},{"text":"Deployment Modes","level":2},{"text":"Next Steps","level":2}]} \ No newline at end of file diff --git a/pr-preview/pr-270/about/overview.json b/pr-preview/pr-270/about/overview.json index a47df7318..b5e4ede54 100644 --- a/pr-preview/pr-270/about/overview.json +++ b/pr-preview/pr-270/about/overview.json @@ -1 +1 @@ -{"id":"about/overview","title":"Overview of NVIDIA OpenShell","url":"about/overview.html","last_modified":"2026-03-13T02:26:28.008188+00:00","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"OpenShell is the safe, private runtime for autonomous AI agents. Run agents in sandboxed environments that protect your data, credentials, and infrastructure.","tags":["AI Agents","Sandboxing","Security","Privacy","Inference Routing"],"topics":["Generative AI","Cybersecurity"],"content_type":"concept","learning_level":"technical_beginner","audience":["engineer","data_scientist"],"content":"Overview of NVIDIA OpenShell NVIDIA OpenShell is an open-source runtime for executing autonomous AI agents in sandboxed environments with kernel-level isolation. It combines sandbox runtime controls and a declarative YAML policy so teams can run agents without giving them unrestricted access to local files, credentials, and external networks. Why OpenShell Exists AI agents are most useful when they can read files, install packages, call APIs, and use credentials. That same access can create material risk. OpenShell is designed for this tradeoff: preserve agent capability while enforcing explicit controls over what the agent can access. Common Risks and Controls The table below summarizes common failure modes and how OpenShell mitigates them. Threat Without controls With OpenShell Data exfiltration Agent uploads source code or internal files to unauthorized endpoints. Network policies allow only approved destinations; other outbound traffic is denied. Credential theft Agent reads local secrets such as SSH keys or cloud credentials. Filesystem restrictions (Landlock) confine access to declared paths only. Unauthorized API usage Agent sends prompts or data to unapproved model providers. Privacy routing and network policies control where inference traffic can go. Privilege escalation Agent attempts sudo , setuid paths, or dangerous syscall behavior. Unprivileged process identity and seccomp restrictions block escalation paths. Protection Layers at a Glance OpenShell applies defense in depth across the following policy domains. Layer What it protects When it applies Filesystem Prevents reads/writes outside allowed paths. Locked at sandbox creation. Network Blocks unauthorized outbound connections. Hot-reloadable at runtime. Process Blocks privilege escalation and dangerous syscalls. Locked at sandbox creation. Inference Reroutes model API calls to controlled backends. Hot-reloadable at runtime. For details, refer to Built-in Default Policy and Customize Sandbox Policies . Common Use Cases OpenShell supports a range of agent deployment patterns. Use Case Description Secure coding agents Run Claude Code, OpenCode, or OpenClaw with constrained file and network access. Private enterprise development Route inference to self-hosted or private backends while keeping sensitive context under your control. Compliance and audit Treat policy YAML as version-controlled security controls that can be reviewed and audited. Reusable environments Use community sandbox images or bring your own containerized runtime. Next Steps Explore these topics to go deeper: To understand the components that make up the OpenShell runtime, refer to the Architecture Overview . To install the CLI and create your first sandbox, refer to the Quickstart . To learn how OpenShell enforces isolation across all protection layers, refer to Sandboxes","format":"text","summary":"NVIDIA OpenShell is an open-source runtime for executing autonomous AI agents in sandboxed environments with kernel-level isolation. It combines sandbox runtime controls and a declarative YAML policy so teams can run agents without giving them unrestricted access to local files, credentials, and ...","headings":[{"text":"Overview of NVIDIA OpenShell","level":1},{"text":"Why OpenShell Exists","level":2},{"text":"Common Risks and Controls","level":2},{"text":"Protection Layers at a Glance","level":2},{"text":"Common Use Cases","level":2},{"text":"Next Steps","level":2}]} \ No newline at end of file +{"id":"about/overview","title":"Overview of NVIDIA OpenShell","url":"about/overview.html","last_modified":"2026-03-13T02:30:39.363465+00:00","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"OpenShell is the safe, private runtime for autonomous AI agents. Run agents in sandboxed environments that protect your data, credentials, and infrastructure.","tags":["AI Agents","Sandboxing","Security","Privacy","Inference Routing"],"topics":["Generative AI","Cybersecurity"],"content_type":"concept","learning_level":"technical_beginner","audience":["engineer","data_scientist"],"content":"Overview of NVIDIA OpenShell NVIDIA OpenShell is an open-source runtime for executing autonomous AI agents in sandboxed environments with kernel-level isolation. It combines sandbox runtime controls and a declarative YAML policy so teams can run agents without giving them unrestricted access to local files, credentials, and external networks. Why OpenShell Exists AI agents are most useful when they can read files, install packages, call APIs, and use credentials. That same access can create material risk. OpenShell is designed for this tradeoff: preserve agent capability while enforcing explicit controls over what the agent can access. Common Risks and Controls The table below summarizes common failure modes and how OpenShell mitigates them. Threat Without controls With OpenShell Data exfiltration Agent uploads source code or internal files to unauthorized endpoints. Network policies allow only approved destinations; other outbound traffic is denied. Credential theft Agent reads local secrets such as SSH keys or cloud credentials. Filesystem restrictions (Landlock) confine access to declared paths only. Unauthorized API usage Agent sends prompts or data to unapproved model providers. Privacy routing and network policies control where inference traffic can go. Privilege escalation Agent attempts sudo , setuid paths, or dangerous syscall behavior. Unprivileged process identity and seccomp restrictions block escalation paths. Protection Layers at a Glance OpenShell applies defense in depth across the following policy domains. Layer What it protects When it applies Filesystem Prevents reads/writes outside allowed paths. Locked at sandbox creation. Network Blocks unauthorized outbound connections. Hot-reloadable at runtime. Process Blocks privilege escalation and dangerous syscalls. Locked at sandbox creation. Inference Reroutes model API calls to controlled backends. Hot-reloadable at runtime. For details, refer to Built-in Default Policy and Customize Sandbox Policies . Common Use Cases OpenShell supports a range of agent deployment patterns. Use Case Description Secure coding agents Run Claude Code, OpenCode, or OpenClaw with constrained file and network access. Private enterprise development Route inference to self-hosted or private backends while keeping sensitive context under your control. Compliance and audit Treat policy YAML as version-controlled security controls that can be reviewed and audited. Reusable environments Use community sandbox images or bring your own containerized runtime. Next Steps Explore these topics to go deeper: To understand the components that make up the OpenShell runtime, refer to the Architecture Overview . To install the CLI and create your first sandbox, refer to the Quickstart . To learn how OpenShell enforces isolation across all protection layers, refer to Sandboxes","format":"text","summary":"NVIDIA OpenShell is an open-source runtime for executing autonomous AI agents in sandboxed environments with kernel-level isolation. It combines sandbox runtime controls and a declarative YAML policy so teams can run agents without giving them unrestricted access to local files, credentials, and ...","headings":[{"text":"Overview of NVIDIA OpenShell","level":1},{"text":"Why OpenShell Exists","level":2},{"text":"Common Risks and Controls","level":2},{"text":"Protection Layers at a Glance","level":2},{"text":"Common Use Cases","level":2},{"text":"Next Steps","level":2}]} \ No newline at end of file diff --git a/pr-preview/pr-270/about/release-notes.json b/pr-preview/pr-270/about/release-notes.json index 63a3a92d2..9fdd67885 100644 --- a/pr-preview/pr-270/about/release-notes.json +++ b/pr-preview/pr-270/about/release-notes.json @@ -1 +1 @@ -{"id":"about/release-notes","title":"NVIDIA OpenShell Release Notes","url":"about/release-notes.html","last_modified":"2026-03-13T02:26:28.011414+00:00","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"Track the latest changes and improvements to NVIDIA OpenShell.","tags":["Release Notes","Changelog","AI Agents"],"topics":["Generative AI","Cybersecurity"],"content_type":"reference","learning_level":"technical_beginner","audience":["engineer","data_scientist"],"content":"NVIDIA OpenShell Release Notes Track the latest changes and improvements to NVIDIA OpenShell\nThis page covers the highlights of the release\nFor more details, refer to the OpenShell GitHub Releases . 0.1.0 This is the first release of NVIDIA OpenShell. It introduces sandboxed AI agent execution with kernel-level isolation, policy enforcement, and credential management. Highlights Introduces sandboxed AI agent execution with kernel-level isolation, policy enforcement, and credential management. Introduces the openshell CLI for creating, managing, and customizing sandboxes. Introduces the openshell-gateway service for managing the gateway and sandboxes. Introduces the openshell-sandbox service for running the sandboxed agent","format":"text","summary":"Track the latest changes and improvements to NVIDIA OpenShell. This page covers the highlights of the release. For more details, refer to the OpenShell GitHub Releases.","headings":[{"text":"NVIDIA OpenShell Release Notes","level":1},{"text":"0.1.0","level":2},{"text":"Highlights","level":3}]} \ No newline at end of file +{"id":"about/release-notes","title":"NVIDIA OpenShell Release Notes","url":"about/release-notes.html","last_modified":"2026-03-13T02:30:39.359983+00:00","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"Track the latest changes and improvements to NVIDIA OpenShell.","tags":["Release Notes","Changelog","AI Agents"],"topics":["Generative AI","Cybersecurity"],"content_type":"reference","learning_level":"technical_beginner","audience":["engineer","data_scientist"],"content":"NVIDIA OpenShell Release Notes Track the latest changes and improvements to NVIDIA OpenShell\nThis page covers the highlights of the release\nFor more details, refer to the OpenShell GitHub Releases . 0.1.0 This is the first release of NVIDIA OpenShell. It introduces sandboxed AI agent execution with kernel-level isolation, policy enforcement, and credential management. Highlights Introduces sandboxed AI agent execution with kernel-level isolation, policy enforcement, and credential management. Introduces the openshell CLI for creating, managing, and customizing sandboxes. Introduces the openshell-gateway service for managing the gateway and sandboxes. Introduces the openshell-sandbox service for running the sandboxed agent","format":"text","summary":"Track the latest changes and improvements to NVIDIA OpenShell. This page covers the highlights of the release. For more details, refer to the OpenShell GitHub Releases.","headings":[{"text":"NVIDIA OpenShell Release Notes","level":1},{"text":"0.1.0","level":2},{"text":"Highlights","level":3}]} \ No newline at end of file diff --git a/pr-preview/pr-270/get-started/quickstart.json b/pr-preview/pr-270/get-started/quickstart.json index ee1440a28..9e8fa995c 100644 --- a/pr-preview/pr-270/get-started/quickstart.json +++ b/pr-preview/pr-270/get-started/quickstart.json @@ -1 +1 @@ -{"id":"get-started/quickstart","title":"Quickstart","url":"get-started/quickstart.html","last_modified":"2026-03-13T02:26:28.016305+00:00","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"Install the OpenShell CLI and create your first sandboxed AI agent in two commands.","tags":["AI Agents","Sandboxing","Installation","Quickstart"],"topics":["Generative AI","Cybersecurity"],"content_type":"get_started","learning_level":"technical_beginner","audience":["engineer","data_scientist"],"content":"Quickstart This page gets you from zero to a running, policy-enforced sandbox in two commands. Prerequisites Before you begin, make sure you have: Python 3.12 or later uv installed Docker Desktop running on your machine Install the OpenShell CLI Install the openshell package into a virtual environment. Activate your virtual environment: uv venv && source .venv/bin/activate\nInstall the CLI: uv pip install openshell\nConnect to a Remote Gateway (Optional) If you’re running locally, skip this step. The OpenShell CLI creates a gateway automatically when you create your first sandbox. Brev Deploy an OpenShell gateway on Brev by hitting Deploy on the OpenShell Launchable . After the instance is running, find the gateway URL in the Brev console under Using Secure Links . Copy the shareable URL for port 8080 — this is the gateway endpoint. $ openshell gateway add https://.brevlab.com\nopenshell status\nDGX Spark Set up your Spark with NVIDIA Sync first, or make sure SSH access is configured (such as SSH keys added to the host). Deploy to a DGX Spark machine over SSH: $ openshell gateway start --remote @.local\nopenshell status\nAfter openshell status shows the gateway as healthy, all subsequent commands route through the SSH tunnel. Create Your First OpenShell Sandbox Choose the tab that matches your agent: Claude Code Run the following command to create a sandbox with Claude Code: $ openshell sandbox create -- claude\nThe CLI prompts you to create a provider from local credentials — type yes to continue. If ANTHROPIC_API_KEY is set in your environment, it is picked up automatically. If not, you can configure it from inside the sandbox after it launches. OpenCode Run the following command to create a sandbox with OpenCode: $ openshell sandbox create -- opencode\nThe CLI prompts you to create a provider from local credentials. Type yes to continue. If OPENAI_API_KEY or OPENROUTER_API_KEY is set in your environment, it is picked up automatically. If not, you can configure it from inside the sandbox after it launches. Codex Run the following command to create a sandbox with Codex: $ openshell sandbox create -- codex\nThe CLI prompts you to create a provider from local credentials. Type yes to continue. If OPENAI_API_KEY is set in your environment, it is picked up automatically. If not, you can configure it from inside the sandbox after it launches. OpenClaw Run the following command to create a sandbox with OpenClaw: $ openshell sandbox create --from openclaw\nThe --from flag pulls a pre-built sandbox definition from the OpenShell Community catalog. Each definition bundles a container image, a tailored policy, and optional skills into a single package. Community Sandbox You can use the --from flag to pull other OpenShell sandbox images from the NVIDIA Container Registry . For example, to pull the base image, run the following command: $ openshell sandbox create --from base","format":"text","summary":"This page gets you from zero to a running, policy-enforced sandbox in two commands.","headings":[{"text":"Quickstart","level":1},{"text":"Prerequisites","level":2},{"text":"Install the OpenShell CLI","level":2},{"text":"Connect to a Remote Gateway (Optional)","level":2},{"text":"Create Your First OpenShell Sandbox","level":2}]} \ No newline at end of file +{"id":"get-started/quickstart","title":"Quickstart","url":"get-started/quickstart.html","last_modified":"2026-03-13T02:30:39.372669+00:00","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"Install the OpenShell CLI and create your first sandboxed AI agent in two commands.","tags":["AI Agents","Sandboxing","Installation","Quickstart"],"topics":["Generative AI","Cybersecurity"],"content_type":"get_started","learning_level":"technical_beginner","audience":["engineer","data_scientist"],"content":"Quickstart This page gets you from zero to a running, policy-enforced sandbox in two commands. Prerequisites Before you begin, make sure you have: Python 3.12 or later uv installed Docker Desktop running on your machine Install the OpenShell CLI Install the openshell package into a virtual environment. Activate your virtual environment: uv venv && source .venv/bin/activate\nInstall the CLI: uv pip install openshell\nConnect to a Remote Gateway (Optional) If you’re running locally, skip this step. The OpenShell CLI creates a gateway automatically when you create your first sandbox. Brev Deploy an OpenShell gateway on Brev by hitting Deploy on the OpenShell Launchable . After the instance is running, find the gateway URL in the Brev console under Using Secure Links . Copy the shareable URL for port 8080 — this is the gateway endpoint. $ openshell gateway add https://.brevlab.com\nopenshell status\nDGX Spark Set up your Spark with NVIDIA Sync first, or make sure SSH access is configured (such as SSH keys added to the host). Deploy to a DGX Spark machine over SSH: $ openshell gateway start --remote @.local\nopenshell status\nAfter openshell status shows the gateway as healthy, all subsequent commands route through the SSH tunnel. Create Your First OpenShell Sandbox Choose the tab that matches your agent: Claude Code Run the following command to create a sandbox with Claude Code: $ openshell sandbox create -- claude\nThe CLI prompts you to create a provider from local credentials — type yes to continue. If ANTHROPIC_API_KEY is set in your environment, it is picked up automatically. If not, you can configure it from inside the sandbox after it launches. OpenCode Run the following command to create a sandbox with OpenCode: $ openshell sandbox create -- opencode\nThe CLI prompts you to create a provider from local credentials. Type yes to continue. If OPENAI_API_KEY or OPENROUTER_API_KEY is set in your environment, it is picked up automatically. If not, you can configure it from inside the sandbox after it launches. Codex Run the following command to create a sandbox with Codex: $ openshell sandbox create -- codex\nThe CLI prompts you to create a provider from local credentials. Type yes to continue. If OPENAI_API_KEY is set in your environment, it is picked up automatically. If not, you can configure it from inside the sandbox after it launches. OpenClaw Run the following command to create a sandbox with OpenClaw: $ openshell sandbox create --from openclaw\nThe --from flag pulls a pre-built sandbox definition from the OpenShell Community catalog. Each definition bundles a container image, a tailored policy, and optional skills into a single package. Community Sandbox You can use the --from flag to pull other OpenShell sandbox images from the NVIDIA Container Registry . For example, to pull the base image, run the following command: $ openshell sandbox create --from base","format":"text","summary":"This page gets you from zero to a running, policy-enforced sandbox in two commands.","headings":[{"text":"Quickstart","level":1},{"text":"Prerequisites","level":2},{"text":"Install the OpenShell CLI","level":2},{"text":"Connect to a Remote Gateway (Optional)","level":2},{"text":"Create Your First OpenShell Sandbox","level":2}]} \ No newline at end of file diff --git a/pr-preview/pr-270/inference/configure.json b/pr-preview/pr-270/inference/configure.json index 27133f5bf..df91d95de 100644 --- a/pr-preview/pr-270/inference/configure.json +++ b/pr-preview/pr-270/inference/configure.json @@ -1 +1 @@ -{"id":"inference/configure","title":"Configure Inference Routing","url":"inference/configure.html","last_modified":"2026-03-13T02:26:28.021401+00:00","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"Set up the managed local inference endpoint with provider credentials and model configuration.","tags":["Inference Routing","Configuration","Privacy","LLM","Provider"],"topics":["Generative AI","Cybersecurity"],"content_type":"how_to","learning_level":"technical_intermediate","audience":["engineer"],"content":"Configure Inference Routing This page covers the managed local inference endpoint ( https://inference.local ). External inference endpoints go through sandbox network_policies — refer to Network Access Rules for details. The configuration consists of two values: Value Description Provider record The credential backend OpenShell uses to authenticate with the upstream model host. Model ID The model to use for generation requests. Step 1: Create a Provider Create a provider that holds the backend credentials you want OpenShell to use. NVIDIA API Catalog $ openshell provider create --name nvidia-prod --type nvidia --from-existing\nThis reads NVIDIA_API_KEY from your environment. Local / self-hosted endpoint $ openshell provider create\nname my-local-model\ntype openai\ncredential OPENAI_API_KEY=empty-if-not-required\nconfig OPENAI_BASE_URL=http://192.168.10.15/v1\nUse --config OPENAI_BASE_URL to point to any OpenAI-compatible server running on your network. Set OPENAI_API_KEY to a dummy value if the server does not require authentication. Anthropic $ openshell provider create --name anthropic-prod --type anthropic --from-existing\nThis reads ANTHROPIC_API_KEY from your environment. Step 2: Set Inference Routing Point inference.local at that provider and choose the model to use: $ openshell inference set\nprovider nvidia-prod\nmodel nvidia/nemotron-3-nano-30b-a3b\nStep 3: Verify the Active Config Confirm that the provider and model are set correctly: $ openshell inference get\nGateway inference\nProvider: nvidia-prod\nModel: nvidia/nemotron-3-nano-30b-a3b\nVersion: 1\nStep 4: Update Part of the Config Use update when you want to change only one field: $ openshell inference update --model nvidia/nemotron-3-nano-30b-a3b\nOr switch providers without repeating the current model: $ openshell inference update --provider openai-prod\nUse It from a Sandbox After inference is configured, code inside any sandbox can call https://inference.local directly: from openai import OpenAI\nclient = OpenAI(base_url=\"https://inference.local/v1\", api_key=\"dummy\nresponse = client.chat.completions.create\nmodel=\"anything\nmessages=[{\"role\": \"user\", \"content\": \"Hello\nThe client-supplied model is ignored for generation requests. OpenShell rewrites it to the configured model before forwarding upstream. Use this endpoint when inference should stay local to the host for privacy and security reasons. External providers that should be reached directly belong in network_policies instead. Verify the Endpoint from a Sandbox openshell inference get confirms the configuration was saved, but does not verify the upstream endpoint is reachable. To confirm end-to-end connectivity, connect to a sandbox and run: curl https://inference.local/v1/responses\nH \"Content-Type: application/json\"\nd\ninstructions\": \"You are a helpful assistant\ninput\": \"Hello\nA successful response confirms the privacy router can reach the configured backend and the model is serving requests. Gateway-scoped — every sandbox on the active gateway sees the same inference.local backend. HTTPS only — inference.local is intercepted only for HTTPS traffic. Next Steps Explore related topics: To understand the inference routing flow and supported API patterns, refer to index . To control external endpoints, refer to Network Access Rules . To manage provider records, refer to ../sandboxes/providers . To view openshell inference commands, refer to ../reference/cli","format":"text","summary":"This page covers the managed local inference endpoint (https://inference.local). External inference endpoints go through sandbox network_policies — refer to Network Access Rules for details.","headings":[{"text":"Configure Inference Routing","level":1},{"text":"Step 1: Create a Provider","level":2},{"text":"Step 2: Set Inference Routing","level":2},{"text":"Step 3: Verify the Active Config","level":2},{"text":"Step 4: Update Part of the Config","level":2},{"text":"Use It from a Sandbox","level":2},{"text":"Verify the Endpoint from a Sandbox","level":3},{"text":"Next Steps","level":2}]} \ No newline at end of file +{"id":"inference/configure","title":"Configure Inference Routing","url":"inference/configure.html","last_modified":"2026-03-13T02:30:39.448342+00:00","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"Set up the managed local inference endpoint with provider credentials and model configuration.","tags":["Inference Routing","Configuration","Privacy","LLM","Provider"],"topics":["Generative AI","Cybersecurity"],"content_type":"how_to","learning_level":"technical_intermediate","audience":["engineer"],"content":"Configure Inference Routing This page covers the managed local inference endpoint ( https://inference.local ). External inference endpoints go through sandbox network_policies — refer to Network Access Rules for details. The configuration consists of two values: Value Description Provider record The credential backend OpenShell uses to authenticate with the upstream model host. Model ID The model to use for generation requests. Step 1: Create a Provider Create a provider that holds the backend credentials you want OpenShell to use. NVIDIA API Catalog $ openshell provider create --name nvidia-prod --type nvidia --from-existing\nThis reads NVIDIA_API_KEY from your environment. Local / self-hosted endpoint $ openshell provider create\nname my-local-model\ntype openai\ncredential OPENAI_API_KEY=empty-if-not-required\nconfig OPENAI_BASE_URL=http://192.168.10.15/v1\nUse --config OPENAI_BASE_URL to point to any OpenAI-compatible server running on your network. Set OPENAI_API_KEY to a dummy value if the server does not require authentication. Anthropic $ openshell provider create --name anthropic-prod --type anthropic --from-existing\nThis reads ANTHROPIC_API_KEY from your environment. Step 2: Set Inference Routing Point inference.local at that provider and choose the model to use: $ openshell inference set\nprovider nvidia-prod\nmodel nvidia/nemotron-3-nano-30b-a3b\nStep 3: Verify the Active Config Confirm that the provider and model are set correctly: $ openshell inference get\nGateway inference\nProvider: nvidia-prod\nModel: nvidia/nemotron-3-nano-30b-a3b\nVersion: 1\nStep 4: Update Part of the Config Use update when you want to change only one field: $ openshell inference update --model nvidia/nemotron-3-nano-30b-a3b\nOr switch providers without repeating the current model: $ openshell inference update --provider openai-prod\nUse It from a Sandbox After inference is configured, code inside any sandbox can call https://inference.local directly: from openai import OpenAI\nclient = OpenAI(base_url=\"https://inference.local/v1\", api_key=\"dummy\nresponse = client.chat.completions.create\nmodel=\"anything\nmessages=[{\"role\": \"user\", \"content\": \"Hello\nThe client-supplied model is ignored for generation requests. OpenShell rewrites it to the configured model before forwarding upstream. Use this endpoint when inference should stay local to the host for privacy and security reasons. External providers that should be reached directly belong in network_policies instead. Verify the Endpoint from a Sandbox openshell inference get confirms the configuration was saved, but does not verify the upstream endpoint is reachable. To confirm end-to-end connectivity, connect to a sandbox and run: curl https://inference.local/v1/responses\nH \"Content-Type: application/json\"\nd\ninstructions\": \"You are a helpful assistant\ninput\": \"Hello\nA successful response confirms the privacy router can reach the configured backend and the model is serving requests. Gateway-scoped — every sandbox on the active gateway sees the same inference.local backend. HTTPS only — inference.local is intercepted only for HTTPS traffic. Next Steps Explore related topics: To understand the inference routing flow and supported API patterns, refer to index . To control external endpoints, refer to Network Access Rules . To manage provider records, refer to ../sandboxes/providers . To view openshell inference commands, refer to ../reference/cli","format":"text","summary":"This page covers the managed local inference endpoint (https://inference.local). External inference endpoints go through sandbox network_policies — refer to Network Access Rules for details.","headings":[{"text":"Configure Inference Routing","level":1},{"text":"Step 1: Create a Provider","level":2},{"text":"Step 2: Set Inference Routing","level":2},{"text":"Step 3: Verify the Active Config","level":2},{"text":"Step 4: Update Part of the Config","level":2},{"text":"Use It from a Sandbox","level":2},{"text":"Verify the Endpoint from a Sandbox","level":3},{"text":"Next Steps","level":2}]} \ No newline at end of file diff --git a/pr-preview/pr-270/inference/index.json b/pr-preview/pr-270/inference/index.json index 488e34ba8..42fa4c667 100644 --- a/pr-preview/pr-270/inference/index.json +++ b/pr-preview/pr-270/inference/index.json @@ -1 +1 @@ -{"id":"inference/index","title":"About Inference Routing","url":"inference/index.html","last_modified":"2026-03-13T02:26:28.026030+00:00","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"Understand how OpenShell routes inference traffic through external endpoints and the local privacy router.","tags":["Inference Routing","Privacy","AI Agents","LLM"],"topics":["Generative AI","Cybersecurity"],"content_type":"concept","learning_level":"technical_beginner","audience":["engineer","data_scientist"],"content":"About Inference Routing OpenShell handles inference in two ways: Path How It Works External endpoints Traffic to hosts like api.openai.com or api.anthropic.com is treated like any other outbound request — allowed or denied by network_policies . Refer to Network Access Rules . inference.local A special endpoint exposed inside every sandbox for inference that should stay local to the host for privacy and security. The privacy router strips the original credentials, injects the configured backend credentials, and forwards to the managed model endpoint. How inference.local Works When code inside a sandbox calls https://inference.local , the privacy router routes the request to the configured backend for that gateway. The configured model is applied to generation requests, and provider credentials are supplied by OpenShell rather than by code inside the sandbox. If code calls an external inference host directly, that traffic is evaluated only by network_policies . Property Detail Credentials No sandbox API keys needed — credentials come from the configured provider record. Configuration One provider and one model define sandbox inference. Provider support OpenAI, Anthropic, and NVIDIA providers all work through the same endpoint. Hot-refresh Provider credential changes and inference updates are picked up without recreating sandboxes. Supported API Patterns Supported request patterns depend on the provider configured for inference.local . OpenAI-compatible Pattern Method Path Chat Completions POST /v1/chat/completions Completions POST /v1/completions Responses POST /v1/responses Model Discovery GET /v1/models Model Discovery GET /v1/models/* Anthropic-compatible Pattern Method Path Messages POST /v1/messages Requests to inference.local that do not match the configured provider’s supported patterns are denied. Next Steps Continue with one of the following: To set up the backend behind inference.local , refer to configure . To control external endpoints, refer to Network Access Rules","format":"text","summary":"Traffic to hosts like api.openai.com or api.anthropic.com is treated like any other outbound request — allowed or denied by network_policies. Refer to Network Access Rules.","headings":[{"text":"About Inference Routing","level":1},{"text":"How inference.local Works","level":2},{"text":"Supported API Patterns","level":2},{"text":"Next Steps","level":2}],"children":[{"id":"inference/configure","title":"Configure Inference Routing","url":"inference/configure.html","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"Set up the managed local inference endpoint with provider credentials and model configuration.","tags":["Inference Routing","Configuration","Privacy","LLM","Provider"],"topics":["Generative AI","Cybersecurity"],"content_type":"how_to","learning_level":"technical_intermediate","audience":["engineer"],"content":"Configure Inference Routing This page covers the managed local inference endpoint ( https://inference.local ). External inference endpoints go through sandbox network_policies — refer to Network Access Rules for details. The configuration consists of two values: Value Description Provider record The credential backend OpenShell uses to authenticate with the upstream model host. Model ID The model to use for generation requests. Step 1: Create a Provider Create a provider that holds the backend credentials you want OpenShell to use. NVIDIA API Catalog $ openshell provider create --name nvidia-prod --type nvidia --from-existing\nThis reads NVIDIA_API_KEY from your environment. Local / self-hosted endpoint $ openshell provider create\nname my-local-model\ntype openai\ncredential OPENAI_API_KEY=empty-if-not-required\nconfig OPENAI_BASE_URL=http://192.168.10.15/v1\nUse --config OPENAI_BASE_URL to point to any OpenAI-compatible server running on your network. Set OPENAI_API_KEY to a dummy value if the server does not require authentication. Anthropic $ openshell provider create --name anthropic-prod --type anthropic --from-existing\nThis reads ANTHROPIC_API_KEY from your environment. Step 2: Set Inference Routing Point inference.local at that provider and choose the model to use: $ openshell inference set\nprovider nvidia-prod\nmodel nvidia/nemotron-3-nano-30b-a3b\nStep 3: Verify the Active Config Confirm that the provider and model are set correctly: $ openshell inference get\nGateway inference\nProvider: nvidia-prod\nModel: nvidia/nemotron-3-nano-30b-a3b\nVersion: 1\nStep 4: Update Part of the Config Use update when you want to change only one field: $ openshell inference update --model nvidia/nemotron-3-nano-30b-a3b\nOr switch providers without repeating the current model: $ openshell inference update --provider openai-prod\nUse It from a Sandbox After inference is configured, code inside any sandbox can call https://inference.local directly: from openai import OpenAI\nclient = OpenAI(base_url=\"https://inference.local/v1\", api_key=\"dummy\nresponse = client.chat.completions.create\nmodel=\"anything\nmessages=[{\"role\": \"user\", \"content\": \"Hello\nThe client-supplied model is ignored for generation requests. OpenShell rewrites it to the configured model before forwarding upstream. Use this endpoint when inference should stay local to the host for privacy and security reasons. External providers that should be reached directly belong in network_policies instead. Verify the Endpoint from a Sandbox openshell inference get confirms the configuration was saved, but does not verify the upstream endpoint is reachable. To confirm end-to-end connectivity, connect to a sandbox and run: curl https://inference.local/v1/responses\nH \"Content-Type: application/json\"\nd\ninstructions\": \"You are a helpful assistant\ninput\": \"Hello\nA successful response confirms the privacy router can reach the configured backend and the model is serving requests. Gateway-scoped — every sandbox on the active gateway sees the same inference.local backend. HTTPS only — inference.local is intercepted only for HTTPS traffic. Next Steps Explore related topics: To understand the inference routing flow and supported API patterns, refer to index . To control external endpoints, refer to Network Access Rules . To manage provider records, refer to ../sandboxes/providers . To view openshell inference commands, refer to ../reference/cli","format":"text","content_length":3420,"word_count":453,"summary":"This page covers the managed local inference endpoint (https://inference.local). External inference endpoints go through sandbox network_policies — refer to Network Access Rules for details.","headings":[{"text":"Configure Inference Routing","level":1,"id":"configure-inference-routing"},{"text":"Step 1: Create a Provider","level":2,"id":"step-1-create-a-provider"},{"text":"Step 2: Set Inference Routing","level":2,"id":"step-2-set-inference-routing"},{"text":"Step 3: Verify the Active Config","level":2,"id":"step-3-verify-the-active-config"},{"text":"Step 4: Update Part of the Config","level":2,"id":"step-4-update-part-of-the-config"},{"text":"Use It from a Sandbox","level":2,"id":"use-it-from-a-sandbox"},{"text":"Verify the Endpoint from a Sandbox","level":3,"id":"verify-the-endpoint-from-a-sandbox"},{"text":"Next Steps","level":2,"id":"next-steps"}],"headings_text":"Configure Inference Routing Step 1: Create a Provider Step 2: Set Inference Routing Step 3: Verify the Active Config Step 4: Update Part of the Config Use It from a Sandbox Verify the Endpoint from a Sandbox Next Steps","keywords":["access","active","after","anthropic","api_key","base_url","catalog","chat","client","config","configure","confirm","content","correctly","create","description","directly","endpoint","explore","external","field","from","gateway","hello","http","https","inference","local","messages","model","network","next","openai","openshell","part","point","provider","response","routing","rules","run","sandbox","set","step","steps","this","topics","type","update","user"],"code_blocks":[{"content":"$ openshell provider create --name nvidia-prod --type nvidia --from-existing","language":"text"},{"content":"$ openshell provider create \\\n --name my-local-model \\\n --type openai \\\n --credential OPENAI_API_KEY=empty-if-not-required \\\n --config OPENAI_BASE_URL=http://192.168.10.15/v1","language":"text"},{"content":"$ openshell provider create --name anthropic-prod --type anthropic --from-existing","language":"text"},{"content":"$ openshell inference set \\\n --provider nvidia-prod \\\n --model nvidia/nemotron-3-nano-30b-a3b","language":"text"},{"content":"$ openshell inference get\nGateway inference:\n\n Provider: nvidia-prod\n Model: nvidia/nemotron-3-nano-30b-a3b\n Version: 1","language":"text"},{"content":"$ openshell inference update --model nvidia/nemotron-3-nano-30b-a3b","language":"text"},{"content":"$ openshell inference update --provider openai-prod","language":"text"},{"content":"from openai import OpenAI\n\nclient = OpenAI(base_url=\"https://inference.local/v1\", api_key=\"dummy\")\n\nresponse = client.chat.completions.create(\n model=\"anything\",\n messages=[{\"role\": \"user\", \"content\": \"Hello\"}],\n)","language":"text"},{"content":"curl https://inference.local/v1/responses \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"instructions\": \"You are a helpful assistant.\",\n \"input\": \"Hello!\"\n }'","language":"text"}],"links":[],"images":[],"doc_type":"tutorial","section_path":["Inference","Configure"]}]} \ No newline at end of file +{"id":"inference/index","title":"About Inference Routing","url":"inference/index.html","last_modified":"2026-03-13T02:30:39.412707+00:00","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"Understand how OpenShell routes inference traffic through external endpoints and the local privacy router.","tags":["Inference Routing","Privacy","AI Agents","LLM"],"topics":["Generative AI","Cybersecurity"],"content_type":"concept","learning_level":"technical_beginner","audience":["engineer","data_scientist"],"content":"About Inference Routing OpenShell handles inference in two ways: Path How It Works External endpoints Traffic to hosts like api.openai.com or api.anthropic.com is treated like any other outbound request — allowed or denied by network_policies . Refer to Network Access Rules . inference.local A special endpoint exposed inside every sandbox for inference that should stay local to the host for privacy and security. The privacy router strips the original credentials, injects the configured backend credentials, and forwards to the managed model endpoint. How inference.local Works When code inside a sandbox calls https://inference.local , the privacy router routes the request to the configured backend for that gateway. The configured model is applied to generation requests, and provider credentials are supplied by OpenShell rather than by code inside the sandbox. If code calls an external inference host directly, that traffic is evaluated only by network_policies . Property Detail Credentials No sandbox API keys needed — credentials come from the configured provider record. Configuration One provider and one model define sandbox inference. Provider support OpenAI, Anthropic, and NVIDIA providers all work through the same endpoint. Hot-refresh Provider credential changes and inference updates are picked up without recreating sandboxes. Supported API Patterns Supported request patterns depend on the provider configured for inference.local . OpenAI-compatible Pattern Method Path Chat Completions POST /v1/chat/completions Completions POST /v1/completions Responses POST /v1/responses Model Discovery GET /v1/models Model Discovery GET /v1/models/* Anthropic-compatible Pattern Method Path Messages POST /v1/messages Requests to inference.local that do not match the configured provider’s supported patterns are denied. Next Steps Continue with one of the following: To set up the backend behind inference.local , refer to configure . To control external endpoints, refer to Network Access Rules","format":"text","summary":"Traffic to hosts like api.openai.com or api.anthropic.com is treated like any other outbound request — allowed or denied by network_policies. Refer to Network Access Rules.","headings":[{"text":"About Inference Routing","level":1},{"text":"How inference.local Works","level":2},{"text":"Supported API Patterns","level":2},{"text":"Next Steps","level":2}],"children":[{"id":"inference/configure","title":"Configure Inference Routing","url":"inference/configure.html","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"Set up the managed local inference endpoint with provider credentials and model configuration.","tags":["Inference Routing","Configuration","Privacy","LLM","Provider"],"topics":["Generative AI","Cybersecurity"],"content_type":"how_to","learning_level":"technical_intermediate","audience":["engineer"],"content":"Configure Inference Routing This page covers the managed local inference endpoint ( https://inference.local ). External inference endpoints go through sandbox network_policies — refer to Network Access Rules for details. The configuration consists of two values: Value Description Provider record The credential backend OpenShell uses to authenticate with the upstream model host. Model ID The model to use for generation requests. Step 1: Create a Provider Create a provider that holds the backend credentials you want OpenShell to use. NVIDIA API Catalog $ openshell provider create --name nvidia-prod --type nvidia --from-existing\nThis reads NVIDIA_API_KEY from your environment. Local / self-hosted endpoint $ openshell provider create\nname my-local-model\ntype openai\ncredential OPENAI_API_KEY=empty-if-not-required\nconfig OPENAI_BASE_URL=http://192.168.10.15/v1\nUse --config OPENAI_BASE_URL to point to any OpenAI-compatible server running on your network. Set OPENAI_API_KEY to a dummy value if the server does not require authentication. Anthropic $ openshell provider create --name anthropic-prod --type anthropic --from-existing\nThis reads ANTHROPIC_API_KEY from your environment. Step 2: Set Inference Routing Point inference.local at that provider and choose the model to use: $ openshell inference set\nprovider nvidia-prod\nmodel nvidia/nemotron-3-nano-30b-a3b\nStep 3: Verify the Active Config Confirm that the provider and model are set correctly: $ openshell inference get\nGateway inference\nProvider: nvidia-prod\nModel: nvidia/nemotron-3-nano-30b-a3b\nVersion: 1\nStep 4: Update Part of the Config Use update when you want to change only one field: $ openshell inference update --model nvidia/nemotron-3-nano-30b-a3b\nOr switch providers without repeating the current model: $ openshell inference update --provider openai-prod\nUse It from a Sandbox After inference is configured, code inside any sandbox can call https://inference.local directly: from openai import OpenAI\nclient = OpenAI(base_url=\"https://inference.local/v1\", api_key=\"dummy\nresponse = client.chat.completions.create\nmodel=\"anything\nmessages=[{\"role\": \"user\", \"content\": \"Hello\nThe client-supplied model is ignored for generation requests. OpenShell rewrites it to the configured model before forwarding upstream. Use this endpoint when inference should stay local to the host for privacy and security reasons. External providers that should be reached directly belong in network_policies instead. Verify the Endpoint from a Sandbox openshell inference get confirms the configuration was saved, but does not verify the upstream endpoint is reachable. To confirm end-to-end connectivity, connect to a sandbox and run: curl https://inference.local/v1/responses\nH \"Content-Type: application/json\"\nd\ninstructions\": \"You are a helpful assistant\ninput\": \"Hello\nA successful response confirms the privacy router can reach the configured backend and the model is serving requests. Gateway-scoped — every sandbox on the active gateway sees the same inference.local backend. HTTPS only — inference.local is intercepted only for HTTPS traffic. Next Steps Explore related topics: To understand the inference routing flow and supported API patterns, refer to index . To control external endpoints, refer to Network Access Rules . To manage provider records, refer to ../sandboxes/providers . To view openshell inference commands, refer to ../reference/cli","format":"text","content_length":3420,"word_count":453,"summary":"This page covers the managed local inference endpoint (https://inference.local). External inference endpoints go through sandbox network_policies — refer to Network Access Rules for details.","headings":[{"text":"Configure Inference Routing","level":1,"id":"configure-inference-routing"},{"text":"Step 1: Create a Provider","level":2,"id":"step-1-create-a-provider"},{"text":"Step 2: Set Inference Routing","level":2,"id":"step-2-set-inference-routing"},{"text":"Step 3: Verify the Active Config","level":2,"id":"step-3-verify-the-active-config"},{"text":"Step 4: Update Part of the Config","level":2,"id":"step-4-update-part-of-the-config"},{"text":"Use It from a Sandbox","level":2,"id":"use-it-from-a-sandbox"},{"text":"Verify the Endpoint from a Sandbox","level":3,"id":"verify-the-endpoint-from-a-sandbox"},{"text":"Next Steps","level":2,"id":"next-steps"}],"headings_text":"Configure Inference Routing Step 1: Create a Provider Step 2: Set Inference Routing Step 3: Verify the Active Config Step 4: Update Part of the Config Use It from a Sandbox Verify the Endpoint from a Sandbox Next Steps","keywords":["access","active","after","anthropic","api_key","base_url","catalog","chat","client","config","configure","confirm","content","correctly","create","description","directly","endpoint","explore","external","field","from","gateway","hello","http","https","inference","local","messages","model","network","next","openai","openshell","part","point","provider","response","routing","rules","run","sandbox","set","step","steps","this","topics","type","update","user"],"code_blocks":[{"content":"$ openshell provider create --name nvidia-prod --type nvidia --from-existing","language":"text"},{"content":"$ openshell provider create \\\n --name my-local-model \\\n --type openai \\\n --credential OPENAI_API_KEY=empty-if-not-required \\\n --config OPENAI_BASE_URL=http://192.168.10.15/v1","language":"text"},{"content":"$ openshell provider create --name anthropic-prod --type anthropic --from-existing","language":"text"},{"content":"$ openshell inference set \\\n --provider nvidia-prod \\\n --model nvidia/nemotron-3-nano-30b-a3b","language":"text"},{"content":"$ openshell inference get\nGateway inference:\n\n Provider: nvidia-prod\n Model: nvidia/nemotron-3-nano-30b-a3b\n Version: 1","language":"text"},{"content":"$ openshell inference update --model nvidia/nemotron-3-nano-30b-a3b","language":"text"},{"content":"$ openshell inference update --provider openai-prod","language":"text"},{"content":"from openai import OpenAI\n\nclient = OpenAI(base_url=\"https://inference.local/v1\", api_key=\"dummy\")\n\nresponse = client.chat.completions.create(\n model=\"anything\",\n messages=[{\"role\": \"user\", \"content\": \"Hello\"}],\n)","language":"text"},{"content":"curl https://inference.local/v1/responses \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"instructions\": \"You are a helpful assistant.\",\n \"input\": \"Hello!\"\n }'","language":"text"}],"links":[],"images":[],"doc_type":"tutorial","section_path":["Inference","Configure"]}]} \ No newline at end of file diff --git a/pr-preview/pr-270/reference/cli-generated.json b/pr-preview/pr-270/reference/cli-generated.json index 448fb8149..9377640de 100644 --- a/pr-preview/pr-270/reference/cli-generated.json +++ b/pr-preview/pr-270/reference/cli-generated.json @@ -1 +1 @@ -{"id":"reference/cli-generated","title":"OpenShell CLI Reference","url":"reference/cli-generated.html","last_modified":"2026-03-13T02:26:28.044745+00:00","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"content":"OpenShell CLI Reference\nEnvironment Variables Variable Description OPENSHELL_GATEWAY Gateway name to operate on (resolved from stored metadata). OPENSHELL_GATEWAY_ENDPOINT Gateway endpoint URL (e.g. https://gateway.example.com ). Connects directly without looking up gateway metadata. Command Tree openshell\nsandbox\n├── create [COMMAND\n├── get [NAME\n├── list\n├── delete [NAME\n├── connect [NAME\n├── upload [DEST\n├── download [DEST\n└── ssh-config [NAME\nforward\n├── start [NAME\n├── stop [NAME\n└── list\nlogs [NAME\npolicy\n├── set [NAME\n├── get [NAME\n└── list [NAME\nprovider\n├── create\n├── get Optional sandbox name (auto-generated when omitted). --from Sandbox source: a community sandbox name (e.g., openclaw ), a path to a Dockerfile or directory containing one, or a full container image reference (e.g., myregistry.com/img:tag ). --upload Upload local files into the sandbox before running. --no-git-ignore Disable .gitignore filtering for --upload . --no-keep Delete the sandbox after the initial command or shell exits. --editor Launch a remote editor after the sandbox is ready. Keeps the sandbox alive and installs OpenShell-managed SSH config. --remote SSH destination for remote bootstrap (e.g., user@hostname). Only used when no cluster exists yet; ignored if a cluster is already active. --ssh-key Path to SSH private key for remote bootstrap. --provider Provider names to attach to this sandbox. --policy Path to a custom sandbox policy YAML file. Overrides the built-in default and the OPENSHELL_SANDBOX_POLICY env var. --forward Forward a local port to the sandbox before the initial command or shell starts. Keeps the sandbox alive. --tty 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. --no-tty Disable pseudo-terminal allocation. --no-bootstrap Never bootstrap a gateway automatically; error if none is available. --auto-providers Auto-create missing providers from local credentials. --no-auto-providers Never auto-create providers; error if required providers are missing. [COMMAND] Command to run after “–” (defaults to an interactive shell). openshell sandbox get [NAME] Fetch a sandbox by name. Flag Description [NAME] Sandbox name (defaults to last-used sandbox). openshell sandbox list List sandboxes. Flag Default Description --limit 100 Maximum number of sandboxes to return. --offset 0 Offset into the sandbox list. --ids Print only sandbox ids (one per line). --names Print only sandbox names (one per line). openshell sandbox delete [NAME] Delete a sandbox by name. Flag Description [NAME] Sandbox names. --all Delete all sandboxes. openshell sandbox connect [NAME] Connect to a sandbox. When no name is given, reconnects to the last-used sandbox. Flag Description [NAME] Sandbox name (defaults to last-used sandbox). --editor Launch a remote editor instead of an interactive shell. Installs OpenShell-managed SSH config if needed. openshell sandbox upload [DEST] Upload local files to a sandbox. Flag Description Sandbox name. Local path to upload. [DEST] Destination path in the sandbox (defaults to /sandbox ). --no-git-ignore Disable .gitignore filtering (uploads everything). openshell sandbox download [DEST] Download files from a sandbox. Flag Description Sandbox name. Sandbox path to download. [DEST] 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 [NAME] Sandbox name (defaults to last-used sandbox). Forward Commands Manage port forwarding to a sandbox. openshell forward start [NAME] Start forwarding a local port to a sandbox. Flag Description Port to forward (used as both local and remote port). [NAME] Sandbox name (defaults to last-used sandbox). -d , --background Run the forward in the background and exit immediately. openshell forward stop [NAME] Stop a background port forward. Flag Description Port that was forwarded. [NAME] 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 [NAME] Sandbox name (defaults to last-used sandbox). --policy Path to the policy YAML file. --wait Wait for the sandbox to load the policy. --timeout 60 Timeout for –wait in seconds. openshell policy get [NAME] Show current active policy for a sandbox. Flag Default Description [NAME] Sandbox name (defaults to last-used sandbox). --rev 0 Show a specific policy revision (default: latest). --full Print the full policy as YAML. openshell policy list [NAME] List policy history for a sandbox. Flag Default Description [NAME] Sandbox name (defaults to last-used sandbox). --limit 20 Maximum number of revisions to return. Provider Commands Manage provider configuration. openshell provider create Create a provider config. Flag Description --name Provider name. --type Provider type. --from-existing Load provider credentials/config from existing local state. --credential Provider credential pair ( KEY=VALUE ) or env lookup key ( KEY ). --config Provider config key/value pair. openshell provider get Fetch a provider by name. Flag Description Provider name. openshell provider list List providers. Flag Default Description --limit 100 Maximum number of providers to return. --offset 0 Offset into the provider list. --names Print only provider names, one per line. openshell provider update Update an existing provider’s credentials or config. Flag Description Provider name. --from-existing Re-discover credentials from existing local state (e.g. env vars, config files). --credential Provider credential pair ( KEY=VALUE ) or env lookup key ( KEY ). --config Provider config key/value pair. openshell provider delete Delete providers by name. Flag Description Provider names. Gateway Commands Manage the gateway lifecycle. openshell gateway start Deploy/start the gateway. Flag Default Description --name openshell Gateway name. Env: OPENSHELL_GATEWAY . --remote SSH destination for remote deployment (e.g., user@hostname). --ssh-key Path to SSH private key for remote deployment. --port 8080 Host port to map to the gateway (default: 8080). --gateway-host Override the gateway host written into cluster metadata. --recreate Destroy and recreate the gateway from scratch if one already exists. --plaintext Listen on plaintext HTTP instead of mTLS. --disable-gateway-auth Disable gateway authentication (mTLS client certificate requirement). --registry-token Authentication token for pulling container images from ghcr.io. Env: OPENSHELL_REGISTRY_TOKEN . --gpu Enable NVIDIA GPU passthrough. openshell gateway stop Stop the gateway (preserves state). Flag Description --name Gateway name (defaults to active gateway). Env: OPENSHELL_GATEWAY . --remote Override SSH destination (auto-resolved from gateway metadata). --ssh-key Path to SSH private key for remote gateway. openshell gateway destroy Destroy the gateway and its state. Flag Description --name Gateway name (defaults to active gateway). Env: OPENSHELL_GATEWAY . --remote Override SSH destination (auto-resolved from gateway metadata). --ssh-key Path to SSH private key for remote gateway. openshell gateway add 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 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., https://10.0.0.5:8080 or ssh://user@host:8080 ). --name Gateway name (auto-derived from the endpoint hostname when omitted). --remote Register a remote mTLS gateway accessible via SSH. --ssh-key SSH private key for the remote host (used with --remote or ssh:// ). --local 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 [NAME] 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 [NAME] Gateway name (omit to choose interactively or list in non-interactive mode). openshell gateway info Show gateway deployment details. Flag Description --name Gateway name (defaults to active gateway). Env: OPENSHELL_GATEWAY . Inference Commands Manage inference configuration. openshell inference set Set gateway-level inference provider and model. Flag Description --provider Provider name. --model Model identifier to force for generation calls. --system 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 Provider name (unchanged if omitted). --model Model identifier (unchanged if omitted). --system Target the system inference route. openshell inference get Get gateway-level inference provider and model. Flag Description --system 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 [NAME] Sandbox name (defaults to last-used sandbox). -n 200 Number of log lines to return. --tail Stream live logs. --since Only show logs from this duration ago (e.g. 5m, 1h, 30s). --source all Filter by log source: “gateway”, “sandbox”, or “all” (default). Can be specified multiple times: –source gateway –source sandbox. --level 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 --theme auto Color theme for the TUI: auto, dark, or light. Env: OPENSHELL_THEME . openshell completions Generate shell completions. Flag Description Shell to generate completions for","format":"text","summary":"Gateway name to operate on (resolved from stored metadata).","headings":[{"text":"OpenShell CLI Reference","level":1},{"text":"Environment Variables","level":2},{"text":"Command Tree","level":2},{"text":"Sandbox Commands","level":2},{"text":"openshell sandbox create [COMMAND]","level":3},{"text":"openshell sandbox get [NAME]","level":3},{"text":"openshell sandbox list","level":3},{"text":"openshell sandbox delete [NAME]","level":3},{"text":"openshell sandbox connect [NAME]","level":3},{"text":"openshell sandbox upload [DEST]","level":3},{"text":"openshell sandbox download [DEST]","level":3},{"text":"openshell sandbox ssh-config [NAME]","level":3},{"text":"Forward Commands","level":2},{"text":"openshell forward start [NAME]","level":3},{"text":"openshell forward stop [NAME]","level":3},{"text":"openshell forward list","level":3},{"text":"Policy Commands","level":2},{"text":"openshell policy set [NAME]","level":3},{"text":"openshell policy get [NAME]","level":3},{"text":"openshell policy list [NAME]","level":3},{"text":"Provider Commands","level":2},{"text":"openshell provider create","level":3},{"text":"openshell provider get ","level":3},{"text":"openshell provider list","level":3},{"text":"openshell provider update ","level":3},{"text":"openshell provider delete ","level":3},{"text":"Gateway Commands","level":2},{"text":"openshell gateway start","level":3},{"text":"openshell gateway stop","level":3},{"text":"openshell gateway destroy","level":3},{"text":"openshell gateway add ","level":3},{"text":"openshell gateway login [NAME]","level":3},{"text":"openshell gateway select [NAME]","level":3},{"text":"openshell gateway info","level":3},{"text":"Inference Commands","level":2},{"text":"openshell inference set","level":3},{"text":"openshell inference update","level":3},{"text":"openshell inference get","level":3},{"text":"Additional Commands","level":2},{"text":"openshell logs [NAME]","level":3},{"text":"openshell status","level":3},{"text":"openshell term","level":3},{"text":"openshell completions ","level":3}]} \ No newline at end of file +{"id":"reference/cli-generated","title":"OpenShell CLI Reference","url":"reference/cli-generated.html","last_modified":"2026-03-13T02:30:39.468014+00:00","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"content":"OpenShell CLI Reference\nEnvironment Variables Variable Description OPENSHELL_GATEWAY Gateway name to operate on (resolved from stored metadata). OPENSHELL_GATEWAY_ENDPOINT Gateway endpoint URL (e.g. https://gateway.example.com ). Connects directly without looking up gateway metadata. Command Tree openshell\nsandbox\n├── create [COMMAND\n├── get [NAME\n├── list\n├── delete [NAME\n├── connect [NAME\n├── upload [DEST\n├── download [DEST\n└── ssh-config [NAME\nforward\n├── start [NAME\n├── stop [NAME\n└── list\nlogs [NAME\npolicy\n├── set [NAME\n├── get [NAME\n└── list [NAME\nprovider\n├── create\n├── get Optional sandbox name (auto-generated when omitted). --from Sandbox source: a community sandbox name (e.g., openclaw ), a path to a Dockerfile or directory containing one, or a full container image reference (e.g., myregistry.com/img:tag ). --upload Upload local files into the sandbox before running. --no-git-ignore Disable .gitignore filtering for --upload . --no-keep Delete the sandbox after the initial command or shell exits. --editor Launch a remote editor after the sandbox is ready. Keeps the sandbox alive and installs OpenShell-managed SSH config. --remote SSH destination for remote bootstrap (e.g., user@hostname). Only used when no cluster exists yet; ignored if a cluster is already active. --ssh-key Path to SSH private key for remote bootstrap. --provider Provider names to attach to this sandbox. --policy Path to a custom sandbox policy YAML file. Overrides the built-in default and the OPENSHELL_SANDBOX_POLICY env var. --forward Forward a local port to the sandbox before the initial command or shell starts. Keeps the sandbox alive. --tty 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. --no-tty Disable pseudo-terminal allocation. --no-bootstrap Never bootstrap a gateway automatically; error if none is available. --auto-providers Auto-create missing providers from local credentials. --no-auto-providers Never auto-create providers; error if required providers are missing. [COMMAND] Command to run after “–” (defaults to an interactive shell). openshell sandbox get [NAME] Fetch a sandbox by name. Flag Description [NAME] Sandbox name (defaults to last-used sandbox). openshell sandbox list List sandboxes. Flag Default Description --limit 100 Maximum number of sandboxes to return. --offset 0 Offset into the sandbox list. --ids Print only sandbox ids (one per line). --names Print only sandbox names (one per line). openshell sandbox delete [NAME] Delete a sandbox by name. Flag Description [NAME] Sandbox names. --all Delete all sandboxes. openshell sandbox connect [NAME] Connect to a sandbox. When no name is given, reconnects to the last-used sandbox. Flag Description [NAME] Sandbox name (defaults to last-used sandbox). --editor Launch a remote editor instead of an interactive shell. Installs OpenShell-managed SSH config if needed. openshell sandbox upload [DEST] Upload local files to a sandbox. Flag Description Sandbox name. Local path to upload. [DEST] Destination path in the sandbox (defaults to /sandbox ). --no-git-ignore Disable .gitignore filtering (uploads everything). openshell sandbox download [DEST] Download files from a sandbox. Flag Description Sandbox name. Sandbox path to download. [DEST] 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 [NAME] Sandbox name (defaults to last-used sandbox). Forward Commands Manage port forwarding to a sandbox. openshell forward start [NAME] Start forwarding a local port to a sandbox. Flag Description Port to forward (used as both local and remote port). [NAME] Sandbox name (defaults to last-used sandbox). -d , --background Run the forward in the background and exit immediately. openshell forward stop [NAME] Stop a background port forward. Flag Description Port that was forwarded. [NAME] 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 [NAME] Sandbox name (defaults to last-used sandbox). --policy Path to the policy YAML file. --wait Wait for the sandbox to load the policy. --timeout 60 Timeout for –wait in seconds. openshell policy get [NAME] Show current active policy for a sandbox. Flag Default Description [NAME] Sandbox name (defaults to last-used sandbox). --rev 0 Show a specific policy revision (default: latest). --full Print the full policy as YAML. openshell policy list [NAME] List policy history for a sandbox. Flag Default Description [NAME] Sandbox name (defaults to last-used sandbox). --limit 20 Maximum number of revisions to return. Provider Commands Manage provider configuration. openshell provider create Create a provider config. Flag Description --name Provider name. --type Provider type. --from-existing Load provider credentials/config from existing local state. --credential Provider credential pair ( KEY=VALUE ) or env lookup key ( KEY ). --config Provider config key/value pair. openshell provider get Fetch a provider by name. Flag Description Provider name. openshell provider list List providers. Flag Default Description --limit 100 Maximum number of providers to return. --offset 0 Offset into the provider list. --names Print only provider names, one per line. openshell provider update Update an existing provider’s credentials or config. Flag Description Provider name. --from-existing Re-discover credentials from existing local state (e.g. env vars, config files). --credential Provider credential pair ( KEY=VALUE ) or env lookup key ( KEY ). --config Provider config key/value pair. openshell provider delete Delete providers by name. Flag Description Provider names. Gateway Commands Manage the gateway lifecycle. openshell gateway start Deploy/start the gateway. Flag Default Description --name openshell Gateway name. Env: OPENSHELL_GATEWAY . --remote SSH destination for remote deployment (e.g., user@hostname). --ssh-key Path to SSH private key for remote deployment. --port 8080 Host port to map to the gateway (default: 8080). --gateway-host Override the gateway host written into cluster metadata. --recreate Destroy and recreate the gateway from scratch if one already exists. --plaintext Listen on plaintext HTTP instead of mTLS. --disable-gateway-auth Disable gateway authentication (mTLS client certificate requirement). --registry-token Authentication token for pulling container images from ghcr.io. Env: OPENSHELL_REGISTRY_TOKEN . --gpu Enable NVIDIA GPU passthrough. openshell gateway stop Stop the gateway (preserves state). Flag Description --name Gateway name (defaults to active gateway). Env: OPENSHELL_GATEWAY . --remote Override SSH destination (auto-resolved from gateway metadata). --ssh-key Path to SSH private key for remote gateway. openshell gateway destroy Destroy the gateway and its state. Flag Description --name Gateway name (defaults to active gateway). Env: OPENSHELL_GATEWAY . --remote Override SSH destination (auto-resolved from gateway metadata). --ssh-key Path to SSH private key for remote gateway. openshell gateway add 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 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., https://10.0.0.5:8080 or ssh://user@host:8080 ). --name Gateway name (auto-derived from the endpoint hostname when omitted). --remote Register a remote mTLS gateway accessible via SSH. --ssh-key SSH private key for the remote host (used with --remote or ssh:// ). --local 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 [NAME] 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 [NAME] Gateway name (omit to choose interactively or list in non-interactive mode). openshell gateway info Show gateway deployment details. Flag Description --name Gateway name (defaults to active gateway). Env: OPENSHELL_GATEWAY . Inference Commands Manage inference configuration. openshell inference set Set gateway-level inference provider and model. Flag Description --provider Provider name. --model Model identifier to force for generation calls. --system 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 Provider name (unchanged if omitted). --model Model identifier (unchanged if omitted). --system Target the system inference route. openshell inference get Get gateway-level inference provider and model. Flag Description --system 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 [NAME] Sandbox name (defaults to last-used sandbox). -n 200 Number of log lines to return. --tail Stream live logs. --since Only show logs from this duration ago (e.g. 5m, 1h, 30s). --source all Filter by log source: “gateway”, “sandbox”, or “all” (default). Can be specified multiple times: –source gateway –source sandbox. --level 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 --theme auto Color theme for the TUI: auto, dark, or light. Env: OPENSHELL_THEME . openshell completions Generate shell completions. Flag Description Shell to generate completions for","format":"text","summary":"Gateway name to operate on (resolved from stored metadata).","headings":[{"text":"OpenShell CLI Reference","level":1},{"text":"Environment Variables","level":2},{"text":"Command Tree","level":2},{"text":"Sandbox Commands","level":2},{"text":"openshell sandbox create [COMMAND]","level":3},{"text":"openshell sandbox get [NAME]","level":3},{"text":"openshell sandbox list","level":3},{"text":"openshell sandbox delete [NAME]","level":3},{"text":"openshell sandbox connect [NAME]","level":3},{"text":"openshell sandbox upload [DEST]","level":3},{"text":"openshell sandbox download [DEST]","level":3},{"text":"openshell sandbox ssh-config [NAME]","level":3},{"text":"Forward Commands","level":2},{"text":"openshell forward start [NAME]","level":3},{"text":"openshell forward stop [NAME]","level":3},{"text":"openshell forward list","level":3},{"text":"Policy Commands","level":2},{"text":"openshell policy set [NAME]","level":3},{"text":"openshell policy get [NAME]","level":3},{"text":"openshell policy list [NAME]","level":3},{"text":"Provider Commands","level":2},{"text":"openshell provider create","level":3},{"text":"openshell provider get ","level":3},{"text":"openshell provider list","level":3},{"text":"openshell provider update ","level":3},{"text":"openshell provider delete ","level":3},{"text":"Gateway Commands","level":2},{"text":"openshell gateway start","level":3},{"text":"openshell gateway stop","level":3},{"text":"openshell gateway destroy","level":3},{"text":"openshell gateway add ","level":3},{"text":"openshell gateway login [NAME]","level":3},{"text":"openshell gateway select [NAME]","level":3},{"text":"openshell gateway info","level":3},{"text":"Inference Commands","level":2},{"text":"openshell inference set","level":3},{"text":"openshell inference update","level":3},{"text":"openshell inference get","level":3},{"text":"Additional Commands","level":2},{"text":"openshell logs [NAME]","level":3},{"text":"openshell status","level":3},{"text":"openshell term","level":3},{"text":"openshell completions ","level":3}]} \ No newline at end of file diff --git a/pr-preview/pr-270/reference/cli.json b/pr-preview/pr-270/reference/cli.json index 0d0907faf..477a026ef 100644 --- a/pr-preview/pr-270/reference/cli.json +++ b/pr-preview/pr-270/reference/cli.json @@ -1 +1 @@ -{"id":"reference/cli","title":"CLI Reference","url":"reference/cli.html","last_modified":"2026-03-13T02:26:28.118890+00:00","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"Complete command reference for the openshell CLI including all subcommands, flags, and environment variables.","tags":["CLI","Reference","Commands","AI Agents"],"topics":["Generative AI","Cybersecurity"],"content_type":"reference","learning_level":"technical_beginner","audience":["engineer","data_scientist"],"content":"CLI Reference Complete command reference for the openshell CLI. Every subcommand, flag, and option is documented here. Command Tree The full hierarchy of openshell subcommands: openshell\nstatus\nlogs [name\nterm\nforward\n├── start [--all\n├── connect [name\n├── upload [name\n├── download [name\n└── ssh-config Register an existing remote gateway by URL. openshell gateway select Set the active cluster. All subsequent commands target this cluster. openshell gateway select List all registered clusters (when called without a name). Diagnostic Commands Troubleshoot gateway issues. Command Description openshell doctor logs Fetch logs from the gateway Docker container. Use --tail for streaming, -n to limit line count. openshell doctor exec -- Run a command inside the gateway container (e.g., kubectl get pods -A , k9s , sh ). Sandbox Commands Create and manage isolated agent execution environments. Command Description openshell sandbox create Create a new sandbox. Refer to the flag reference below. openshell sandbox get [name] Show detailed information about a sandbox. openshell sandbox list List all sandboxes in the active cluster. openshell sandbox delete Delete one or more sandboxes by name. Use --all to delete every sandbox in the active gateway. openshell sandbox connect [name] Open an interactive SSH session into a running sandbox. openshell sandbox upload [name] Upload files from the host into a sandbox. openshell sandbox download [name] Download files from a sandbox to the host. openshell sandbox ssh-config Print the generated SSH config block for a sandbox. Sandbox Create Flags The following flags control sandbox creation: Flag Description --name Assign a human-readable name to the sandbox. Auto-generated if omitted. --provider Attach a credential provider. Repeatable for multiple providers. --policy Path to a policy YAML file to apply at creation time. --upload Upload local files into the sandbox before running. --no-keep Delete the sandbox after the initial command or shell exits. --editor Launch vscode or cursor into /sandbox ; installs OpenShell-managed SSH config and keeps the sandbox alive. --forward Forward a local port into the sandbox at startup. Keeps the sandbox alive. --from Build from a community sandbox name, local Dockerfile directory, or container image reference. -- The command to run inside the sandbox. Everything after -- is passed as the agent command. Policy Commands Apply and inspect sandbox policies at runtime. Command Description openshell policy set Apply or update a policy on a running sandbox. Pass --policy . openshell policy get Show the active policy for a sandbox. Add --full for the complete policy with metadata. openshell policy list List all policy versions applied to a sandbox, with status. Port Forwarding Commands Forward sandbox ports to the host for local access. Command Description openshell forward start Forward a sandbox port to the host. Add -d for background mode. openshell forward stop Stop an active port forward. openshell forward list List all active port forwards. Provider Commands Manage credential providers that inject secrets into sandboxes. Command Description openshell provider create Create a new credential provider. Refer to the flag reference below. openshell provider get Show details of a provider. openshell provider list List all providers in the active cluster. openshell provider update Update a provider’s credentials or configuration. openshell provider delete Delete a provider. Provider Create Flags The following flags control provider creation: Flag Description --name Name for the provider. --type Provider type: claude , codex , opencode , github , gitlab , nvidia , generic , outlook . --from-existing Discover credentials from your current shell environment variables. --credential Set a credential explicitly. Format: KEY=VALUE or bare KEY to read from env. Repeatable. --config Set a configuration value. Format: KEY=VALUE . Repeatable. Inference Commands Configure the backend used by https://inference.local . openshell inference set Set the provider and model for managed inference. Both flags are required. Flag Description --provider Provider record name to use for injected credentials. --model Model identifier to force on generation requests. openshell inference update Update only the fields you specify. Flag Description --provider Replace the current provider record. --model Replace the current model ID. openshell inference get Show the current inference configuration, including provider, model, and version. Environment Variables The following environment variables override CLI defaults: Variable Description OPENSHELL_GATEWAY Name of the gateway to operate on. Overrides the active gateway set by openshell gateway select . OPENSHELL_SANDBOX_POLICY Default path to a policy YAML file. When set, openshell sandbox create uses this policy if no --policy flag is provided. Shell Completions Generate shell completion scripts for tab completion: $ openshell completions bash\nopenshell completions zsh\nopenshell completions fish\nPipe the output to your shell’s config file: $ openshell completions zsh >> ~/.zshrc\nsource ~/.zshrc\nBuilt-in Help Every command and subcommand includes built-in help. Use --help at any level to see available subcommands, flags, and usage examples: $ openshell --help\nopenshell sandbox --help\nopenshell sandbox create --help\nopenshell gateway --help\nHelp output groups flags under distinct headings: FLAGS for command-specific options, GATEWAY FLAGS for --gateway and --gateway-endpoint , and GLOBAL FLAGS for --verbose , --help , and --version","format":"text","summary":"Complete command reference for the openshell CLI. Every subcommand, flag, and option is documented here.","headings":[{"text":"CLI Reference","level":1},{"text":"Command Tree","level":2},{"text":"Status, Logs, and Terminal","level":2},{"text":"Gateway Commands","level":2},{"text":"Diagnostic Commands","level":2},{"text":"Sandbox Commands","level":2},{"text":"Sandbox Create Flags","level":3},{"text":"Policy Commands","level":2},{"text":"Port Forwarding Commands","level":2},{"text":"Provider Commands","level":2},{"text":"Provider Create Flags","level":3},{"text":"Inference Commands","level":2},{"text":"openshell inference set","level":3},{"text":"openshell inference update","level":3},{"text":"openshell inference get","level":3},{"text":"Environment Variables","level":2},{"text":"Shell Completions","level":2},{"text":"Built-in Help","level":2}]} \ No newline at end of file +{"id":"reference/cli","title":"CLI Reference","url":"reference/cli.html","last_modified":"2026-03-13T02:30:39.384874+00:00","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"Complete command reference for the openshell CLI including all subcommands, flags, and environment variables.","tags":["CLI","Reference","Commands","AI Agents"],"topics":["Generative AI","Cybersecurity"],"content_type":"reference","learning_level":"technical_beginner","audience":["engineer","data_scientist"],"content":"CLI Reference Complete command reference for the openshell CLI. Every subcommand, flag, and option is documented here. Command Tree The full hierarchy of openshell subcommands: openshell\nstatus\nlogs [name\nterm\nforward\n├── start [--all\n├── connect [name\n├── upload [name\n├── download [name\n└── ssh-config Register an existing remote gateway by URL. openshell gateway select Set the active cluster. All subsequent commands target this cluster. openshell gateway select List all registered clusters (when called without a name). Diagnostic Commands Troubleshoot gateway issues. Command Description openshell doctor logs Fetch logs from the gateway Docker container. Use --tail for streaming, -n to limit line count. openshell doctor exec -- Run a command inside the gateway container (e.g., kubectl get pods -A , k9s , sh ). Sandbox Commands Create and manage isolated agent execution environments. Command Description openshell sandbox create Create a new sandbox. Refer to the flag reference below. openshell sandbox get [name] Show detailed information about a sandbox. openshell sandbox list List all sandboxes in the active cluster. openshell sandbox delete Delete one or more sandboxes by name. Use --all to delete every sandbox in the active gateway. openshell sandbox connect [name] Open an interactive SSH session into a running sandbox. openshell sandbox upload [name] Upload files from the host into a sandbox. openshell sandbox download [name] Download files from a sandbox to the host. openshell sandbox ssh-config Print the generated SSH config block for a sandbox. Sandbox Create Flags The following flags control sandbox creation: Flag Description --name Assign a human-readable name to the sandbox. Auto-generated if omitted. --provider Attach a credential provider. Repeatable for multiple providers. --policy Path to a policy YAML file to apply at creation time. --upload Upload local files into the sandbox before running. --no-keep Delete the sandbox after the initial command or shell exits. --editor Launch vscode or cursor into /sandbox ; installs OpenShell-managed SSH config and keeps the sandbox alive. --forward Forward a local port into the sandbox at startup. Keeps the sandbox alive. --from Build from a community sandbox name, local Dockerfile directory, or container image reference. -- The command to run inside the sandbox. Everything after -- is passed as the agent command. Policy Commands Apply and inspect sandbox policies at runtime. Command Description openshell policy set Apply or update a policy on a running sandbox. Pass --policy . openshell policy get Show the active policy for a sandbox. Add --full for the complete policy with metadata. openshell policy list List all policy versions applied to a sandbox, with status. Port Forwarding Commands Forward sandbox ports to the host for local access. Command Description openshell forward start Forward a sandbox port to the host. Add -d for background mode. openshell forward stop Stop an active port forward. openshell forward list List all active port forwards. Provider Commands Manage credential providers that inject secrets into sandboxes. Command Description openshell provider create Create a new credential provider. Refer to the flag reference below. openshell provider get Show details of a provider. openshell provider list List all providers in the active cluster. openshell provider update Update a provider’s credentials or configuration. openshell provider delete Delete a provider. Provider Create Flags The following flags control provider creation: Flag Description --name Name for the provider. --type Provider type: claude , codex , opencode , github , gitlab , nvidia , generic , outlook . --from-existing Discover credentials from your current shell environment variables. --credential Set a credential explicitly. Format: KEY=VALUE or bare KEY to read from env. Repeatable. --config Set a configuration value. Format: KEY=VALUE . Repeatable. Inference Commands Configure the backend used by https://inference.local . openshell inference set Set the provider and model for managed inference. Both flags are required. Flag Description --provider Provider record name to use for injected credentials. --model Model identifier to force on generation requests. openshell inference update Update only the fields you specify. Flag Description --provider Replace the current provider record. --model Replace the current model ID. openshell inference get Show the current inference configuration, including provider, model, and version. Environment Variables The following environment variables override CLI defaults: Variable Description OPENSHELL_GATEWAY Name of the gateway to operate on. Overrides the active gateway set by openshell gateway select . OPENSHELL_SANDBOX_POLICY Default path to a policy YAML file. When set, openshell sandbox create uses this policy if no --policy flag is provided. Shell Completions Generate shell completion scripts for tab completion: $ openshell completions bash\nopenshell completions zsh\nopenshell completions fish\nPipe the output to your shell’s config file: $ openshell completions zsh >> ~/.zshrc\nsource ~/.zshrc\nBuilt-in Help Every command and subcommand includes built-in help. Use --help at any level to see available subcommands, flags, and usage examples: $ openshell --help\nopenshell sandbox --help\nopenshell sandbox create --help\nopenshell gateway --help\nHelp output groups flags under distinct headings: FLAGS for command-specific options, GATEWAY FLAGS for --gateway and --gateway-endpoint , and GLOBAL FLAGS for --verbose , --help , and --version","format":"text","summary":"Complete command reference for the openshell CLI. Every subcommand, flag, and option is documented here.","headings":[{"text":"CLI Reference","level":1},{"text":"Command Tree","level":2},{"text":"Status, Logs, and Terminal","level":2},{"text":"Gateway Commands","level":2},{"text":"Diagnostic Commands","level":2},{"text":"Sandbox Commands","level":2},{"text":"Sandbox Create Flags","level":3},{"text":"Policy Commands","level":2},{"text":"Port Forwarding Commands","level":2},{"text":"Provider Commands","level":2},{"text":"Provider Create Flags","level":3},{"text":"Inference Commands","level":2},{"text":"openshell inference set","level":3},{"text":"openshell inference update","level":3},{"text":"openshell inference get","level":3},{"text":"Environment Variables","level":2},{"text":"Shell Completions","level":2},{"text":"Built-in Help","level":2}]} \ No newline at end of file diff --git a/pr-preview/pr-270/reference/default-policy.json b/pr-preview/pr-270/reference/default-policy.json index f0793d366..4512e31b2 100644 --- a/pr-preview/pr-270/reference/default-policy.json +++ b/pr-preview/pr-270/reference/default-policy.json @@ -1 +1 @@ -{"id":"reference/default-policy","title":"Default Policy Reference","url":"reference/default-policy.html","last_modified":"2026-03-13T02:26:28.055536+00:00","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"Breakdown of the built-in default policy applied when you create an OpenShell sandbox without a custom policy.","tags":["ai_agents","sandboxing","security","policy"],"topics":["generative_ai","cybersecurity"],"content_type":"reference","learning_level":"technical_beginner","audience":["engineer","data_scientist"],"keywords":["openshell default policy","sandbox policy","agent compatibility"],"content":"Default Policy Reference The default policy is the policy applied when you create an OpenShell sandbox without --policy . It is defined in the deploy/docker/sandbox/dev-sandbox-policy.yaml file. Agent Compatibility The following table shows the coverage of the default policy for common agents. Agent Coverage Action Required Claude Code Full None. Works out of the box. OpenCode Partial Add opencode.ai endpoint and OpenCode binary paths. Codex None Provide a complete custom policy with OpenAI endpoints and Codex binary paths. If you run a non-Claude agent without a custom policy, the agent’s API calls are denied by the proxy. You must provide a policy that declares the agent’s endpoints and binaries. Default Policy Blocks The following tables show the default policy blocks pre-configured in the file.

Filesystem, Landlock, and ProcessNetwork Policy BlocksAnthropic API and TelemetryGit Clone and FetchNVIDIA API CatalogGitHub API (Read-Only)Python Package InstallationVS Code Remote and MarketplacecursoropencodeFilesystem, Landlock, and ProcessNetwork Policy BlocksAnthropic API and TelemetryGit Clone and FetchNVIDIA API CatalogGitHub API (Read-Only)Python Package InstallationVS Code Remote and Marketplacecursoropencode The cluster image is based on rancher/k3s:v1.35.2-k3s1 and bundles the Helm charts and Kubernetes manifests required to bootstrap the control plane. The server and sandbox images are pulled separately at runtime. To override the default image references, set the following environment variables: Variable Purpose OPENSHELL_CLUSTER_IMAGE Override the cluster image reference. OPENSHELL_COMMUNITY_REGISTRY Override the registry for community sandbox images. Kernel Requirements OpenShell enforces sandbox isolation through two Linux kernel security modules: Module Requirement Details Landlock LSM Recommended Enforces filesystem access restrictions at the kernel level. The best_effort compatibility mode uses the highest Landlock ABI the host kernel supports. The hard_requirement mode fails sandbox creation if the required ABI is unavailable. seccomp Required Filters dangerous system calls. Available on all modern Linux kernels (3.17+). On macOS, these kernel modules run inside the Docker Desktop Linux VM, not on the host kernel. Agent Compatibility For the full list of supported agents and their default policy coverage, refer to the Supported Agents table","format":"text","summary":"This page lists the platform, software, runtime, and kernel requirements for running OpenShell.","headings":[{"text":"Support Matrix","level":1},{"text":"Supported Platforms","level":2},{"text":"Software Prerequisites","level":2},{"text":"Sandbox Runtime Versions","level":2},{"text":"Container Images","level":2},{"text":"Kernel Requirements","level":2},{"text":"Agent Compatibility","level":2}]} \ No newline at end of file +{"id":"reference/support-matrix","title":"Support Matrix","url":"reference/support-matrix.html","last_modified":"2026-03-13T02:30:39.417200+00:00","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"content":"Support Matrix This page lists the platform, software, runtime, and kernel requirements for running OpenShell. Supported Platforms OpenShell publishes multi-architecture container images for linux/amd64 and linux/arm64 . The CLI is supported on the following host platforms: Platform Architecture Status Linux (Debian/Ubuntu) x86_64 (amd64) Supported Linux (Debian/Ubuntu) aarch64 (arm64) Supported macOS (Docker Desktop) Apple Silicon (arm64) Supported macOS (Docker Desktop) Intel (amd64) Supported Windows (WSL 2 + Docker Desktop) x86_64 Untested Software Prerequisites The following software must be installed on the host before using the OpenShell CLI: Component Minimum Version Notes Python 3.12 Python 3.12 and 3.13 are supported. uv 0.9 Used to install the CLI ( uv pip install openshell ). Docker Desktop or Docker Engine — Must be running before any openshell command. No minimum version is enforced. Sandbox Runtime Versions The base sandbox container image ships the following components. These versions apply to sandboxes created with the default image ( ghcr.io/nvidia/openshell/sandbox ). Component Version Base OS Debian Bookworm Python 3.12.13 Node.js 22.22.1 npm 11.11.0 uv 0.10.8 Claude Code Latest (installed at image build time) OpenCode 1.2.18 Codex 0.111.0 Container Images OpenShell uses several container images that are pulled automatically during gateway startup and sandbox creation. All images are published for linux/amd64 and linux/arm64 . Image Registry Reference Pulled When Cluster ghcr.io ghcr.io/nvidia/openshell/cluster:latest openshell gateway start Gateway ghcr.io ghcr.io/nvidia/openshell/gateway:latest Cluster startup (via Helm chart) Sandbox ghcr.io ghcr.io/nvidia/openshell/sandbox:latest First sandbox creation (via Helm chart) Community sandboxes GHCR ghcr.io/nvidia/openshell-community/sandboxes/{name}:latest openshell sandbox create --from The cluster image is based on rancher/k3s:v1.35.2-k3s1 and bundles the Helm charts and Kubernetes manifests required to bootstrap the control plane. The server and sandbox images are pulled separately at runtime. To override the default image references, set the following environment variables: Variable Purpose OPENSHELL_CLUSTER_IMAGE Override the cluster image reference. OPENSHELL_COMMUNITY_REGISTRY Override the registry for community sandbox images. Kernel Requirements OpenShell enforces sandbox isolation through two Linux kernel security modules: Module Requirement Details Landlock LSM Recommended Enforces filesystem access restrictions at the kernel level. The best_effort compatibility mode uses the highest Landlock ABI the host kernel supports. The hard_requirement mode fails sandbox creation if the required ABI is unavailable. seccomp Required Filters dangerous system calls. Available on all modern Linux kernels (3.17+). On macOS, these kernel modules run inside the Docker Desktop Linux VM, not on the host kernel. Agent Compatibility For the full list of supported agents and their default policy coverage, refer to the Supported Agents table","format":"text","summary":"This page lists the platform, software, runtime, and kernel requirements for running OpenShell.","headings":[{"text":"Support Matrix","level":1},{"text":"Supported Platforms","level":2},{"text":"Software Prerequisites","level":2},{"text":"Sandbox Runtime Versions","level":2},{"text":"Container Images","level":2},{"text":"Kernel Requirements","level":2},{"text":"Agent Compatibility","level":2}]} \ No newline at end of file diff --git a/pr-preview/pr-270/resources/eula.json b/pr-preview/pr-270/resources/eula.json index 7ce24c7dc..9e5d7dc36 100644 --- a/pr-preview/pr-270/resources/eula.json +++ b/pr-preview/pr-270/resources/eula.json @@ -1 +1 @@ -{"id":"resources/eula","title":"License","url":"resources/eula.html","last_modified":"2026-03-13T02:26:28.077970+00:00","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"NVIDIA OpenShell license agreement and terms of use.","tags":["License","EULA"],"topics":["Legal"],"content_type":"reference","learning_level":"technical_beginner","audience":["engineer","data_scientist"],"content":"License","format":"text","summary":" License","headings":[{"text":"License","level":1}]} \ No newline at end of file +{"id":"resources/eula","title":"License","url":"resources/eula.html","last_modified":"2026-03-13T02:30:39.418942+00:00","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"NVIDIA OpenShell license agreement and terms of use.","tags":["License","EULA"],"topics":["Legal"],"content_type":"reference","learning_level":"technical_beginner","audience":["engineer","data_scientist"],"content":"License","format":"text","summary":" License","headings":[{"text":"License","level":1}]} \ No newline at end of file diff --git a/pr-preview/pr-270/sandboxes/community-sandboxes.json b/pr-preview/pr-270/sandboxes/community-sandboxes.json index 90518ae36..967c5eef8 100644 --- a/pr-preview/pr-270/sandboxes/community-sandboxes.json +++ b/pr-preview/pr-270/sandboxes/community-sandboxes.json @@ -1 +1 @@ -{"id":"sandboxes/community-sandboxes","title":"Community Sandboxes","url":"sandboxes/community-sandboxes.html","last_modified":"2026-03-13T02:26:28.082347+00:00","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"Use pre-built sandboxes from the OpenShell Community catalog or contribute your own.","tags":["Community","Sandbox","Container Image","Open Source"],"topics":["Generative AI","Cybersecurity"],"content_type":"concept","learning_level":"technical_beginner","audience":["engineer","data_scientist"],"content":"Community Sandboxes Use pre-built sandboxes from the OpenShell Community catalog, or contribute your\nown. What Are Community Sandboxes Community sandboxes are ready-to-use environments published in the\nOpenShell Community repository\nEach sandbox bundles a Dockerfile, policy, optional skills, and startup scripts\ninto a single package that you can launch with one command. Current Catalog The following community sandboxes are available in the catalog. Sandbox Description base Foundational image with system tools and dev environment openclaw Open agent manipulation and control sdg Synthetic data generation workflows simulation General-purpose simulation sandboxes Use a Community Sandbox Launch a community sandbox by name with the --from flag: $ openshell sandbox create --from openclaw\nWhen you pass --from with a community sandbox name, the CLI: Resolves the name against the\nOpenShell Community repository. Pulls the Dockerfile, policy, skills, and any startup scripts. Builds the container image locally. Creates the sandbox with the bundled configuration applied. You end up with a running sandbox whose image, policy, and tooling are all\npreconfigured by the community package. Other Sources The --from flag also accepts: Local directory paths: Point to a directory on disk that contains a\nDockerfile and optional policy/skills: $ openshell sandbox create --from ./my-sandbox-dir\nContainer image references: Use an existing container image directly: $ openshell sandbox create --from my-registry.example.com/my-image:latest\nContribute a Community Sandbox Each community sandbox is a directory under sandboxes/ in the\nOpenShell Community repository\nAt minimum, a sandbox directory must contain: Dockerfile : Defines the container image README.md : Describes the sandbox and how to use it Optional files: policy.yaml : Default policy applied when the sandbox launches skills/ : Agent skill definitions bundled with the sandbox Startup scripts: Any scripts the Dockerfile or entrypoint invokes To contribute, fork the repository, add your sandbox directory, and open a pull\nrequest. Refer to the repository’s\nCONTRIBUTING.md\nfor submission guidelines. The community catalog is designed to grow. If you have built a sandbox that\nsupports a particular workflow (data processing, simulation, code review\nor anything else), consider contributing it back so others can use it. Next Steps Explore related topics: Need to supply API keys or tokens? Set up providers for credential management. Want to customize the sandbox policy? Write custom rules in policies","format":"text","summary":"Use pre-built sandboxes from the OpenShell Community catalog, or contribute your own.","headings":[{"text":"Community Sandboxes","level":1},{"text":"What Are Community Sandboxes","level":2},{"text":"Current Catalog","level":2},{"text":"Use a Community Sandbox","level":2},{"text":"Other Sources","level":3},{"text":"Contribute a Community Sandbox","level":2},{"text":"Next Steps","level":2}]} \ No newline at end of file +{"id":"sandboxes/community-sandboxes","title":"Community Sandboxes","url":"sandboxes/community-sandboxes.html","last_modified":"2026-03-13T02:30:39.423595+00:00","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"Use pre-built sandboxes from the OpenShell Community catalog or contribute your own.","tags":["Community","Sandbox","Container Image","Open Source"],"topics":["Generative AI","Cybersecurity"],"content_type":"concept","learning_level":"technical_beginner","audience":["engineer","data_scientist"],"content":"Community Sandboxes Use pre-built sandboxes from the OpenShell Community catalog, or contribute your\nown. What Are Community Sandboxes Community sandboxes are ready-to-use environments published in the\nOpenShell Community repository\nEach sandbox bundles a Dockerfile, policy, optional skills, and startup scripts\ninto a single package that you can launch with one command. Current Catalog The following community sandboxes are available in the catalog. Sandbox Description base Foundational image with system tools and dev environment openclaw Open agent manipulation and control sdg Synthetic data generation workflows simulation General-purpose simulation sandboxes Use a Community Sandbox Launch a community sandbox by name with the --from flag: $ openshell sandbox create --from openclaw\nWhen you pass --from with a community sandbox name, the CLI: Resolves the name against the\nOpenShell Community repository. Pulls the Dockerfile, policy, skills, and any startup scripts. Builds the container image locally. Creates the sandbox with the bundled configuration applied. You end up with a running sandbox whose image, policy, and tooling are all\npreconfigured by the community package. Other Sources The --from flag also accepts: Local directory paths: Point to a directory on disk that contains a\nDockerfile and optional policy/skills: $ openshell sandbox create --from ./my-sandbox-dir\nContainer image references: Use an existing container image directly: $ openshell sandbox create --from my-registry.example.com/my-image:latest\nContribute a Community Sandbox Each community sandbox is a directory under sandboxes/ in the\nOpenShell Community repository\nAt minimum, a sandbox directory must contain: Dockerfile : Defines the container image README.md : Describes the sandbox and how to use it Optional files: policy.yaml : Default policy applied when the sandbox launches skills/ : Agent skill definitions bundled with the sandbox Startup scripts: Any scripts the Dockerfile or entrypoint invokes To contribute, fork the repository, add your sandbox directory, and open a pull\nrequest. Refer to the repository’s\nCONTRIBUTING.md\nfor submission guidelines. The community catalog is designed to grow. If you have built a sandbox that\nsupports a particular workflow (data processing, simulation, code review\nor anything else), consider contributing it back so others can use it. Next Steps Explore related topics: Need to supply API keys or tokens? Set up providers for credential management. Want to customize the sandbox policy? Write custom rules in policies","format":"text","summary":"Use pre-built sandboxes from the OpenShell Community catalog, or contribute your own.","headings":[{"text":"Community Sandboxes","level":1},{"text":"What Are Community Sandboxes","level":2},{"text":"Current Catalog","level":2},{"text":"Use a Community Sandbox","level":2},{"text":"Other Sources","level":3},{"text":"Contribute a Community Sandbox","level":2},{"text":"Next Steps","level":2}]} \ No newline at end of file diff --git a/pr-preview/pr-270/sandboxes/create-and-manage.json b/pr-preview/pr-270/sandboxes/create-and-manage.json index 095b25ba6..7a3b686b9 100644 --- a/pr-preview/pr-270/sandboxes/create-and-manage.json +++ b/pr-preview/pr-270/sandboxes/create-and-manage.json @@ -1 +1 @@ -{"id":"sandboxes/create-and-manage","title":"Create and Manage Sandboxes","url":"sandboxes/create-and-manage.html","last_modified":"2026-03-13T02:26:28.088473+00:00","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"Create, inspect, connect to, monitor, transfer files, and delete OpenShell sandboxes.","tags":["Sandboxing","AI Agents","Sandbox Management","CLI"],"topics":["Generative AI","Cybersecurity"],"content_type":"how_to","learning_level":"technical_beginner","audience":["engineer","data_scientist"],"content":"Create and Manage Sandboxes This page walks you through the full sandbox lifecycle: creating, inspecting, connecting to, monitoring, and deleting sandboxes. For background on what sandboxes are and how the runtime works, refer to About Sandboxes . Docker must be running before you create a sandbox. If it is not, the CLI\nreturns a connection-refused error ( os error 61 ) without explaining\nthe cause. Start Docker and try again. Create a Sandbox Run a single command to create a sandbox and launch your agent: $ openshell sandbox create -- claude\nIf you have an existing gateway, the sandbox is created in it. Otherwise, a gateway is created automatically. A fully specified creation command might look like: $ openshell sandbox create\nname dev\nprovider my-claude\npolicy policy.yaml\nupload\nclaude\nSandboxes created with openshell sandbox create stay running by default after\nthe initial command or shell exits. Use --no-keep when you want the sandbox\ndeleted automatically instead. Create from a Community Sandbox or Custom Image Use --from to create a sandbox from a pre-built community package, a local directory, or a container image: $ openshell sandbox create --from openclaw\nThe CLI resolves the name against the OpenShell Community catalog, pulls the bundled Dockerfile and policy, builds the image locally, and creates the sandbox. For the full catalog and how to contribute your own, refer to community-sandboxes . You can also point --from at a local directory or a container image reference: $ openshell sandbox create --from ./my-sandbox-dir\nopenshell sandbox create --from my-registry.example.com/my-image:latest\nList and Inspect Sandboxes Check the status of your sandboxes and retrieve detailed information about individual ones. List all sandboxes: $ openshell sandbox list\nGet detailed information about a specific sandbox: $ openshell sandbox get my-sandbox\nConnect to a Sandbox Access a running sandbox through an interactive SSH session or VS Code Remote-SSH. Interactive SSH Open an SSH session into a running sandbox: $ openshell sandbox connect my-sandbox\nOpen in a remote editor Launch VS Code or Cursor directly into the sandbox workspace: $ openshell sandbox create --editor vscode --name my-sandbox\nopenshell sandbox connect my-sandbox --editor cursor\nWhen --editor is used, OpenShell keeps the sandbox alive and installs an\nOpenShell-managed SSH include file instead of cluttering your main\nssh/config with generated host blocks. View Logs Stream and filter sandbox logs to monitor agent activity and diagnose policy decisions. Stream sandbox logs: $ openshell logs my-sandbox\nUse flags to filter and follow output: Flag Purpose Example --tail Stream logs in real time openshell logs my-sandbox --tail --source Filter by log source --source sandbox --level Filter by severity --level warn --since Show logs from a time window --since 5m Monitor Your Sandbox OpenShell Terminal is a real-time dashboard that combines sandbox status and live logs in a single view. $ openshell term\nThe dashboard shows the following information. Sandbox status : Name, phase, image, attached providers, age, and active port forwards. Live log stream : Omutbound connections, policy decisions, and inference interceptions as they happen. Logs are labeled by source: sandbox (proxy and policy events) or gateway (lifecycle events). Use the terminal to spot blocked connections ( action=deny entries) and inference interceptions ( action=inspect_for_inference entries). If a connection is blocked unexpectedly, add the host to your network policy — refer to policies for the workflow. Transfer Files Transfer files between your host machine and a running sandbox. Upload files from your host into the sandbox: $ openshell sandbox upload my-sandbox ./src /sandbox/src\nDownload files from the sandbox to your host: $ openshell sandbox download my-sandbox /sandbox/output ./local\nYou can also upload files at creation time with the --upload flag on\nopenshell sandbox create . Delete Sandboxes Remove sandboxes when they are no longer needed. Deleting a sandbox stops all processes, releases cluster resources, and purges injected credentials. Delete a sandbox by name: $ openshell sandbox delete my-sandbox\nDelete all sandboxes in the active gateway: $ openshell sandbox delete --all\nNext Steps Explore related topics: To follow a complete end-to-end example, refer to the /tutorials/github-sandbox tutorial. To supply API keys or tokens, refer to providers . To control what the agent can access, refer to policies . To use a pre-built environment, refer to the community-sandboxes catalog","format":"text","summary":"This page walks you through the full sandbox lifecycle: creating, inspecting, connecting to, monitoring, and deleting sandboxes. For background on what sandboxes are and how the runtime works, refer to About Sandboxes.","headings":[{"text":"Create and Manage Sandboxes","level":1},{"text":"Create a Sandbox","level":2},{"text":"Create from a Community Sandbox or Custom Image","level":2},{"text":"List and Inspect Sandboxes","level":2},{"text":"Connect to a Sandbox","level":2},{"text":"Interactive SSH","level":3},{"text":"Open in a remote editor","level":3},{"text":"View Logs","level":2},{"text":"Monitor Your Sandbox","level":2},{"text":"Transfer Files","level":2},{"text":"Delete Sandboxes","level":2},{"text":"Next Steps","level":2}]} \ No newline at end of file +{"id":"sandboxes/create-and-manage","title":"Create and Manage Sandboxes","url":"sandboxes/create-and-manage.html","last_modified":"2026-03-13T02:30:39.429660+00:00","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"Create, inspect, connect to, monitor, transfer files, and delete OpenShell sandboxes.","tags":["Sandboxing","AI Agents","Sandbox Management","CLI"],"topics":["Generative AI","Cybersecurity"],"content_type":"how_to","learning_level":"technical_beginner","audience":["engineer","data_scientist"],"content":"Create and Manage Sandboxes This page walks you through the full sandbox lifecycle: creating, inspecting, connecting to, monitoring, and deleting sandboxes. For background on what sandboxes are and how the runtime works, refer to About Sandboxes . Docker must be running before you create a sandbox. If it is not, the CLI\nreturns a connection-refused error ( os error 61 ) without explaining\nthe cause. Start Docker and try again. Create a Sandbox Run a single command to create a sandbox and launch your agent: $ openshell sandbox create -- claude\nIf you have an existing gateway, the sandbox is created in it. Otherwise, a gateway is created automatically. A fully specified creation command might look like: $ openshell sandbox create\nname dev\nprovider my-claude\npolicy policy.yaml\nupload\nclaude\nSandboxes created with openshell sandbox create stay running by default after\nthe initial command or shell exits. Use --no-keep when you want the sandbox\ndeleted automatically instead. Create from a Community Sandbox or Custom Image Use --from to create a sandbox from a pre-built community package, a local directory, or a container image: $ openshell sandbox create --from openclaw\nThe CLI resolves the name against the OpenShell Community catalog, pulls the bundled Dockerfile and policy, builds the image locally, and creates the sandbox. For the full catalog and how to contribute your own, refer to community-sandboxes . You can also point --from at a local directory or a container image reference: $ openshell sandbox create --from ./my-sandbox-dir\nopenshell sandbox create --from my-registry.example.com/my-image:latest\nList and Inspect Sandboxes Check the status of your sandboxes and retrieve detailed information about individual ones. List all sandboxes: $ openshell sandbox list\nGet detailed information about a specific sandbox: $ openshell sandbox get my-sandbox\nConnect to a Sandbox Access a running sandbox through an interactive SSH session or VS Code Remote-SSH. Interactive SSH Open an SSH session into a running sandbox: $ openshell sandbox connect my-sandbox\nOpen in a remote editor Launch VS Code or Cursor directly into the sandbox workspace: $ openshell sandbox create --editor vscode --name my-sandbox\nopenshell sandbox connect my-sandbox --editor cursor\nWhen --editor is used, OpenShell keeps the sandbox alive and installs an\nOpenShell-managed SSH include file instead of cluttering your main\nssh/config with generated host blocks. View Logs Stream and filter sandbox logs to monitor agent activity and diagnose policy decisions. Stream sandbox logs: $ openshell logs my-sandbox\nUse flags to filter and follow output: Flag Purpose Example --tail Stream logs in real time openshell logs my-sandbox --tail --source Filter by log source --source sandbox --level Filter by severity --level warn --since Show logs from a time window --since 5m Monitor Your Sandbox OpenShell Terminal is a real-time dashboard that combines sandbox status and live logs in a single view. $ openshell term\nThe dashboard shows the following information. Sandbox status : Name, phase, image, attached providers, age, and active port forwards. Live log stream : Omutbound connections, policy decisions, and inference interceptions as they happen. Logs are labeled by source: sandbox (proxy and policy events) or gateway (lifecycle events). Use the terminal to spot blocked connections ( action=deny entries) and inference interceptions ( action=inspect_for_inference entries). If a connection is blocked unexpectedly, add the host to your network policy — refer to policies for the workflow. Transfer Files Transfer files between your host machine and a running sandbox. Upload files from your host into the sandbox: $ openshell sandbox upload my-sandbox ./src /sandbox/src\nDownload files from the sandbox to your host: $ openshell sandbox download my-sandbox /sandbox/output ./local\nYou can also upload files at creation time with the --upload flag on\nopenshell sandbox create . Delete Sandboxes Remove sandboxes when they are no longer needed. Deleting a sandbox stops all processes, releases cluster resources, and purges injected credentials. Delete a sandbox by name: $ openshell sandbox delete my-sandbox\nDelete all sandboxes in the active gateway: $ openshell sandbox delete --all\nNext Steps Explore related topics: To follow a complete end-to-end example, refer to the /tutorials/github-sandbox tutorial. To supply API keys or tokens, refer to providers . To control what the agent can access, refer to policies . To use a pre-built environment, refer to the community-sandboxes catalog","format":"text","summary":"This page walks you through the full sandbox lifecycle: creating, inspecting, connecting to, monitoring, and deleting sandboxes. For background on what sandboxes are and how the runtime works, refer to About Sandboxes.","headings":[{"text":"Create and Manage Sandboxes","level":1},{"text":"Create a Sandbox","level":2},{"text":"Create from a Community Sandbox or Custom Image","level":2},{"text":"List and Inspect Sandboxes","level":2},{"text":"Connect to a Sandbox","level":2},{"text":"Interactive SSH","level":3},{"text":"Open in a remote editor","level":3},{"text":"View Logs","level":2},{"text":"Monitor Your Sandbox","level":2},{"text":"Transfer Files","level":2},{"text":"Delete Sandboxes","level":2},{"text":"Next Steps","level":2}]} \ No newline at end of file diff --git a/pr-preview/pr-270/sandboxes/index.json b/pr-preview/pr-270/sandboxes/index.json index ea375c5b2..5fb4ceef4 100644 --- a/pr-preview/pr-270/sandboxes/index.json +++ b/pr-preview/pr-270/sandboxes/index.json @@ -1 +1 @@ -{"id":"sandboxes/index","title":"About Sandboxes","url":"sandboxes/index.html","last_modified":"2026-03-13T02:26:28.096259+00:00","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"Understand sandbox lifecycle, supported agents, built-in default policy, and network access rules in OpenShell.","tags":["Sandboxing","AI Agents","Security","Policy","Isolation"],"topics":["Generative AI","Cybersecurity"],"content_type":"concept","learning_level":"technical_beginner","audience":["engineer","data_scientist"],"content":"About Sandboxes An OpenShell sandbox is a safe, private execution environment for an AI agent. Each sandbox runs with multiple layers of protection that prevent unauthorized data access, credential exposure, and network exfiltration. Protection layers include filesystem restrictions (Landlock), system call filtering (seccomp), network namespace isolation, and a privacy-enforcing HTTP CONNECT proxy. Sandbox Lifecycle Every sandbox moves through a defined set of phases: Phase Description Provisioning The runtime is setting up the sandbox environment, injecting credentials, and applying your policy. Ready The sandbox is running. The agent process is active and all isolation layers are enforced. You can connect, sync files, and view logs. Error Something went wrong during provisioning or execution. Check logs with openshell logs for details. Deleting The sandbox is being torn down. The system releases resources and purges credentials. Supported Agents The following table summarizes the agents that run in OpenShell sandboxes. Built-in agents are pre-installed in the OpenShell base sandbox image and auto-configured when passed as the trailing command to openshell sandbox create . More community agent sandboxes are available in the community-sandboxes catalog. Agent Source Default Policy Notes Claude Code Built-in Full coverage Works out of the box. Requires ANTHROPIC_API_KEY . OpenCode Built-in Partial coverage Pre-installed. Add opencode.ai endpoint and OpenCode binary paths to the policy for full functionality. Codex Built-in No coverage Pre-installed. Requires a custom policy with OpenAI endpoints and Codex binary paths. Requires OPENAI_API_KEY . OpenClaw OpenShell Community Bundled Agent orchestration layer. Launch with openshell sandbox create --from openclaw\nBuilt-in Default Policy OpenShell ships a built-in policy that covers common agent workflows out of the box\nWhen you create a sandbox without --policy , the default policy is applied. It controls three things: Layer What It Controls How It Works Filesystem What the agent can access on disk Paths are split into read-only and read-write sets. Landlock LSM enforces these restrictions at the kernel level. Network What the agent can reach on the network Each policy block pairs allowed destinations (host and port) with allowed binaries (executable paths). The proxy matches every outbound connection to the binary that opened it. Both must match or the connection is denied. Process What privileges the agent has The agent runs as an unprivileged user with seccomp filters that block dangerous system calls. No sudo , no setuid , no path to elevated privileges. For the full breakdown of each default policy block and agent compatibility details, refer to ../reference/default-policy . Policy Structure A policy has static sections ( filesystem_policy , landlock , process ) that are locked at sandbox creation, and dynamic sections ( network_policies , inference ) that are hot-reloadable on a running sandbox. version: 1\nStatic: locked at sandbox creation. Paths the agent can read vs read/write\nfilesystem_policy\nread_only: [/usr, /lib, /etc\nread_write: [/sandbox, /tmp\nStatic: Landlock LSM kernel enforcement. best_effort uses highest ABI the host supports\nlandlock\ncompatibility: best_effort\nStatic: Unprivileged user/group the agent process runs as\nprocess\nrun_as_user: sandbox\nrun_as_group: sandbox\nDynamic: hot-reloadable. Named blocks of endpoints + binaries allowed to reach them\nnetwork_policies\nmy_api\nname: my-api\nendpoints\nhost: api.example.com\nport: 443\nprotocol: rest\ntls: terminate\nenforcement: enforce\naccess: full\nbinaries\npath: /usr/bin/curl\nDynamic: hot-reloadable. Routing hints this sandbox can use for inference (e.g. local, nvidia\ninference\nallowed_routes: [local\nFor the complete structure and every field, refer to the Policy Schema Reference . Network Access Rules Network access is controlled by policy blocks under network_policies . Each block has a name, a list of endpoints (host, port, protocol, and optional rules), and a list of binaries that are allowed to use those endpoints. Every outbound connection from the sandbox goes through the proxy: The proxy queries the policy engine with the destination (host and port) and the calling binary. A connection is allowed only when both match an entry in the same policy block. For endpoints with protocol: rest and tls: terminate , each HTTP request is checked against that endpoint’s rules (method and path). If no endpoint matches and inference routes are configured, the request may be rerouted for inference. Otherwise the connection is denied. Endpoints without protocol or tls allow the TCP stream through without inspecting payloads. Next Steps Continue with one of the following: To create your first sandbox, refer to create-and-manage . To supply API keys or tokens, refer to providers . To control what the agent can access, refer to policies . To use a pre-built environment, refer to the community-sandboxes catalog","format":"text","summary":"An OpenShell sandbox is a safe, private execution environment for an AI agent. Each sandbox runs with multiple layers of protection that prevent unauthorized data access, credential exposure, and network exfiltration. Protection layers include filesystem restrictions (Landlock), system call filte...","headings":[{"text":"About Sandboxes","level":1},{"text":"Sandbox Lifecycle","level":2},{"text":"Supported Agents","level":2},{"text":"Built-in Default Policy","level":2},{"text":"Policy Structure","level":2},{"text":"Network Access Rules","level":2},{"text":"Next Steps","level":2}],"children":[{"id":"sandboxes/community-sandboxes","title":"Community Sandboxes","url":"sandboxes/community-sandboxes.html","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"Use pre-built sandboxes from the OpenShell Community catalog or contribute your own.","tags":["Community","Sandbox","Container Image","Open Source"],"topics":["Generative AI","Cybersecurity"],"content_type":"concept","learning_level":"technical_beginner","audience":["engineer","data_scientist"],"content":"Community Sandboxes Use pre-built sandboxes from the OpenShell Community catalog, or contribute your\nown. What Are Community Sandboxes Community sandboxes are ready-to-use environments published in the\nOpenShell Community repository\nEach sandbox bundles a Dockerfile, policy, optional skills, and startup scripts\ninto a single package that you can launch with one command. Current Catalog The following community sandboxes are available in the catalog. Sandbox Description base Foundational image with system tools and dev environment openclaw Open agent manipulation and control sdg Synthetic data generation workflows simulation General-purpose simulation sandboxes Use a Community Sandbox Launch a community sandbox by name with the --from flag: $ openshell sandbox create --from openclaw\nWhen you pass --from with a community sandbox name, the CLI: Resolves the name against the\nOpenShell Community repository. Pulls the Dockerfile, policy, skills, and any startup scripts. Builds the container image locally. Creates the sandbox with the bundled configuration applied. You end up with a running sandbox whose image, policy, and tooling are all\npreconfigured by the community package. Other Sources The --from flag also accepts: Local directory paths: Point to a directory on disk that contains a\nDockerfile and optional policy/skills: $ openshell sandbox create --from ./my-sandbox-dir\nContainer image references: Use an existing container image directly: $ openshell sandbox create --from my-registry.example.com/my-image:latest\nContribute a Community Sandbox Each community sandbox is a directory under sandboxes/ in the\nOpenShell Community repository\nAt minimum, a sandbox directory must contain: Dockerfile : Defines the container image README.md : Describes the sandbox and how to use it Optional files: policy.yaml : Default policy applied when the sandbox launches skills/ : Agent skill definitions bundled with the sandbox Startup scripts: Any scripts the Dockerfile or entrypoint invokes To contribute, fork the repository, add your sandbox directory, and open a pull\nrequest. Refer to the repository’s\nCONTRIBUTING.md\nfor submission guidelines. The community catalog is designed to grow. If you have built a sandbox that\nsupports a particular workflow (data processing, simulation, code review\nor anything else), consider contributing it back so others can use it. Next Steps Explore related topics: Need to supply API keys or tokens? Set up providers for credential management. Want to customize the sandbox policy? Write custom rules in policies","format":"text","content_length":2562,"word_count":367,"summary":"Use pre-built sandboxes from the OpenShell Community catalog, or contribute your own.","headings":[{"text":"Community Sandboxes","level":1,"id":"community-sandboxes"},{"text":"What Are Community Sandboxes","level":2,"id":"what-are-community-sandboxes"},{"text":"Current Catalog","level":2,"id":"current-catalog"},{"text":"Use a Community Sandbox","level":2,"id":"use-a-community-sandbox"},{"text":"Other Sources","level":3,"id":"other-sources"},{"text":"Contribute a Community Sandbox","level":2,"id":"contribute-a-community-sandbox"},{"text":"Next Steps","level":2,"id":"next-steps"}],"headings_text":"Community Sandboxes What Are Community Sandboxes Current Catalog Use a Community Sandbox Other Sources Contribute a Community Sandbox Next Steps","keywords":["accepts","agent","any","builds","catalog","com","community","contain","container","contribute","creates","current","default","defines","describes","description","directly","dockerfile","each","explore","files","flag","foundational","general","image","launch","local","need","next","open","openshell","optional","other","paths","point","pulls","refer","references","resolves","sandbox","sandboxes","scripts","set","skills","sources","startup","steps","synthetic","topics","want"],"code_blocks":[{"content":"$ openshell sandbox create --from openclaw","language":"text"},{"content":"$ openshell sandbox create --from ./my-sandbox-dir","language":"text"},{"content":"$ openshell sandbox create --from my-registry.example.com/my-image:latest","language":"text"}],"links":[{"text":"OpenShell Community","type":"external","url":"https://github.com/NVIDIA/OpenShell-Community"},{"text":"OpenShell Community","type":"external","url":"https://github.com/NVIDIA/OpenShell-Community"},{"text":"OpenShell Community","type":"external","url":"https://github.com/NVIDIA/OpenShell-Community"},{"text":"Contributing","type":"external","url":"https://github.com/NVIDIA/OpenShell-Community/blob/main/CONTRIBUTING.md","original_text":"CONTRIBUTING.md"}],"images":[],"doc_type":"tutorial","section_path":["Sandboxes","Community Sandboxes"]},{"id":"sandboxes/create-and-manage","title":"Create and Manage Sandboxes","url":"sandboxes/create-and-manage.html","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"Create, inspect, connect to, monitor, transfer files, and delete OpenShell sandboxes.","tags":["Sandboxing","AI Agents","Sandbox Management","CLI"],"topics":["Generative AI","Cybersecurity"],"content_type":"how_to","learning_level":"technical_beginner","audience":["engineer","data_scientist"],"content":"Create and Manage Sandboxes This page walks you through the full sandbox lifecycle: creating, inspecting, connecting to, monitoring, and deleting sandboxes. For background on what sandboxes are and how the runtime works, refer to About Sandboxes . Docker must be running before you create a sandbox. If it is not, the CLI\nreturns a connection-refused error ( os error 61 ) without explaining\nthe cause. Start Docker and try again. Create a Sandbox Run a single command to create a sandbox and launch your agent: $ openshell sandbox create -- claude\nIf you have an existing gateway, the sandbox is created in it. Otherwise, a gateway is created automatically. A fully specified creation command might look like: $ openshell sandbox create\nname dev\nprovider my-claude\npolicy policy.yaml\nupload\nclaude\nSandboxes created with openshell sandbox create stay running by default after\nthe initial command or shell exits. Use --no-keep when you want the sandbox\ndeleted automatically instead. Create from a Community Sandbox or Custom Image Use --from to create a sandbox from a pre-built community package, a local directory, or a container image: $ openshell sandbox create --from openclaw\nThe CLI resolves the name against the OpenShell Community catalog, pulls the bundled Dockerfile and policy, builds the image locally, and creates the sandbox. For the full catalog and how to contribute your own, refer to community-sandboxes . You can also point --from at a local directory or a container image reference: $ openshell sandbox create --from ./my-sandbox-dir\nopenshell sandbox create --from my-registry.example.com/my-image:latest\nList and Inspect Sandboxes Check the status of your sandboxes and retrieve detailed information about individual ones. List all sandboxes: $ openshell sandbox list\nGet detailed information about a specific sandbox: $ openshell sandbox get my-sandbox\nConnect to a Sandbox Access a running sandbox through an interactive SSH session or VS Code Remote-SSH. Interactive SSH Open an SSH session into a running sandbox: $ openshell sandbox connect my-sandbox\nOpen in a remote editor Launch VS Code or Cursor directly into the sandbox workspace: $ openshell sandbox create --editor vscode --name my-sandbox\nopenshell sandbox connect my-sandbox --editor cursor\nWhen --editor is used, OpenShell keeps the sandbox alive and installs an\nOpenShell-managed SSH include file instead of cluttering your main\nssh/config with generated host blocks. View Logs Stream and filter sandbox logs to monitor agent activity and diagnose policy decisions. Stream sandbox logs: $ openshell logs my-sandbox\nUse flags to filter and follow output: Flag Purpose Example --tail Stream logs in real time openshell logs my-sandbox --tail --source Filter by log source --source sandbox --level Filter by severity --level warn --since Show logs from a time window --since 5m Monitor Your Sandbox OpenShell Terminal is a real-time dashboard that combines sandbox status and live logs in a single view. $ openshell term\nThe dashboard shows the following information. Sandbox status : Name, phase, image, attached providers, age, and active port forwards. Live log stream : Omutbound connections, policy decisions, and inference interceptions as they happen. Logs are labeled by source: sandbox (proxy and policy events) or gateway (lifecycle events). Use the terminal to spot blocked connections ( action=deny entries) and inference interceptions ( action=inspect_for_inference entries). If a connection is blocked unexpectedly, add the host to your network policy — refer to policies for the workflow. Transfer Files Transfer files between your host machine and a running sandbox. Upload files from your host into the sandbox: $ openshell sandbox upload my-sandbox ./src /sandbox/src\nDownload files from the sandbox to your host: $ openshell sandbox download my-sandbox /sandbox/output ./local\nYou can also upload files at creation time with the --upload flag on\nopenshell sandbox create . Delete Sandboxes Remove sandboxes when they are no longer needed. Deleting a sandbox stops all processes, releases cluster resources, and purges injected credentials. Delete a sandbox by name: $ openshell sandbox delete my-sandbox\nDelete all sandboxes in the active gateway: $ openshell sandbox delete --all\nNext Steps Explore related topics: To follow a complete end-to-end example, refer to the /tutorials/github-sandbox tutorial. To supply API keys or tokens, refer to providers . To control what the agent can access, refer to policies . To use a pre-built environment, refer to the community-sandboxes catalog","format":"text","content_length":4595,"word_count":695,"summary":"This page walks you through the full sandbox lifecycle: creating, inspecting, connecting to, monitoring, and deleting sandboxes. For background on what sandboxes are and how the runtime works, refer to About Sandboxes.","headings":[{"text":"Create and Manage Sandboxes","level":1,"id":"create-and-manage-sandboxes"},{"text":"Create a Sandbox","level":2,"id":"create-a-sandbox"},{"text":"Create from a Community Sandbox or Custom Image","level":2,"id":"create-from-a-community-sandbox-or-custom-image"},{"text":"List and Inspect Sandboxes","level":2,"id":"list-and-inspect-sandboxes"},{"text":"Connect to a Sandbox","level":2,"id":"connect-to-a-sandbox"},{"text":"Interactive SSH","level":3,"id":"interactive-ssh"},{"text":"Open in a remote editor","level":3,"id":"open-in-a-remote-editor"},{"text":"View Logs","level":2,"id":"view-logs"},{"text":"Monitor Your Sandbox","level":2,"id":"monitor-your-sandbox"},{"text":"Transfer Files","level":2,"id":"transfer-files"},{"text":"Delete Sandboxes","level":2,"id":"delete-sandboxes"},{"text":"Next Steps","level":2,"id":"next-steps"}],"headings_text":"Create and Manage Sandboxes Create a Sandbox Create from a Community Sandbox or Custom Image List and Inspect Sandboxes Connect to a Sandbox Interactive SSH Open in a remote editor View Logs Monitor Your Sandbox Transfer Files Delete Sandboxes Next Steps","keywords":["about","access","action","agent","check","code","com","community","connect","create","cursor","custom","delete","deleting","docker","dockerfile","download","editor","example","explore","files","filter","flag","from","gateway","host","image","inspect","interactive","launch","lifecycle","like","list","live","logs","manage","monitor","name","next","omutbound","open","openshell","otherwise","output","purpose","reference","remote","remove","run","sandbox"],"code_blocks":[{"content":"$ openshell sandbox create -- claude","language":"text"},{"content":"$ openshell sandbox create \\\n --name dev \\\n --provider my-claude \\\n --policy policy.yaml \\\n --upload \\\n -- claude","language":"text"},{"content":"$ openshell sandbox create --from openclaw","language":"text"},{"content":"$ openshell sandbox create --from ./my-sandbox-dir\n$ openshell sandbox create --from my-registry.example.com/my-image:latest","language":"text"},{"content":"$ openshell sandbox list","language":"text"},{"content":"$ openshell sandbox get my-sandbox","language":"text"},{"content":"$ openshell sandbox connect my-sandbox","language":"text"},{"content":"$ openshell sandbox create --editor vscode --name my-sandbox\n$ openshell sandbox connect my-sandbox --editor cursor","language":"text"},{"content":"$ openshell logs my-sandbox","language":"text"},{"content":"$ openshell term","language":"text"},{"content":"$ openshell sandbox upload my-sandbox ./src /sandbox/src","language":"text"},{"content":"$ openshell sandbox download my-sandbox /sandbox/output ./local","language":"text"},{"content":"$ openshell sandbox delete my-sandbox","language":"text"},{"content":"$ openshell sandbox delete --all","language":"text"}],"links":[{"text":"OpenShell Community","type":"external","url":"https://github.com/NVIDIA/OpenShell-Community"}],"images":[],"doc_type":"tutorial","section_path":["Sandboxes","Create And Manage"]},{"id":"sandboxes/policies","title":"Customize Sandbox Policies","url":"sandboxes/policies.html","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"Apply, iterate, and debug sandbox network policies with hot-reload on running OpenShell sandboxes.","tags":["Policy","Network Policy","Sandbox","Security","Hot Reload"],"topics":["Generative AI","Cybersecurity"],"content_type":"how_to","learning_level":"technical_intermediate","audience":["engineer"],"content":"Customize Sandbox Policies Use this page to apply and iterate policy changes on running sandboxes. For a full field-by-field YAML definition, use the Policy Schema Reference . Quick Start: Apply a Custom Policy Pass a policy YAML file when creating the sandbox: $ openshell sandbox create --policy ./my-policy.yaml -- claude\nopenshell sandbox create keeps the sandbox running after the initial command exits, which is useful when you plan to iterate on the policy. Add --no-keep if you want the sandbox deleted automatically instead. To avoid passing --policy every time, set a default policy with an environment variable: $ export OPENSHELL_SANDBOX_POLICY=./my-policy.yaml\nopenshell sandbox create -- claude\nThe CLI uses the policy from OPENSHELL_SANDBOX_POLICY whenever --policy is not explicitly provided. Iterate on a Running Sandbox To change what the sandbox can access, pull the current policy, edit the YAML, and push the update. The workflow is iterative: create the sandbox, monitor logs for denied actions, pull the policy, modify it, push, and verify. The following steps outline the hot-reload policy update workflow. Create the sandbox with your initial policy by following Quick Start: Apply a Custom Policy above (or set OPENSHELL_SANDBOX_POLICY ). Monitor denials. Each log entry shows host, port, binary, and reason. Alternatively, use openshell term for a live dashboard. $ openshell logs --tail --source sandbox\nPull the current policy. Strip the metadata header (Version, Hash, Status) before reusing the file. $ openshell policy get --full > current-policy.yaml\nEdit the YAML: add or adjust network_policies entries, binaries, access or rules , or inference.allowed_routes . Push the updated policy. Exit codes: 0 = loaded, 1 = validation failed, 124 = timeout. $ openshell policy set --policy current-policy.yaml --wait\nVerify the new revision. If status is loaded , repeat from step 2 as needed; if failed , fix the policy and repeat from step 4. $ openshell policy list --tail --source sandbox for the denied host, path, and binary. When triaging denied requests, check: Destination host and port to confirm which endpoint is missing. Calling binary path to confirm which binaries entry needs to be added or adjusted. HTTP method and path (for REST endpoints) to confirm which rules entry needs to be added or adjusted. Then push the updated policy as described above. Examples Add these blocks to the network_policies section of your sandbox policy. Apply with openshell policy set --policy --wait\nUse Simple endpoint for host-level allowlists and Granular rules for method/path control. Simple endpoint Allow pip install and uv pip install to reach PyPI: pypi\nname: pypi\nendpoints\nhost: pypi.org\nport: 443\nhost: files.pythonhosted.org\nport: 443\nbinaries\n{ path: /usr/bin/pip\n{ path: /usr/local/bin/uv\nEndpoints without protocol or tls use TCP passthrough — the proxy allows the stream without inspecting payloads. Granular rules Allow Claude and the GitHub CLI to reach api.github.com with per-path rules: read-only (GET, HEAD, OPTIONS) and GraphQL (POST) for all paths; full write access for alpha-repo ; and create/edit issues only for bravo-repo . Replace with your GitHub org or username. For an end-to-end walkthrough that combines this policy with a GitHub credential provider and sandbox creation, refer to /tutorials/github-sandbox . github_repos\nname: github_repos\nendpoints\nhost: api.github.com\nport: 443\nprotocol: rest\ntls: terminate\nenforcement: enforce\nrules\nallow\nmethod: GET\npath:\nallow\nmethod: HEAD\npath:\nallow\nmethod: OPTIONS\npath:\nallow\nmethod: POST\npath: \"/graphql\nallow\nmethod:\npath: \"/repos//alpha-repo\nallow\nmethod: POST\npath: \"/repos//bravo-repo/issues\nallow\nmethod: PATCH\npath: \"/repos//bravo-repo/issues\nbinaries\n{ path: /usr/local/bin/claude\n{ path: /usr/bin/gh\nEndpoints with protocol: rest and tls: terminate enable HTTP request inspection — the proxy decrypts TLS and checks each HTTP request against the rules list. Next Steps Explore related topics: To learn about policy structure and network access rules, refer to index . To view the full field-by-field YAML definition, refer to the Policy Schema Reference . To review the default policy breakdown, refer to ../reference/default-policy","format":"text","content_length":4379,"word_count":647,"summary":"Use this page to apply and iterate policy changes on running sandboxes. For a full field-by-field YAML definition, use the Policy Schema Reference.","headings":[{"text":"Customize Sandbox Policies","level":1,"id":"customize-sandbox-policies"},{"text":"Quick Start: Apply a Custom Policy","level":2,"id":"quick-start-apply-a-custom-policy"},{"text":"Iterate on a Running Sandbox","level":2,"id":"iterate-on-a-running-sandbox"},{"text":"Debug Denied Requests","level":2,"id":"debug-denied-requests"},{"text":"Examples","level":2,"id":"examples"},{"text":"Next Steps","level":2,"id":"next-steps"}],"headings_text":"Customize Sandbox Policies Quick Start: Apply a Custom Policy Iterate on a Running Sandbox Debug Denied Requests Examples Next Steps","keywords":["add","allow","alternatively","apply","calling","check","claude","codes","com","create","custom","customize","debug","denied","destination","each","edit","endpoints","enforcement","examples","exit","explore","github","granular","graphql","hash","host","iterate","iterative","method","monitor","name","next","org","pass","path","policies","policy","port","protocol","pull","push","pypi","quick","reference","replace","requests","rules","running","sandbox"],"code_blocks":[{"content":"$ openshell sandbox create --policy ./my-policy.yaml -- claude","language":"text"},{"content":"$ export OPENSHELL_SANDBOX_POLICY=./my-policy.yaml\n$ openshell sandbox create -- claude","language":"text"},{"content":"$ openshell logs --tail --source sandbox","language":"text"},{"content":"$ openshell policy get --full > current-policy.yaml","language":"text"},{"content":"$ openshell policy set --policy current-policy.yaml --wait","language":"text"},{"content":"$ openshell policy list ","language":"text"},{"content":"pypi:\n name: pypi\n endpoints:\n - host: pypi.org\n port: 443\n - host: files.pythonhosted.org\n port: 443\n binaries:\n - { path: /usr/bin/pip }\n - { path: /usr/local/bin/uv }","language":"text"},{"content":"github_repos:\n name: github_repos\n endpoints:\n - host: api.github.com\n port: 443\n protocol: rest\n tls: terminate\n enforcement: enforce\n rules:\n - allow:\n method: GET\n path: \"/**\"\n - allow:\n method: HEAD\n path: \"/**\"\n - allow:\n method: OPTIONS\n path: \"/**\"\n - allow:\n method: POST\n path: \"/graphql\"\n - allow:\n method: \"*\"\n path: \"/repos//alpha-repo/**\"\n - allow:\n method: POST\n path: \"/repos//bravo-repo/issues\"\n - allow:\n method: PATCH\n path: \"/repos//bravo-repo/issues/*\"\n binaries:\n - { path: /usr/local/bin/claude }\n - { path: /usr/bin/gh }","language":"text"}],"links":[{"text":"Quick Start: Apply a Custom Policy","type":"anchor","url":"#quick-start-apply-a-custom-policy"}],"images":[],"doc_type":"tutorial","section_path":["Sandboxes","Policies"]},{"id":"sandboxes/providers","title":"Providers","url":"sandboxes/providers.html","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"Create and manage credential providers that inject API keys and tokens into OpenShell sandboxes.","tags":["Providers","Credentials","API Keys","Sandbox","Security"],"topics":["Generative AI","Cybersecurity"],"content_type":"how_to","learning_level":"technical_beginner","audience":["engineer","data_scientist"],"content":"Providers AI agents typically need credentials to access external services: an API key for the AI model provider, a token for GitHub or GitLab, and so on. OpenShell manages these credentials as first-class entities called providers . Create and manage providers that supply credentials to sandboxes. Create a Provider Providers can be created from local environment variables or with explicit credential values. From Local Credentials The fastest way to create a provider is to let the CLI discover credentials from\nyour shell environment: $ openshell provider create --name my-claude --type claude --from-existing\nThis reads ANTHROPIC_API_KEY or CLAUDE_API_KEY from your current environment\nand stores them in the provider. With Explicit Credentials Supply a credential value directly: $ openshell provider create --name my-api --type generic --credential API_KEY=sk-abc123\nBare Key Form Pass a key name without a value to read the value from the environment variable\nof that name: $ openshell provider create --name my-api --type generic --credential API_KEY\nThis looks up the current value of $API_KEY in your shell and stores it. Manage Providers List, inspect, update, and delete providers from the active cluster. List all providers: $ openshell provider list\nInspect a provider: $ openshell provider get my-claude\nUpdate a provider’s credentials: $ openshell provider update my-claude --type claude --from-existing\nDelete a provider: $ openshell provider delete my-claude\nAttach Providers to Sandboxes Pass one or more --provider flags when creating a sandbox: $ openshell sandbox create --provider my-claude --provider my-github -- claude\nEach --provider flag attaches one provider. The sandbox receives all\ncredentials from every attached provider at runtime. Providers cannot be added to a running sandbox. If you need to attach an\nadditional provider, delete the sandbox and recreate it with all required\nproviders specified. Auto-Discovery Shortcut When the trailing command in openshell sandbox create is a recognized tool name ( claude , codex , or opencode ), the CLI auto-creates the required\nprovider from your local credentials if one does not already exist. You do not\nneed to create the provider separately: $ openshell sandbox create -- claude\nThis detects claude as a known tool, finds your ANTHROPIC_API_KEY , creates\na provider, attaches it to the sandbox, and launches Claude Code. Supported Provider Types The following provider types are supported. Type Environment Variables Injected Typical Use claude ANTHROPIC_API_KEY , CLAUDE_API_KEY Claude Code, Anthropic API codex OPENAI_API_KEY OpenAI Codex opencode OPENCODE_API_KEY , OPENROUTER_API_KEY , OPENAI_API_KEY opencode tool github GITHUB_TOKEN , GH_TOKEN GitHub API, gh CLI — refer to /tutorials/github-sandbox gitlab GITLAB_TOKEN , GLAB_TOKEN , CI_JOB_TOKEN GitLab API, glab CLI nvidia NVIDIA_API_KEY NVIDIA API Catalog generic User-defined Any service with custom credentials outlook (none: no auto-discovery) Microsoft Outlook integration Use the generic type for any service not listed above. You define the\nenvironment variable names and values yourself with --credential . Next Steps Explore related topics: To control what the agent can access, refer to policies . To use a pre-built environment, refer to the community-sandboxes catalog. To view the complete field reference for the policy YAML, refer to the Policy Schema Reference","format":"text","content_length":3421,"word_count":502,"summary":"AI agents typically need credentials to access external services: an API key for the AI model provider, a token for GitHub or GitLab, and so on. OpenShell manages these credentials as first-class entities called providers.","headings":[{"text":"Providers","level":1,"id":"providers"},{"text":"Create a Provider","level":2,"id":"create-a-provider"},{"text":"From Local Credentials","level":3,"id":"from-local-credentials"},{"text":"With Explicit Credentials","level":3,"id":"with-explicit-credentials"},{"text":"Bare Key Form","level":3,"id":"bare-key-form"},{"text":"Manage Providers","level":2,"id":"manage-providers"},{"text":"Attach Providers to Sandboxes","level":2,"id":"attach-providers-to-sandboxes"},{"text":"Auto-Discovery Shortcut","level":3,"id":"auto-discovery-shortcut"},{"text":"Supported Provider Types","level":2,"id":"supported-provider-types"},{"text":"Next Steps","level":2,"id":"next-steps"}],"headings_text":"Providers Create a Provider From Local Credentials With Explicit Credentials Bare Key Form Manage Providers Attach Providers to Sandboxes Auto-Discovery Shortcut Supported Provider Types Next Steps","keywords":["anthropic","any","attach","auto","bare","catalog","claude","code","codex","create","credentials","delete","directly","discovery","each","environment","explicit","explore","form","from","github","gitlab","injected","inspect","key","list","local","manage","microsoft","name","next","none","openai","openshell","outlook","pass","policy","provider","providers","reference","sandbox","sandboxes","schema","separately","services","shortcut","steps","supply","supported","this"],"code_blocks":[{"content":"$ openshell provider create --name my-claude --type claude --from-existing","language":"text"},{"content":"$ openshell provider create --name my-api --type generic --credential API_KEY=sk-abc123","language":"text"},{"content":"$ openshell provider create --name my-api --type generic --credential API_KEY","language":"text"},{"content":"$ openshell provider list","language":"text"},{"content":"$ openshell provider get my-claude","language":"text"},{"content":"$ openshell provider update my-claude --type claude --from-existing","language":"text"},{"content":"$ openshell provider delete my-claude","language":"text"},{"content":"$ openshell sandbox create --provider my-claude --provider my-github -- claude","language":"text"},{"content":"$ openshell sandbox create -- claude","language":"text"}],"links":[],"images":[],"doc_type":"tutorial","section_path":["Sandboxes","Providers"]}]} \ No newline at end of file +{"id":"sandboxes/index","title":"About Sandboxes","url":"sandboxes/index.html","last_modified":"2026-03-13T02:30:39.438042+00:00","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"Understand sandbox lifecycle, supported agents, built-in default policy, and network access rules in OpenShell.","tags":["Sandboxing","AI Agents","Security","Policy","Isolation"],"topics":["Generative AI","Cybersecurity"],"content_type":"concept","learning_level":"technical_beginner","audience":["engineer","data_scientist"],"content":"About Sandboxes An OpenShell sandbox is a safe, private execution environment for an AI agent. Each sandbox runs with multiple layers of protection that prevent unauthorized data access, credential exposure, and network exfiltration. Protection layers include filesystem restrictions (Landlock), system call filtering (seccomp), network namespace isolation, and a privacy-enforcing HTTP CONNECT proxy. Sandbox Lifecycle Every sandbox moves through a defined set of phases: Phase Description Provisioning The runtime is setting up the sandbox environment, injecting credentials, and applying your policy. Ready The sandbox is running. The agent process is active and all isolation layers are enforced. You can connect, sync files, and view logs. Error Something went wrong during provisioning or execution. Check logs with openshell logs for details. Deleting The sandbox is being torn down. The system releases resources and purges credentials. Supported Agents The following table summarizes the agents that run in OpenShell sandboxes. Built-in agents are pre-installed in the OpenShell base sandbox image and auto-configured when passed as the trailing command to openshell sandbox create . More community agent sandboxes are available in the community-sandboxes catalog. Agent Source Default Policy Notes Claude Code Built-in Full coverage Works out of the box. Requires ANTHROPIC_API_KEY . OpenCode Built-in Partial coverage Pre-installed. Add opencode.ai endpoint and OpenCode binary paths to the policy for full functionality. Codex Built-in No coverage Pre-installed. Requires a custom policy with OpenAI endpoints and Codex binary paths. Requires OPENAI_API_KEY . OpenClaw OpenShell Community Bundled Agent orchestration layer. Launch with openshell sandbox create --from openclaw\nBuilt-in Default Policy OpenShell ships a built-in policy that covers common agent workflows out of the box\nWhen you create a sandbox without --policy , the default policy is applied. It controls three things: Layer What It Controls How It Works Filesystem What the agent can access on disk Paths are split into read-only and read-write sets. Landlock LSM enforces these restrictions at the kernel level. Network What the agent can reach on the network Each policy block pairs allowed destinations (host and port) with allowed binaries (executable paths). The proxy matches every outbound connection to the binary that opened it. Both must match or the connection is denied. Process What privileges the agent has The agent runs as an unprivileged user with seccomp filters that block dangerous system calls. No sudo , no setuid , no path to elevated privileges. For the full breakdown of each default policy block and agent compatibility details, refer to ../reference/default-policy . Policy Structure A policy has static sections ( filesystem_policy , landlock , process ) that are locked at sandbox creation, and dynamic sections ( network_policies , inference ) that are hot-reloadable on a running sandbox. version: 1\nStatic: locked at sandbox creation. Paths the agent can read vs read/write\nfilesystem_policy\nread_only: [/usr, /lib, /etc\nread_write: [/sandbox, /tmp\nStatic: Landlock LSM kernel enforcement. best_effort uses highest ABI the host supports\nlandlock\ncompatibility: best_effort\nStatic: Unprivileged user/group the agent process runs as\nprocess\nrun_as_user: sandbox\nrun_as_group: sandbox\nDynamic: hot-reloadable. Named blocks of endpoints + binaries allowed to reach them\nnetwork_policies\nmy_api\nname: my-api\nendpoints\nhost: api.example.com\nport: 443\nprotocol: rest\ntls: terminate\nenforcement: enforce\naccess: full\nbinaries\npath: /usr/bin/curl\nDynamic: hot-reloadable. Routing hints this sandbox can use for inference (e.g. local, nvidia\ninference\nallowed_routes: [local\nFor the complete structure and every field, refer to the Policy Schema Reference . Network Access Rules Network access is controlled by policy blocks under network_policies . Each block has a name, a list of endpoints (host, port, protocol, and optional rules), and a list of binaries that are allowed to use those endpoints. Every outbound connection from the sandbox goes through the proxy: The proxy queries the policy engine with the destination (host and port) and the calling binary. A connection is allowed only when both match an entry in the same policy block. For endpoints with protocol: rest and tls: terminate , each HTTP request is checked against that endpoint’s rules (method and path). If no endpoint matches and inference routes are configured, the request may be rerouted for inference. Otherwise the connection is denied. Endpoints without protocol or tls allow the TCP stream through without inspecting payloads. Next Steps Continue with one of the following: To create your first sandbox, refer to create-and-manage . To supply API keys or tokens, refer to providers . To control what the agent can access, refer to policies . To use a pre-built environment, refer to the community-sandboxes catalog","format":"text","summary":"An OpenShell sandbox is a safe, private execution environment for an AI agent. Each sandbox runs with multiple layers of protection that prevent unauthorized data access, credential exposure, and network exfiltration. Protection layers include filesystem restrictions (Landlock), system call filte...","headings":[{"text":"About Sandboxes","level":1},{"text":"Sandbox Lifecycle","level":2},{"text":"Supported Agents","level":2},{"text":"Built-in Default Policy","level":2},{"text":"Policy Structure","level":2},{"text":"Network Access Rules","level":2},{"text":"Next Steps","level":2}],"children":[{"id":"sandboxes/community-sandboxes","title":"Community Sandboxes","url":"sandboxes/community-sandboxes.html","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"Use pre-built sandboxes from the OpenShell Community catalog or contribute your own.","tags":["Community","Sandbox","Container Image","Open Source"],"topics":["Generative AI","Cybersecurity"],"content_type":"concept","learning_level":"technical_beginner","audience":["engineer","data_scientist"],"content":"Community Sandboxes Use pre-built sandboxes from the OpenShell Community catalog, or contribute your\nown. What Are Community Sandboxes Community sandboxes are ready-to-use environments published in the\nOpenShell Community repository\nEach sandbox bundles a Dockerfile, policy, optional skills, and startup scripts\ninto a single package that you can launch with one command. Current Catalog The following community sandboxes are available in the catalog. Sandbox Description base Foundational image with system tools and dev environment openclaw Open agent manipulation and control sdg Synthetic data generation workflows simulation General-purpose simulation sandboxes Use a Community Sandbox Launch a community sandbox by name with the --from flag: $ openshell sandbox create --from openclaw\nWhen you pass --from with a community sandbox name, the CLI: Resolves the name against the\nOpenShell Community repository. Pulls the Dockerfile, policy, skills, and any startup scripts. Builds the container image locally. Creates the sandbox with the bundled configuration applied. You end up with a running sandbox whose image, policy, and tooling are all\npreconfigured by the community package. Other Sources The --from flag also accepts: Local directory paths: Point to a directory on disk that contains a\nDockerfile and optional policy/skills: $ openshell sandbox create --from ./my-sandbox-dir\nContainer image references: Use an existing container image directly: $ openshell sandbox create --from my-registry.example.com/my-image:latest\nContribute a Community Sandbox Each community sandbox is a directory under sandboxes/ in the\nOpenShell Community repository\nAt minimum, a sandbox directory must contain: Dockerfile : Defines the container image README.md : Describes the sandbox and how to use it Optional files: policy.yaml : Default policy applied when the sandbox launches skills/ : Agent skill definitions bundled with the sandbox Startup scripts: Any scripts the Dockerfile or entrypoint invokes To contribute, fork the repository, add your sandbox directory, and open a pull\nrequest. Refer to the repository’s\nCONTRIBUTING.md\nfor submission guidelines. The community catalog is designed to grow. If you have built a sandbox that\nsupports a particular workflow (data processing, simulation, code review\nor anything else), consider contributing it back so others can use it. Next Steps Explore related topics: Need to supply API keys or tokens? Set up providers for credential management. Want to customize the sandbox policy? Write custom rules in policies","format":"text","content_length":2562,"word_count":367,"summary":"Use pre-built sandboxes from the OpenShell Community catalog, or contribute your own.","headings":[{"text":"Community Sandboxes","level":1,"id":"community-sandboxes"},{"text":"What Are Community Sandboxes","level":2,"id":"what-are-community-sandboxes"},{"text":"Current Catalog","level":2,"id":"current-catalog"},{"text":"Use a Community Sandbox","level":2,"id":"use-a-community-sandbox"},{"text":"Other Sources","level":3,"id":"other-sources"},{"text":"Contribute a Community Sandbox","level":2,"id":"contribute-a-community-sandbox"},{"text":"Next Steps","level":2,"id":"next-steps"}],"headings_text":"Community Sandboxes What Are Community Sandboxes Current Catalog Use a Community Sandbox Other Sources Contribute a Community Sandbox Next Steps","keywords":["accepts","agent","any","builds","catalog","com","community","contain","container","contribute","creates","current","default","defines","describes","description","directly","dockerfile","each","explore","files","flag","foundational","general","image","launch","local","need","next","open","openshell","optional","other","paths","point","pulls","refer","references","resolves","sandbox","sandboxes","scripts","set","skills","sources","startup","steps","synthetic","topics","want"],"code_blocks":[{"content":"$ openshell sandbox create --from openclaw","language":"text"},{"content":"$ openshell sandbox create --from ./my-sandbox-dir","language":"text"},{"content":"$ openshell sandbox create --from my-registry.example.com/my-image:latest","language":"text"}],"links":[{"text":"OpenShell Community","type":"external","url":"https://github.com/NVIDIA/OpenShell-Community"},{"text":"OpenShell Community","type":"external","url":"https://github.com/NVIDIA/OpenShell-Community"},{"text":"OpenShell Community","type":"external","url":"https://github.com/NVIDIA/OpenShell-Community"},{"text":"Contributing","type":"external","url":"https://github.com/NVIDIA/OpenShell-Community/blob/main/CONTRIBUTING.md","original_text":"CONTRIBUTING.md"}],"images":[],"doc_type":"tutorial","section_path":["Sandboxes","Community Sandboxes"]},{"id":"sandboxes/create-and-manage","title":"Create and Manage Sandboxes","url":"sandboxes/create-and-manage.html","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"Create, inspect, connect to, monitor, transfer files, and delete OpenShell sandboxes.","tags":["Sandboxing","AI Agents","Sandbox Management","CLI"],"topics":["Generative AI","Cybersecurity"],"content_type":"how_to","learning_level":"technical_beginner","audience":["engineer","data_scientist"],"content":"Create and Manage Sandboxes This page walks you through the full sandbox lifecycle: creating, inspecting, connecting to, monitoring, and deleting sandboxes. For background on what sandboxes are and how the runtime works, refer to About Sandboxes . Docker must be running before you create a sandbox. If it is not, the CLI\nreturns a connection-refused error ( os error 61 ) without explaining\nthe cause. Start Docker and try again. Create a Sandbox Run a single command to create a sandbox and launch your agent: $ openshell sandbox create -- claude\nIf you have an existing gateway, the sandbox is created in it. Otherwise, a gateway is created automatically. A fully specified creation command might look like: $ openshell sandbox create\nname dev\nprovider my-claude\npolicy policy.yaml\nupload\nclaude\nSandboxes created with openshell sandbox create stay running by default after\nthe initial command or shell exits. Use --no-keep when you want the sandbox\ndeleted automatically instead. Create from a Community Sandbox or Custom Image Use --from to create a sandbox from a pre-built community package, a local directory, or a container image: $ openshell sandbox create --from openclaw\nThe CLI resolves the name against the OpenShell Community catalog, pulls the bundled Dockerfile and policy, builds the image locally, and creates the sandbox. For the full catalog and how to contribute your own, refer to community-sandboxes . You can also point --from at a local directory or a container image reference: $ openshell sandbox create --from ./my-sandbox-dir\nopenshell sandbox create --from my-registry.example.com/my-image:latest\nList and Inspect Sandboxes Check the status of your sandboxes and retrieve detailed information about individual ones. List all sandboxes: $ openshell sandbox list\nGet detailed information about a specific sandbox: $ openshell sandbox get my-sandbox\nConnect to a Sandbox Access a running sandbox through an interactive SSH session or VS Code Remote-SSH. Interactive SSH Open an SSH session into a running sandbox: $ openshell sandbox connect my-sandbox\nOpen in a remote editor Launch VS Code or Cursor directly into the sandbox workspace: $ openshell sandbox create --editor vscode --name my-sandbox\nopenshell sandbox connect my-sandbox --editor cursor\nWhen --editor is used, OpenShell keeps the sandbox alive and installs an\nOpenShell-managed SSH include file instead of cluttering your main\nssh/config with generated host blocks. View Logs Stream and filter sandbox logs to monitor agent activity and diagnose policy decisions. Stream sandbox logs: $ openshell logs my-sandbox\nUse flags to filter and follow output: Flag Purpose Example --tail Stream logs in real time openshell logs my-sandbox --tail --source Filter by log source --source sandbox --level Filter by severity --level warn --since Show logs from a time window --since 5m Monitor Your Sandbox OpenShell Terminal is a real-time dashboard that combines sandbox status and live logs in a single view. $ openshell term\nThe dashboard shows the following information. Sandbox status : Name, phase, image, attached providers, age, and active port forwards. Live log stream : Omutbound connections, policy decisions, and inference interceptions as they happen. Logs are labeled by source: sandbox (proxy and policy events) or gateway (lifecycle events). Use the terminal to spot blocked connections ( action=deny entries) and inference interceptions ( action=inspect_for_inference entries). If a connection is blocked unexpectedly, add the host to your network policy — refer to policies for the workflow. Transfer Files Transfer files between your host machine and a running sandbox. Upload files from your host into the sandbox: $ openshell sandbox upload my-sandbox ./src /sandbox/src\nDownload files from the sandbox to your host: $ openshell sandbox download my-sandbox /sandbox/output ./local\nYou can also upload files at creation time with the --upload flag on\nopenshell sandbox create . Delete Sandboxes Remove sandboxes when they are no longer needed. Deleting a sandbox stops all processes, releases cluster resources, and purges injected credentials. Delete a sandbox by name: $ openshell sandbox delete my-sandbox\nDelete all sandboxes in the active gateway: $ openshell sandbox delete --all\nNext Steps Explore related topics: To follow a complete end-to-end example, refer to the /tutorials/github-sandbox tutorial. To supply API keys or tokens, refer to providers . To control what the agent can access, refer to policies . To use a pre-built environment, refer to the community-sandboxes catalog","format":"text","content_length":4595,"word_count":695,"summary":"This page walks you through the full sandbox lifecycle: creating, inspecting, connecting to, monitoring, and deleting sandboxes. For background on what sandboxes are and how the runtime works, refer to About Sandboxes.","headings":[{"text":"Create and Manage Sandboxes","level":1,"id":"create-and-manage-sandboxes"},{"text":"Create a Sandbox","level":2,"id":"create-a-sandbox"},{"text":"Create from a Community Sandbox or Custom Image","level":2,"id":"create-from-a-community-sandbox-or-custom-image"},{"text":"List and Inspect Sandboxes","level":2,"id":"list-and-inspect-sandboxes"},{"text":"Connect to a Sandbox","level":2,"id":"connect-to-a-sandbox"},{"text":"Interactive SSH","level":3,"id":"interactive-ssh"},{"text":"Open in a remote editor","level":3,"id":"open-in-a-remote-editor"},{"text":"View Logs","level":2,"id":"view-logs"},{"text":"Monitor Your Sandbox","level":2,"id":"monitor-your-sandbox"},{"text":"Transfer Files","level":2,"id":"transfer-files"},{"text":"Delete Sandboxes","level":2,"id":"delete-sandboxes"},{"text":"Next Steps","level":2,"id":"next-steps"}],"headings_text":"Create and Manage Sandboxes Create a Sandbox Create from a Community Sandbox or Custom Image List and Inspect Sandboxes Connect to a Sandbox Interactive SSH Open in a remote editor View Logs Monitor Your Sandbox Transfer Files Delete Sandboxes Next Steps","keywords":["about","access","action","agent","check","code","com","community","connect","create","cursor","custom","delete","deleting","docker","dockerfile","download","editor","example","explore","files","filter","flag","from","gateway","host","image","inspect","interactive","launch","lifecycle","like","list","live","logs","manage","monitor","name","next","omutbound","open","openshell","otherwise","output","purpose","reference","remote","remove","run","sandbox"],"code_blocks":[{"content":"$ openshell sandbox create -- claude","language":"text"},{"content":"$ openshell sandbox create \\\n --name dev \\\n --provider my-claude \\\n --policy policy.yaml \\\n --upload \\\n -- claude","language":"text"},{"content":"$ openshell sandbox create --from openclaw","language":"text"},{"content":"$ openshell sandbox create --from ./my-sandbox-dir\n$ openshell sandbox create --from my-registry.example.com/my-image:latest","language":"text"},{"content":"$ openshell sandbox list","language":"text"},{"content":"$ openshell sandbox get my-sandbox","language":"text"},{"content":"$ openshell sandbox connect my-sandbox","language":"text"},{"content":"$ openshell sandbox create --editor vscode --name my-sandbox\n$ openshell sandbox connect my-sandbox --editor cursor","language":"text"},{"content":"$ openshell logs my-sandbox","language":"text"},{"content":"$ openshell term","language":"text"},{"content":"$ openshell sandbox upload my-sandbox ./src /sandbox/src","language":"text"},{"content":"$ openshell sandbox download my-sandbox /sandbox/output ./local","language":"text"},{"content":"$ openshell sandbox delete my-sandbox","language":"text"},{"content":"$ openshell sandbox delete --all","language":"text"}],"links":[{"text":"OpenShell Community","type":"external","url":"https://github.com/NVIDIA/OpenShell-Community"}],"images":[],"doc_type":"tutorial","section_path":["Sandboxes","Create And Manage"]},{"id":"sandboxes/policies","title":"Customize Sandbox Policies","url":"sandboxes/policies.html","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"Apply, iterate, and debug sandbox network policies with hot-reload on running OpenShell sandboxes.","tags":["Policy","Network Policy","Sandbox","Security","Hot Reload"],"topics":["Generative AI","Cybersecurity"],"content_type":"how_to","learning_level":"technical_intermediate","audience":["engineer"],"content":"Customize Sandbox Policies Use this page to apply and iterate policy changes on running sandboxes. For a full field-by-field YAML definition, use the Policy Schema Reference . Quick Start: Apply a Custom Policy Pass a policy YAML file when creating the sandbox: $ openshell sandbox create --policy ./my-policy.yaml -- claude\nopenshell sandbox create keeps the sandbox running after the initial command exits, which is useful when you plan to iterate on the policy. Add --no-keep if you want the sandbox deleted automatically instead. To avoid passing --policy every time, set a default policy with an environment variable: $ export OPENSHELL_SANDBOX_POLICY=./my-policy.yaml\nopenshell sandbox create -- claude\nThe CLI uses the policy from OPENSHELL_SANDBOX_POLICY whenever --policy is not explicitly provided. Iterate on a Running Sandbox To change what the sandbox can access, pull the current policy, edit the YAML, and push the update. The workflow is iterative: create the sandbox, monitor logs for denied actions, pull the policy, modify it, push, and verify. The following steps outline the hot-reload policy update workflow. Create the sandbox with your initial policy by following Quick Start: Apply a Custom Policy above (or set OPENSHELL_SANDBOX_POLICY ). Monitor denials. Each log entry shows host, port, binary, and reason. Alternatively, use openshell term for a live dashboard. $ openshell logs --tail --source sandbox\nPull the current policy. Strip the metadata header (Version, Hash, Status) before reusing the file. $ openshell policy get --full > current-policy.yaml\nEdit the YAML: add or adjust network_policies entries, binaries, access or rules , or inference.allowed_routes . Push the updated policy. Exit codes: 0 = loaded, 1 = validation failed, 124 = timeout. $ openshell policy set --policy current-policy.yaml --wait\nVerify the new revision. If status is loaded , repeat from step 2 as needed; if failed , fix the policy and repeat from step 4. $ openshell policy list --tail --source sandbox for the denied host, path, and binary. When triaging denied requests, check: Destination host and port to confirm which endpoint is missing. Calling binary path to confirm which binaries entry needs to be added or adjusted. HTTP method and path (for REST endpoints) to confirm which rules entry needs to be added or adjusted. Then push the updated policy as described above. Examples Add these blocks to the network_policies section of your sandbox policy. Apply with openshell policy set --policy --wait\nUse Simple endpoint for host-level allowlists and Granular rules for method/path control. Simple endpoint Allow pip install and uv pip install to reach PyPI: pypi\nname: pypi\nendpoints\nhost: pypi.org\nport: 443\nhost: files.pythonhosted.org\nport: 443\nbinaries\n{ path: /usr/bin/pip\n{ path: /usr/local/bin/uv\nEndpoints without protocol or tls use TCP passthrough — the proxy allows the stream without inspecting payloads. Granular rules Allow Claude and the GitHub CLI to reach api.github.com with per-path rules: read-only (GET, HEAD, OPTIONS) and GraphQL (POST) for all paths; full write access for alpha-repo ; and create/edit issues only for bravo-repo . Replace with your GitHub org or username. For an end-to-end walkthrough that combines this policy with a GitHub credential provider and sandbox creation, refer to /tutorials/github-sandbox . github_repos\nname: github_repos\nendpoints\nhost: api.github.com\nport: 443\nprotocol: rest\ntls: terminate\nenforcement: enforce\nrules\nallow\nmethod: GET\npath:\nallow\nmethod: HEAD\npath:\nallow\nmethod: OPTIONS\npath:\nallow\nmethod: POST\npath: \"/graphql\nallow\nmethod:\npath: \"/repos//alpha-repo\nallow\nmethod: POST\npath: \"/repos//bravo-repo/issues\nallow\nmethod: PATCH\npath: \"/repos//bravo-repo/issues\nbinaries\n{ path: /usr/local/bin/claude\n{ path: /usr/bin/gh\nEndpoints with protocol: rest and tls: terminate enable HTTP request inspection — the proxy decrypts TLS and checks each HTTP request against the rules list. Next Steps Explore related topics: To learn about policy structure and network access rules, refer to index . To view the full field-by-field YAML definition, refer to the Policy Schema Reference . To review the default policy breakdown, refer to ../reference/default-policy","format":"text","content_length":4379,"word_count":647,"summary":"Use this page to apply and iterate policy changes on running sandboxes. For a full field-by-field YAML definition, use the Policy Schema Reference.","headings":[{"text":"Customize Sandbox Policies","level":1,"id":"customize-sandbox-policies"},{"text":"Quick Start: Apply a Custom Policy","level":2,"id":"quick-start-apply-a-custom-policy"},{"text":"Iterate on a Running Sandbox","level":2,"id":"iterate-on-a-running-sandbox"},{"text":"Debug Denied Requests","level":2,"id":"debug-denied-requests"},{"text":"Examples","level":2,"id":"examples"},{"text":"Next Steps","level":2,"id":"next-steps"}],"headings_text":"Customize Sandbox Policies Quick Start: Apply a Custom Policy Iterate on a Running Sandbox Debug Denied Requests Examples Next Steps","keywords":["add","allow","alternatively","apply","calling","check","claude","codes","com","create","custom","customize","debug","denied","destination","each","edit","endpoints","enforcement","examples","exit","explore","github","granular","graphql","hash","host","iterate","iterative","method","monitor","name","next","org","pass","path","policies","policy","port","protocol","pull","push","pypi","quick","reference","replace","requests","rules","running","sandbox"],"code_blocks":[{"content":"$ openshell sandbox create --policy ./my-policy.yaml -- claude","language":"text"},{"content":"$ export OPENSHELL_SANDBOX_POLICY=./my-policy.yaml\n$ openshell sandbox create -- claude","language":"text"},{"content":"$ openshell logs --tail --source sandbox","language":"text"},{"content":"$ openshell policy get --full > current-policy.yaml","language":"text"},{"content":"$ openshell policy set --policy current-policy.yaml --wait","language":"text"},{"content":"$ openshell policy list ","language":"text"},{"content":"pypi:\n name: pypi\n endpoints:\n - host: pypi.org\n port: 443\n - host: files.pythonhosted.org\n port: 443\n binaries:\n - { path: /usr/bin/pip }\n - { path: /usr/local/bin/uv }","language":"text"},{"content":"github_repos:\n name: github_repos\n endpoints:\n - host: api.github.com\n port: 443\n protocol: rest\n tls: terminate\n enforcement: enforce\n rules:\n - allow:\n method: GET\n path: \"/**\"\n - allow:\n method: HEAD\n path: \"/**\"\n - allow:\n method: OPTIONS\n path: \"/**\"\n - allow:\n method: POST\n path: \"/graphql\"\n - allow:\n method: \"*\"\n path: \"/repos//alpha-repo/**\"\n - allow:\n method: POST\n path: \"/repos//bravo-repo/issues\"\n - allow:\n method: PATCH\n path: \"/repos//bravo-repo/issues/*\"\n binaries:\n - { path: /usr/local/bin/claude }\n - { path: /usr/bin/gh }","language":"text"}],"links":[{"text":"Quick Start: Apply a Custom Policy","type":"anchor","url":"#quick-start-apply-a-custom-policy"}],"images":[],"doc_type":"tutorial","section_path":["Sandboxes","Policies"]},{"id":"sandboxes/providers","title":"Providers","url":"sandboxes/providers.html","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"Create and manage credential providers that inject API keys and tokens into OpenShell sandboxes.","tags":["Providers","Credentials","API Keys","Sandbox","Security"],"topics":["Generative AI","Cybersecurity"],"content_type":"how_to","learning_level":"technical_beginner","audience":["engineer","data_scientist"],"content":"Providers AI agents typically need credentials to access external services: an API key for the AI model provider, a token for GitHub or GitLab, and so on. OpenShell manages these credentials as first-class entities called providers . Create and manage providers that supply credentials to sandboxes. Create a Provider Providers can be created from local environment variables or with explicit credential values. From Local Credentials The fastest way to create a provider is to let the CLI discover credentials from\nyour shell environment: $ openshell provider create --name my-claude --type claude --from-existing\nThis reads ANTHROPIC_API_KEY or CLAUDE_API_KEY from your current environment\nand stores them in the provider. With Explicit Credentials Supply a credential value directly: $ openshell provider create --name my-api --type generic --credential API_KEY=sk-abc123\nBare Key Form Pass a key name without a value to read the value from the environment variable\nof that name: $ openshell provider create --name my-api --type generic --credential API_KEY\nThis looks up the current value of $API_KEY in your shell and stores it. Manage Providers List, inspect, update, and delete providers from the active cluster. List all providers: $ openshell provider list\nInspect a provider: $ openshell provider get my-claude\nUpdate a provider’s credentials: $ openshell provider update my-claude --type claude --from-existing\nDelete a provider: $ openshell provider delete my-claude\nAttach Providers to Sandboxes Pass one or more --provider flags when creating a sandbox: $ openshell sandbox create --provider my-claude --provider my-github -- claude\nEach --provider flag attaches one provider. The sandbox receives all\ncredentials from every attached provider at runtime. Providers cannot be added to a running sandbox. If you need to attach an\nadditional provider, delete the sandbox and recreate it with all required\nproviders specified. Auto-Discovery Shortcut When the trailing command in openshell sandbox create is a recognized tool name ( claude , codex , or opencode ), the CLI auto-creates the required\nprovider from your local credentials if one does not already exist. You do not\nneed to create the provider separately: $ openshell sandbox create -- claude\nThis detects claude as a known tool, finds your ANTHROPIC_API_KEY , creates\na provider, attaches it to the sandbox, and launches Claude Code. Supported Provider Types The following provider types are supported. Type Environment Variables Injected Typical Use claude ANTHROPIC_API_KEY , CLAUDE_API_KEY Claude Code, Anthropic API codex OPENAI_API_KEY OpenAI Codex opencode OPENCODE_API_KEY , OPENROUTER_API_KEY , OPENAI_API_KEY opencode tool github GITHUB_TOKEN , GH_TOKEN GitHub API, gh CLI — refer to /tutorials/github-sandbox gitlab GITLAB_TOKEN , GLAB_TOKEN , CI_JOB_TOKEN GitLab API, glab CLI nvidia NVIDIA_API_KEY NVIDIA API Catalog generic User-defined Any service with custom credentials outlook (none: no auto-discovery) Microsoft Outlook integration Use the generic type for any service not listed above. You define the\nenvironment variable names and values yourself with --credential . Next Steps Explore related topics: To control what the agent can access, refer to policies . To use a pre-built environment, refer to the community-sandboxes catalog. To view the complete field reference for the policy YAML, refer to the Policy Schema Reference","format":"text","content_length":3421,"word_count":502,"summary":"AI agents typically need credentials to access external services: an API key for the AI model provider, a token for GitHub or GitLab, and so on. OpenShell manages these credentials as first-class entities called providers.","headings":[{"text":"Providers","level":1,"id":"providers"},{"text":"Create a Provider","level":2,"id":"create-a-provider"},{"text":"From Local Credentials","level":3,"id":"from-local-credentials"},{"text":"With Explicit Credentials","level":3,"id":"with-explicit-credentials"},{"text":"Bare Key Form","level":3,"id":"bare-key-form"},{"text":"Manage Providers","level":2,"id":"manage-providers"},{"text":"Attach Providers to Sandboxes","level":2,"id":"attach-providers-to-sandboxes"},{"text":"Auto-Discovery Shortcut","level":3,"id":"auto-discovery-shortcut"},{"text":"Supported Provider Types","level":2,"id":"supported-provider-types"},{"text":"Next Steps","level":2,"id":"next-steps"}],"headings_text":"Providers Create a Provider From Local Credentials With Explicit Credentials Bare Key Form Manage Providers Attach Providers to Sandboxes Auto-Discovery Shortcut Supported Provider Types Next Steps","keywords":["anthropic","any","attach","auto","bare","catalog","claude","code","codex","create","credentials","delete","directly","discovery","each","environment","explicit","explore","form","from","github","gitlab","injected","inspect","key","list","local","manage","microsoft","name","next","none","openai","openshell","outlook","pass","policy","provider","providers","reference","sandbox","sandboxes","schema","separately","services","shortcut","steps","supply","supported","this"],"code_blocks":[{"content":"$ openshell provider create --name my-claude --type claude --from-existing","language":"text"},{"content":"$ openshell provider create --name my-api --type generic --credential API_KEY=sk-abc123","language":"text"},{"content":"$ openshell provider create --name my-api --type generic --credential API_KEY","language":"text"},{"content":"$ openshell provider list","language":"text"},{"content":"$ openshell provider get my-claude","language":"text"},{"content":"$ openshell provider update my-claude --type claude --from-existing","language":"text"},{"content":"$ openshell provider delete my-claude","language":"text"},{"content":"$ openshell sandbox create --provider my-claude --provider my-github -- claude","language":"text"},{"content":"$ openshell sandbox create -- claude","language":"text"}],"links":[],"images":[],"doc_type":"tutorial","section_path":["Sandboxes","Providers"]}]} \ No newline at end of file diff --git a/pr-preview/pr-270/sandboxes/policies.json b/pr-preview/pr-270/sandboxes/policies.json index 7f94e5c64..5b8784c2a 100644 --- a/pr-preview/pr-270/sandboxes/policies.json +++ b/pr-preview/pr-270/sandboxes/policies.json @@ -1 +1 @@ -{"id":"sandboxes/policies","title":"Customize Sandbox Policies","url":"sandboxes/policies.html","last_modified":"2026-03-13T02:26:28.101426+00:00","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"Apply, iterate, and debug sandbox network policies with hot-reload on running OpenShell sandboxes.","tags":["Policy","Network Policy","Sandbox","Security","Hot Reload"],"topics":["Generative AI","Cybersecurity"],"content_type":"how_to","learning_level":"technical_intermediate","audience":["engineer"],"content":"Customize Sandbox Policies Use this page to apply and iterate policy changes on running sandboxes. For a full field-by-field YAML definition, use the Policy Schema Reference . Quick Start: Apply a Custom Policy Pass a policy YAML file when creating the sandbox: $ openshell sandbox create --policy ./my-policy.yaml -- claude\nopenshell sandbox create keeps the sandbox running after the initial command exits, which is useful when you plan to iterate on the policy. Add --no-keep if you want the sandbox deleted automatically instead. To avoid passing --policy every time, set a default policy with an environment variable: $ export OPENSHELL_SANDBOX_POLICY=./my-policy.yaml\nopenshell sandbox create -- claude\nThe CLI uses the policy from OPENSHELL_SANDBOX_POLICY whenever --policy is not explicitly provided. Iterate on a Running Sandbox To change what the sandbox can access, pull the current policy, edit the YAML, and push the update. The workflow is iterative: create the sandbox, monitor logs for denied actions, pull the policy, modify it, push, and verify. The following steps outline the hot-reload policy update workflow. Create the sandbox with your initial policy by following Quick Start: Apply a Custom Policy above (or set OPENSHELL_SANDBOX_POLICY ). Monitor denials. Each log entry shows host, port, binary, and reason. Alternatively, use openshell term for a live dashboard. $ openshell logs --tail --source sandbox\nPull the current policy. Strip the metadata header (Version, Hash, Status) before reusing the file. $ openshell policy get --full > current-policy.yaml\nEdit the YAML: add or adjust network_policies entries, binaries, access or rules , or inference.allowed_routes . Push the updated policy. Exit codes: 0 = loaded, 1 = validation failed, 124 = timeout. $ openshell policy set --policy current-policy.yaml --wait\nVerify the new revision. If status is loaded , repeat from step 2 as needed; if failed , fix the policy and repeat from step 4. $ openshell policy list --tail --source sandbox for the denied host, path, and binary. When triaging denied requests, check: Destination host and port to confirm which endpoint is missing. Calling binary path to confirm which binaries entry needs to be added or adjusted. HTTP method and path (for REST endpoints) to confirm which rules entry needs to be added or adjusted. Then push the updated policy as described above. Examples Add these blocks to the network_policies section of your sandbox policy. Apply with openshell policy set --policy --wait\nUse Simple endpoint for host-level allowlists and Granular rules for method/path control. Simple endpoint Allow pip install and uv pip install to reach PyPI: pypi\nname: pypi\nendpoints\nhost: pypi.org\nport: 443\nhost: files.pythonhosted.org\nport: 443\nbinaries\n{ path: /usr/bin/pip\n{ path: /usr/local/bin/uv\nEndpoints without protocol or tls use TCP passthrough — the proxy allows the stream without inspecting payloads. Granular rules Allow Claude and the GitHub CLI to reach api.github.com with per-path rules: read-only (GET, HEAD, OPTIONS) and GraphQL (POST) for all paths; full write access for alpha-repo ; and create/edit issues only for bravo-repo . Replace with your GitHub org or username. For an end-to-end walkthrough that combines this policy with a GitHub credential provider and sandbox creation, refer to /tutorials/github-sandbox . github_repos\nname: github_repos\nendpoints\nhost: api.github.com\nport: 443\nprotocol: rest\ntls: terminate\nenforcement: enforce\nrules\nallow\nmethod: GET\npath:\nallow\nmethod: HEAD\npath:\nallow\nmethod: OPTIONS\npath:\nallow\nmethod: POST\npath: \"/graphql\nallow\nmethod:\npath: \"/repos//alpha-repo\nallow\nmethod: POST\npath: \"/repos//bravo-repo/issues\nallow\nmethod: PATCH\npath: \"/repos//bravo-repo/issues\nbinaries\n{ path: /usr/local/bin/claude\n{ path: /usr/bin/gh\nEndpoints with protocol: rest and tls: terminate enable HTTP request inspection — the proxy decrypts TLS and checks each HTTP request against the rules list. Next Steps Explore related topics: To learn about policy structure and network access rules, refer to index . To view the full field-by-field YAML definition, refer to the Policy Schema Reference . To review the default policy breakdown, refer to ../reference/default-policy","format":"text","summary":"Use this page to apply and iterate policy changes on running sandboxes. For a full field-by-field YAML definition, use the Policy Schema Reference.","headings":[{"text":"Customize Sandbox Policies","level":1},{"text":"Quick Start: Apply a Custom Policy","level":2},{"text":"Iterate on a Running Sandbox","level":2},{"text":"Debug Denied Requests","level":2},{"text":"Examples","level":2},{"text":"Next Steps","level":2}]} \ No newline at end of file +{"id":"sandboxes/policies","title":"Customize Sandbox Policies","url":"sandboxes/policies.html","last_modified":"2026-03-13T02:30:39.443359+00:00","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"Apply, iterate, and debug sandbox network policies with hot-reload on running OpenShell sandboxes.","tags":["Policy","Network Policy","Sandbox","Security","Hot Reload"],"topics":["Generative AI","Cybersecurity"],"content_type":"how_to","learning_level":"technical_intermediate","audience":["engineer"],"content":"Customize Sandbox Policies Use this page to apply and iterate policy changes on running sandboxes. For a full field-by-field YAML definition, use the Policy Schema Reference . Quick Start: Apply a Custom Policy Pass a policy YAML file when creating the sandbox: $ openshell sandbox create --policy ./my-policy.yaml -- claude\nopenshell sandbox create keeps the sandbox running after the initial command exits, which is useful when you plan to iterate on the policy. Add --no-keep if you want the sandbox deleted automatically instead. To avoid passing --policy every time, set a default policy with an environment variable: $ export OPENSHELL_SANDBOX_POLICY=./my-policy.yaml\nopenshell sandbox create -- claude\nThe CLI uses the policy from OPENSHELL_SANDBOX_POLICY whenever --policy is not explicitly provided. Iterate on a Running Sandbox To change what the sandbox can access, pull the current policy, edit the YAML, and push the update. The workflow is iterative: create the sandbox, monitor logs for denied actions, pull the policy, modify it, push, and verify. The following steps outline the hot-reload policy update workflow. Create the sandbox with your initial policy by following Quick Start: Apply a Custom Policy above (or set OPENSHELL_SANDBOX_POLICY ). Monitor denials. Each log entry shows host, port, binary, and reason. Alternatively, use openshell term for a live dashboard. $ openshell logs --tail --source sandbox\nPull the current policy. Strip the metadata header (Version, Hash, Status) before reusing the file. $ openshell policy get --full > current-policy.yaml\nEdit the YAML: add or adjust network_policies entries, binaries, access or rules , or inference.allowed_routes . Push the updated policy. Exit codes: 0 = loaded, 1 = validation failed, 124 = timeout. $ openshell policy set --policy current-policy.yaml --wait\nVerify the new revision. If status is loaded , repeat from step 2 as needed; if failed , fix the policy and repeat from step 4. $ openshell policy list --tail --source sandbox for the denied host, path, and binary. When triaging denied requests, check: Destination host and port to confirm which endpoint is missing. Calling binary path to confirm which binaries entry needs to be added or adjusted. HTTP method and path (for REST endpoints) to confirm which rules entry needs to be added or adjusted. Then push the updated policy as described above. Examples Add these blocks to the network_policies section of your sandbox policy. Apply with openshell policy set --policy --wait\nUse Simple endpoint for host-level allowlists and Granular rules for method/path control. Simple endpoint Allow pip install and uv pip install to reach PyPI: pypi\nname: pypi\nendpoints\nhost: pypi.org\nport: 443\nhost: files.pythonhosted.org\nport: 443\nbinaries\n{ path: /usr/bin/pip\n{ path: /usr/local/bin/uv\nEndpoints without protocol or tls use TCP passthrough — the proxy allows the stream without inspecting payloads. Granular rules Allow Claude and the GitHub CLI to reach api.github.com with per-path rules: read-only (GET, HEAD, OPTIONS) and GraphQL (POST) for all paths; full write access for alpha-repo ; and create/edit issues only for bravo-repo . Replace with your GitHub org or username. For an end-to-end walkthrough that combines this policy with a GitHub credential provider and sandbox creation, refer to /tutorials/github-sandbox . github_repos\nname: github_repos\nendpoints\nhost: api.github.com\nport: 443\nprotocol: rest\ntls: terminate\nenforcement: enforce\nrules\nallow\nmethod: GET\npath:\nallow\nmethod: HEAD\npath:\nallow\nmethod: OPTIONS\npath:\nallow\nmethod: POST\npath: \"/graphql\nallow\nmethod:\npath: \"/repos//alpha-repo\nallow\nmethod: POST\npath: \"/repos//bravo-repo/issues\nallow\nmethod: PATCH\npath: \"/repos//bravo-repo/issues\nbinaries\n{ path: /usr/local/bin/claude\n{ path: /usr/bin/gh\nEndpoints with protocol: rest and tls: terminate enable HTTP request inspection — the proxy decrypts TLS and checks each HTTP request against the rules list. Next Steps Explore related topics: To learn about policy structure and network access rules, refer to index . To view the full field-by-field YAML definition, refer to the Policy Schema Reference . To review the default policy breakdown, refer to ../reference/default-policy","format":"text","summary":"Use this page to apply and iterate policy changes on running sandboxes. For a full field-by-field YAML definition, use the Policy Schema Reference.","headings":[{"text":"Customize Sandbox Policies","level":1},{"text":"Quick Start: Apply a Custom Policy","level":2},{"text":"Iterate on a Running Sandbox","level":2},{"text":"Debug Denied Requests","level":2},{"text":"Examples","level":2},{"text":"Next Steps","level":2}]} \ No newline at end of file diff --git a/pr-preview/pr-270/sandboxes/providers.json b/pr-preview/pr-270/sandboxes/providers.json index 2cc2fb3ec..48837a8f1 100644 --- a/pr-preview/pr-270/sandboxes/providers.json +++ b/pr-preview/pr-270/sandboxes/providers.json @@ -1 +1 @@ -{"id":"sandboxes/providers","title":"Providers","url":"sandboxes/providers.html","last_modified":"2026-03-13T02:26:28.106904+00:00","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"Create and manage credential providers that inject API keys and tokens into OpenShell sandboxes.","tags":["Providers","Credentials","API Keys","Sandbox","Security"],"topics":["Generative AI","Cybersecurity"],"content_type":"how_to","learning_level":"technical_beginner","audience":["engineer","data_scientist"],"content":"Providers AI agents typically need credentials to access external services: an API key for the AI model provider, a token for GitHub or GitLab, and so on. OpenShell manages these credentials as first-class entities called providers . Create and manage providers that supply credentials to sandboxes. Create a Provider Providers can be created from local environment variables or with explicit credential values. From Local Credentials The fastest way to create a provider is to let the CLI discover credentials from\nyour shell environment: $ openshell provider create --name my-claude --type claude --from-existing\nThis reads ANTHROPIC_API_KEY or CLAUDE_API_KEY from your current environment\nand stores them in the provider. With Explicit Credentials Supply a credential value directly: $ openshell provider create --name my-api --type generic --credential API_KEY=sk-abc123\nBare Key Form Pass a key name without a value to read the value from the environment variable\nof that name: $ openshell provider create --name my-api --type generic --credential API_KEY\nThis looks up the current value of $API_KEY in your shell and stores it. Manage Providers List, inspect, update, and delete providers from the active cluster. List all providers: $ openshell provider list\nInspect a provider: $ openshell provider get my-claude\nUpdate a provider’s credentials: $ openshell provider update my-claude --type claude --from-existing\nDelete a provider: $ openshell provider delete my-claude\nAttach Providers to Sandboxes Pass one or more --provider flags when creating a sandbox: $ openshell sandbox create --provider my-claude --provider my-github -- claude\nEach --provider flag attaches one provider. The sandbox receives all\ncredentials from every attached provider at runtime. Providers cannot be added to a running sandbox. If you need to attach an\nadditional provider, delete the sandbox and recreate it with all required\nproviders specified. Auto-Discovery Shortcut When the trailing command in openshell sandbox create is a recognized tool name ( claude , codex , or opencode ), the CLI auto-creates the required\nprovider from your local credentials if one does not already exist. You do not\nneed to create the provider separately: $ openshell sandbox create -- claude\nThis detects claude as a known tool, finds your ANTHROPIC_API_KEY , creates\na provider, attaches it to the sandbox, and launches Claude Code. Supported Provider Types The following provider types are supported. Type Environment Variables Injected Typical Use claude ANTHROPIC_API_KEY , CLAUDE_API_KEY Claude Code, Anthropic API codex OPENAI_API_KEY OpenAI Codex opencode OPENCODE_API_KEY , OPENROUTER_API_KEY , OPENAI_API_KEY opencode tool github GITHUB_TOKEN , GH_TOKEN GitHub API, gh CLI — refer to /tutorials/github-sandbox gitlab GITLAB_TOKEN , GLAB_TOKEN , CI_JOB_TOKEN GitLab API, glab CLI nvidia NVIDIA_API_KEY NVIDIA API Catalog generic User-defined Any service with custom credentials outlook (none: no auto-discovery) Microsoft Outlook integration Use the generic type for any service not listed above. You define the\nenvironment variable names and values yourself with --credential . Next Steps Explore related topics: To control what the agent can access, refer to policies . To use a pre-built environment, refer to the community-sandboxes catalog. To view the complete field reference for the policy YAML, refer to the Policy Schema Reference","format":"text","summary":"AI agents typically need credentials to access external services: an API key for the AI model provider, a token for GitHub or GitLab, and so on. OpenShell manages these credentials as first-class entities called providers.","headings":[{"text":"Providers","level":1},{"text":"Create a Provider","level":2},{"text":"From Local Credentials","level":3},{"text":"With Explicit Credentials","level":3},{"text":"Bare Key Form","level":3},{"text":"Manage Providers","level":2},{"text":"Attach Providers to Sandboxes","level":2},{"text":"Auto-Discovery Shortcut","level":3},{"text":"Supported Provider Types","level":2},{"text":"Next Steps","level":2}]} \ No newline at end of file +{"id":"sandboxes/providers","title":"Providers","url":"sandboxes/providers.html","last_modified":"2026-03-13T02:30:39.474131+00:00","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"Create and manage credential providers that inject API keys and tokens into OpenShell sandboxes.","tags":["Providers","Credentials","API Keys","Sandbox","Security"],"topics":["Generative AI","Cybersecurity"],"content_type":"how_to","learning_level":"technical_beginner","audience":["engineer","data_scientist"],"content":"Providers AI agents typically need credentials to access external services: an API key for the AI model provider, a token for GitHub or GitLab, and so on. OpenShell manages these credentials as first-class entities called providers . Create and manage providers that supply credentials to sandboxes. Create a Provider Providers can be created from local environment variables or with explicit credential values. From Local Credentials The fastest way to create a provider is to let the CLI discover credentials from\nyour shell environment: $ openshell provider create --name my-claude --type claude --from-existing\nThis reads ANTHROPIC_API_KEY or CLAUDE_API_KEY from your current environment\nand stores them in the provider. With Explicit Credentials Supply a credential value directly: $ openshell provider create --name my-api --type generic --credential API_KEY=sk-abc123\nBare Key Form Pass a key name without a value to read the value from the environment variable\nof that name: $ openshell provider create --name my-api --type generic --credential API_KEY\nThis looks up the current value of $API_KEY in your shell and stores it. Manage Providers List, inspect, update, and delete providers from the active cluster. List all providers: $ openshell provider list\nInspect a provider: $ openshell provider get my-claude\nUpdate a provider’s credentials: $ openshell provider update my-claude --type claude --from-existing\nDelete a provider: $ openshell provider delete my-claude\nAttach Providers to Sandboxes Pass one or more --provider flags when creating a sandbox: $ openshell sandbox create --provider my-claude --provider my-github -- claude\nEach --provider flag attaches one provider. The sandbox receives all\ncredentials from every attached provider at runtime. Providers cannot be added to a running sandbox. If you need to attach an\nadditional provider, delete the sandbox and recreate it with all required\nproviders specified. Auto-Discovery Shortcut When the trailing command in openshell sandbox create is a recognized tool name ( claude , codex , or opencode ), the CLI auto-creates the required\nprovider from your local credentials if one does not already exist. You do not\nneed to create the provider separately: $ openshell sandbox create -- claude\nThis detects claude as a known tool, finds your ANTHROPIC_API_KEY , creates\na provider, attaches it to the sandbox, and launches Claude Code. Supported Provider Types The following provider types are supported. Type Environment Variables Injected Typical Use claude ANTHROPIC_API_KEY , CLAUDE_API_KEY Claude Code, Anthropic API codex OPENAI_API_KEY OpenAI Codex opencode OPENCODE_API_KEY , OPENROUTER_API_KEY , OPENAI_API_KEY opencode tool github GITHUB_TOKEN , GH_TOKEN GitHub API, gh CLI — refer to /tutorials/github-sandbox gitlab GITLAB_TOKEN , GLAB_TOKEN , CI_JOB_TOKEN GitLab API, glab CLI nvidia NVIDIA_API_KEY NVIDIA API Catalog generic User-defined Any service with custom credentials outlook (none: no auto-discovery) Microsoft Outlook integration Use the generic type for any service not listed above. You define the\nenvironment variable names and values yourself with --credential . Next Steps Explore related topics: To control what the agent can access, refer to policies . To use a pre-built environment, refer to the community-sandboxes catalog. To view the complete field reference for the policy YAML, refer to the Policy Schema Reference","format":"text","summary":"AI agents typically need credentials to access external services: an API key for the AI model provider, a token for GitHub or GitLab, and so on. OpenShell manages these credentials as first-class entities called providers.","headings":[{"text":"Providers","level":1},{"text":"Create a Provider","level":2},{"text":"From Local Credentials","level":3},{"text":"With Explicit Credentials","level":3},{"text":"Bare Key Form","level":3},{"text":"Manage Providers","level":2},{"text":"Attach Providers to Sandboxes","level":2},{"text":"Auto-Discovery Shortcut","level":3},{"text":"Supported Provider Types","level":2},{"text":"Next Steps","level":2}]} \ No newline at end of file diff --git a/pr-preview/pr-270/tutorials/github-sandbox.json b/pr-preview/pr-270/tutorials/github-sandbox.json index ed9455f75..32176522e 100644 --- a/pr-preview/pr-270/tutorials/github-sandbox.json +++ b/pr-preview/pr-270/tutorials/github-sandbox.json @@ -1 +1 @@ -{"id":"tutorials/github-sandbox","title":"Set Up a Sandbox of Claude Code with a Custom GitHub Policy","url":"tutorials/github-sandbox.html","last_modified":"2026-03-13T02:26:28.133778+00:00","book":{"title":"NVIDIA OpenShell Developer Guide","version":"0.1.0"},"product":{"name":"OpenShell","version":"0.1.0"},"description":"Learn the iterative policy workflow by launching a sandbox, diagnosing a GitHub access denial, and applying a custom policy to fix it.","tags":["Tutorial","GitHub","Sandbox","Policy","Claude Code"],"topics":["Generative AI","Cybersecurity"],"content_type":"tutorial","learning_level":"technical_intermediate","audience":["engineer"],"content":"Set Up a Sandbox of Claude Code with a Custom GitHub Policy This tutorial walks through an iterative sandbox policy workflow. You launch a sandbox, ask Claude Code to push code to GitHub, and observe the default network policy denying the request\nYou then diagnose the denial from your machine and from inside the sandbox, apply a policy update, and verify that the policy update to the sandbox takes effect. After completing this tutorial, you will have: A running sandbox with Claude Code that can push to a GitHub repository. A custom network policy that grants GitHub access for a specific repository. Experience with the policy iteration workflow: fail, diagnose, update, verify. This tutorial shows example prompts and responses from Claude Code. The exact wording you see might vary between sessions. Use the examples as a guide for the type of interaction, not as expected output. Prerequisites This tutorial requires the following: A working OpenShell installation. Complete the Quickstart before proceeding. A GitHub personal access token (PAT) with repo scope. Generate one from the GitHub personal access token settings page by selecting Generate new token (classic) and enabling the repo scope. An Anthropic account with access to Claude Code. OpenShell provides the sandbox runtime, not the agent. You must authenticate with your own account. A GitHub repository you own to use as the push target. A scratch repository is sufficient. You can create one with a README if needed. This tutorial uses two terminals to demonstrate the iterative policy workflow: Terminal 1 : The sandbox terminal. You create the sandbox in this terminal by running openshell sandbox create and interact with Claude Code inside it. Terminal 2 : A terminal outside the sandbox on your machine. You use this terminal for viewing the sandbox logs with openshell term and applying an updated policy with openshell policy set . Each section below indicates which terminal to use. Set Up a Sandbox with Your GitHub Token Depending on whether you start a new sandbox or use an existing sandbox, choose the appropriate tab and follow the instructions. Starting a new sandbox In terminal 2, create a new sandbox with Claude Code. The default policy is applied automatically, which allows read-only access to GitHub. Create a credential provider that injects your GitHub token into the sandbox automatically. The provider reads GITHUB_TOKEN from your host environment and sets it as an environment variable inside the sandbox: $ GITHUB_TOKEN= with your GitHub organization or username and with your repository name. Prompt Write a hello_world.py script and push it to https://github.com// . Claude recognizes that it needs GitHub credentials. It asks how you want to authenticate. Provide your GitHub personal access token by pasting it into the conversation. Claude configures authentication and attempts the push. The push fails. Claude reports an error, but the failure is not an authentication problem. The default sandbox policy permits read-only access to GitHub and blocks write operations, so the proxy denies the push before the request reaches the GitHub server. Diagnose the Denial In this section, you diagnose the denial from your machine and from inside the sandbox. View the Logs from Your Machine In terminal 2, launch the OpenShell terminal: $ openshell term\nThe dashboard shows sandbox status and a live stream of policy decisions. Look for entries with l7_decision=deny . Select a deny entry to see the full detail: l7_action: PUT\nl7_target: /repos///contents/hello_world.py\nl7_decision: deny\ndst_host: api.github.com\ndst_port: 443\nl7_protocol: rest\npolicy: github_rest_api\nl7_deny_reason: PUT /repos///contents/hello_world.py not permitted by policy\nThe log shows that the sandbox proxy intercepted an outbound PUT request to api.github.com and denied it. The github_rest_api policy allows read operations (GET) but blocks write operations (PUT, POST, DELETE) to the GitHub API. A similar denial appears for github.com if Claude attempted a git push over HTTPS. Ask Claude Code to Check the Sandbox Logs In terminal 1, ask Claude Code to check the sandbox logs for denied requests: Prompt Check the sandbox logs for any denied network requests. What is blocking the push? Claude reads the deny entries and identifies the root cause. It explains that the failure is a sandbox network policy restriction, not a token permissions issue. For example, the following is a possible response: Response The sandbox runs a proxy that enforces policies on outbound traffic\nThe github_rest_api policy allows GET requests (used to read the file\nbut blocks PUT/write requests to GitHub. This is a sandbox-level restriction\nnot a token issue. No matter what token you provide, pushes through the API\nwill be blocked until the policy is updated. Both perspectives confirm the same thing: the proxy is doing its job. The default policy is designed to be restrictive. To allow GitHub pushes, you need to update the network policy. Copy the deny reason from Claude’s response. You paste it into an agent running on your machine in the next step. Update the Policy from Your Machine In terminal 2, paste the deny reason from the previous step into your coding agent on your machine, such as Claude Code or Cursor, and ask it to recommend a policy update. The deny reason gives the agent the context it needs to generate the correct policy rules. After pasting the following prompt sample, properly provide the GitHub organization and repository names of the repository you are pushing to. Prompt Based on the following deny reasons, recommend a sandbox policy update that allows GitHub pushes to https://github.com// , and save to /tmp/sandbox-policy-update.yaml : The filesystem_policy , landlock , and process sections are static. They are read once at sandbox creation and cannot be changed by a hot-reload. They are included here for completeness so the file is self-contained, but only the network_policies section takes effect when you apply this to a running sandbox. The following steps outline the expected process done by the agent: Inspects the deny reasons. Writes an updated policy that adds github_git and github_api blocks that grant write access to your repository. Saves the policy to /tmp/sandbox-policy-update.yaml . Review the Generated Policy Refer to the following policy example to compare with the generated policy before applying it. Confirm that the policy grants only the access you expect. In this case, git push operations and GitHub REST API access scoped to a single repository. Full reference policy The following YAML shows a complete policy that extends the default policy with GitHub access for a single repository. Replace with your GitHub organization or username and with your repository name. The filesystem_policy , landlock , and process sections are static. They are read once at sandbox creation and cannot be changed by a hot-reload. They are included here for completeness so the file is self-contained, but only the network_policies section takes effect when you apply this to a running sandbox. version: 1\n── Static (locked at sandbox creation)\nfilesystem_policy\ninclude_workdir: true\nread_only\n/usr\n/lib\n/proc\n/dev/urandom\n/app\n/etc\n/var/log\nread_write\n/sandbox\n/tmp\n/dev/null\nlandlock\ncompatibility: best_effort\nprocess\nrun_as_user: sandbox\nrun_as_group: sandbox\n── Dynamic (hot-reloadable)\nnetwork_policies\nClaude Code ↔ Anthropic API\nclaude_code\nname: claude-code\nendpoints\n{ host: api.anthropic.com, port: 443, protocol: rest, enforcement: enforce, access: full, tls: terminate\n{ host: statsig.anthropic.com, port: 443\n{ host: sentry.io, port: 443\n{ host: raw.githubusercontent.com, port: 443\n{ host: platform.claude.com, port: 443\nbinaries\n{ path: /usr/local/bin/claude\n{ path: /usr/bin/node\nNVIDIA inference endpoint\nnvidia_inference\nname: nvidia-inference\nendpoints\n{ host: integrate.api.nvidia.com, port: 443\nbinaries\n{ path: /usr/bin/curl\n{ path: /bin/bash\n{ path: /usr/local/bin/opencode\n── GitHub: git operations (clone, fetch, push)\ngithub_git\nname: github-git\nendpoints\nhost: github.com\nport: 443\nprotocol: rest\ntls: terminate\nenforcement: enforce\nrules\nallow\nmethod: GET\npath: \"//.git/info/refs\nallow\nmethod: POST\npath: \"//.git/git-upload-pack\nallow\nmethod: POST\npath: \"//.git/git-receive-pack\nbinaries\n{ path: /usr/bin/git\n── GitHub: REST API\ngithub_api\nname: github-api\nendpoints\nhost: api.github.com\nport: 443\nprotocol: rest\ntls: terminate\nenforcement: enforce\nrules\nGraphQL API (used by gh CLI\nallow\nmethod: POST\npath: \"/graphql\nFull read-write access to the repository\nallow\nmethod:\npath: \"/repos// --policy /tmp/sandbox-policy-update.yaml --wait\nNetwork policies are hot-reloadable. The --wait flag blocks until the policy engine confirms the new revision loaded, and the update takes effect immediately without restarting the sandbox or reconnecting Claude Code. Retry the Push In terminal 1, ask Claude Code to retry the push: The sandbox policy has been updated. Try pushing to the repository again\nThe push completes successfully. The openshell term dashboard now shows l7_decision=allow entries for api.github.com and github.com where it previously showed denials. Clean Up When you are finished, delete the sandbox to free cluster resources: $ openshell sandbox delete with your GitHub organization or username and with your repository name. Prompt Write a hello_world.py script and push it to https://github.com// . Claude recognizes that it needs GitHub credentials. It asks how you want to authenticate. Provide your GitHub personal access token by pasting it into the conversation. Claude configures authentication and attempts the push. The push fails. Claude reports an error, but the failure is not an authentication problem. The default sandbox policy permits read-only access to GitHub and blocks write operations, so the proxy denies the push before the request reaches the GitHub server. Diagnose the Denial In this section, you diagnose the denial from your machine and from inside the sandbox. View the Logs from Your Machine In terminal 2, launch the OpenShell terminal: $ openshell term\nThe dashboard shows sandbox status and a live stream of policy decisions. Look for entries with l7_decision=deny . Select a deny entry to see the full detail: l7_action: PUT\nl7_target: /repos///contents/hello_world.py\nl7_decision: deny\ndst_host: api.github.com\ndst_port: 443\nl7_protocol: rest\npolicy: github_rest_api\nl7_deny_reason: PUT /repos///contents/hello_world.py not permitted by policy\nThe log shows that the sandbox proxy intercepted an outbound PUT request to api.github.com and denied it. The github_rest_api policy allows read operations (GET) but blocks write operations (PUT, POST, DELETE) to the GitHub API. A similar denial appears for github.com if Claude attempted a git push over HTTPS. Ask Claude Code to Check the Sandbox Logs In terminal 1, ask Claude Code to check the sandbox logs for denied requests: Prompt Check the sandbox logs for any denied network requests. What is blocking the push? Claude reads the deny entries and identifies the root cause. It explains that the failure is a sandbox network policy restriction, not a token permissions issue. For example, the following is a possible response: Response The sandbox runs a proxy that enforces policies on outbound traffic\nThe github_rest_api policy allows GET requests (used to read the file\nbut blocks PUT/write requests to GitHub. This is a sandbox-level restriction\nnot a token issue. No matter what token you provide, pushes through the API\nwill be blocked until the policy is updated. Both perspectives confirm the same thing: the proxy is doing its job. The default policy is designed to be restrictive. To allow GitHub pushes, you need to update the network policy. Copy the deny reason from Claude’s response. You paste it into an agent running on your machine in the next step. Update the Policy from Your Machine In terminal 2, paste the deny reason from the previous step into your coding agent on your machine, such as Claude Code or Cursor, and ask it to recommend a policy update. The deny reason gives the agent the context it needs to generate the correct policy rules. After pasting the following prompt sample, properly provide the GitHub organization and repository names of the repository you are pushing to. Prompt Based on the following deny reasons, recommend a sandbox policy update that allows GitHub pushes to https://github.com// , and save to /tmp/sandbox-policy-update.yaml : The filesystem_policy , landlock , and process sections are static. They are read once at sandbox creation and cannot be changed by a hot-reload. They are included here for completeness so the file is self-contained, but only the network_policies section takes effect when you apply this to a running sandbox. The following steps outline the expected process done by the agent: Inspects the deny reasons. Writes an updated policy that adds github_git and github_api blocks that grant write access to your repository. Saves the policy to /tmp/sandbox-policy-update.yaml . Review the Generated Policy Refer to the following policy example to compare with the generated policy before applying it. Confirm that the policy grants only the access you expect. In this case, git push operations and GitHub REST API access scoped to a single repository. Full reference policy The following YAML shows a complete policy that extends the default policy with GitHub access for a single repository. Replace with your GitHub organization or username and with your repository name. The filesystem_policy , landlock , and process sections are static. They are read once at sandbox creation and cannot be changed by a hot-reload. They are included here for completeness so the file is self-contained, but only the network_policies section takes effect when you apply this to a running sandbox. version: 1\n── Static (locked at sandbox creation)\nfilesystem_policy\ninclude_workdir: true\nread_only\n/usr\n/lib\n/proc\n/dev/urandom\n/app\n/etc\n/var/log\nread_write\n/sandbox\n/tmp\n/dev/null\nlandlock\ncompatibility: best_effort\nprocess\nrun_as_user: sandbox\nrun_as_group: sandbox\n── Dynamic (hot-reloadable)\nnetwork_policies\nClaude Code ↔ Anthropic API\nclaude_code\nname: claude-code\nendpoints\n{ host: api.anthropic.com, port: 443, protocol: rest, enforcement: enforce, access: full, tls: terminate\n{ host: statsig.anthropic.com, port: 443\n{ host: sentry.io, port: 443\n{ host: raw.githubusercontent.com, port: 443\n{ host: platform.claude.com, port: 443\nbinaries\n{ path: /usr/local/bin/claude\n{ path: /usr/bin/node\nNVIDIA inference endpoint\nnvidia_inference\nname: nvidia-inference\nendpoints\n{ host: integrate.api.nvidia.com, port: 443\nbinaries\n{ path: /usr/bin/curl\n{ path: /bin/bash\n{ path: /usr/local/bin/opencode\n── GitHub: git operations (clone, fetch, push)\ngithub_git\nname: github-git\nendpoints\nhost: github.com\nport: 443\nprotocol: rest\ntls: terminate\nenforcement: enforce\nrules\nallow\nmethod: GET\npath: \"//.git/info/refs\nallow\nmethod: POST\npath: \"//.git/git-upload-pack\nallow\nmethod: POST\npath: \"//.git/git-receive-pack\nbinaries\n{ path: /usr/bin/git\n── GitHub: REST API\ngithub_api\nname: github-api\nendpoints\nhost: api.github.com\nport: 443\nprotocol: rest\ntls: terminate\nenforcement: enforce\nrules\nGraphQL API (used by gh CLI\nallow\nmethod: POST\npath: \"/graphql\nFull read-write access to the repository\nallow\nmethod:\npath: \"/repos// --policy /tmp/sandbox-policy-update.yaml --wait\nNetwork policies are hot-reloadable. The --wait flag blocks until the policy engine confirms the new revision loaded, and the update takes effect immediately without restarting the sandbox or reconnecting Claude Code. Retry the Push In terminal 1, ask Claude Code to retry the push: The sandbox policy has been updated. Try pushing to the repository again\nThe push completes successfully. The openshell term dashboard now shows l7_decision=allow entries for api.github.com and github.com where it previously showed denials. Clean Up When you are finished, delete the sandbox to free cluster resources: $ openshell sandbox delete