Files
OpenShell/docs/get-started/quickstart.md
2026-03-10 18:04:25 -07:00

154 lines
4.0 KiB
Markdown

---
title:
page: Quickstart
nav: Quickstart
description: Install the OpenShell CLI and create your first sandboxed AI agent in two commands.
topics:
- Generative AI
- Cybersecurity
tags:
- AI Agents
- Sandboxing
- Installation
- Quickstart
content:
type: get_started
difficulty: technical_beginner
audience:
- engineer
- data_scientist
---
<!--
SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0
-->
# 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](https://docs.astral.sh/uv/) installed
- Docker Desktop running on your machine
## Install the OpenShell CLI
Install the `openshell` package into a virtual environment.
Activate your virtual environment:
```bash
uv venv && source .venv/bin/activate
```
Install the CLI:
```bash
uv pip install openshell
```
## Connect 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.
:::::{tab-set}
::::{tab-item} Brev
:::{note}
Deploy an OpenShell gateway on Brev by hitting **Deploy** on the [OpenShell Launchable](https://brev.nvidia.com/launchable/deploy/now?launchableID=env-3AaK9NmCzWp3pVyUDNNFBt805FT).
:::
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.
```console
$ openshell gateway add https://<your-port-8080-url>.brevlab.com
$ openshell status
```
::::
::::{tab-item} DGX Spark
:::{note}
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:
```console
$ openshell gateway start --remote <username>@<spark-ssid>.local
$ openshell status
```
After `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:
::::{tab-set}
:::{tab-item} Claude Code
Run the following command to create a sandbox with Claude Code:
```console
$ openshell sandbox create -- claude
```
The 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.
:::
:::{tab-item} OpenCode
Run the following command to create a sandbox with OpenCode:
```console
$ openshell sandbox create -- opencode
```
The 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.
:::
:::{tab-item} Codex
Run the following command to create a sandbox with Codex:
```console
$ openshell sandbox create -- codex
```
The 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.
:::
:::{tab-item} OpenClaw
Run the following command to create a sandbox with OpenClaw:
```console
$ openshell sandbox create --from openclaw
```
The `--from` flag pulls a pre-built sandbox definition from the [OpenShell Community](https://github.com/NVIDIA/OpenShell-Community) catalog. Each definition bundles a container image, a tailored policy, and optional skills into a single package.
:::
:::{tab-item} Community Sandbox
You can use the `--from` flag to pull other OpenShell sandbox images from the [NVIDIA Container Registry](https://registry.nvidia.com/). For example, to pull the `base` image, run the following command:
```console
$ openshell sandbox create --from base
```
:::