Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions content/manuals/ai/sandboxes/agents/claude-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ Claude Code requires either an Anthropic API key or a Claude subscription.
$ sbx secret set -g anthropic
```

Alternatively, export the `ANTHROPIC_API_KEY` environment variable in your
shell before running the sandbox. See
[Credentials](../security/credentials.md) for details on both methods.
You can also source the key from the `ANTHROPIC_API_KEY` environment variable
through a [credential binding](../security/credentials.md#credential-bindings);
the sandbox prompts you to approve one on first run. See
[Credentials](../security/credentials.md) for details.

**Claude subscription**: If no API key is set, Claude Code prompts you to
authenticate interactively using OAuth. The proxy handles the OAuth flow, so
Expand Down
5 changes: 3 additions & 2 deletions content/manuals/ai/sandboxes/agents/codex.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ so browser-based authentication works without any extra setup.
$ sbx secret set -g openai
```

Alternatively, export the `OPENAI_API_KEY` environment variable in your shell
before running the sandbox.
You can also source the key from the `OPENAI_API_KEY` environment variable
through a [credential binding](../security/credentials.md#credential-bindings);
the sandbox prompts you to approve one on first run.

See [Credentials](../security/credentials.md) for more details.

Expand Down
8 changes: 5 additions & 3 deletions content/manuals/ai/sandboxes/agents/copilot.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@ Copilot requires a GitHub token with Copilot access. Store your token using
$ echo "$(gh auth token)" | sbx secret set -g github
```

Alternatively, export the `GH_TOKEN` or `GITHUB_TOKEN` environment variable in
your shell before running the sandbox. See
[Credentials](../security/credentials.md) for details on both methods.
You can also source the token from the `GH_TOKEN` or `GITHUB_TOKEN` environment
variable through a
[credential binding](../security/credentials.md#credential-bindings); the
sandbox prompts you to approve one on first run. See
[Credentials](../security/credentials.md) for details.

## Configuration

Expand Down
7 changes: 4 additions & 3 deletions content/manuals/ai/sandboxes/agents/cursor.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ Cursor supports two authentication methods: an API key or OAuth.
$ sbx secret set -g cursor
```

Alternatively, export the `CURSOR_API_KEY` environment variable in your shell
before running the sandbox. See
[Credentials](../security/credentials.md) for details on both methods.
You can also source the key from the `CURSOR_API_KEY` environment variable
through a [credential binding](../security/credentials.md#credential-bindings);
the sandbox prompts you to approve one on first run. See
[Credentials](../security/credentials.md) for details.

**OAuth**: If no API key is set, Cursor prompts you to sign in interactively
on first run. The proxy intercepts the token exchange with
Expand Down
9 changes: 5 additions & 4 deletions content/manuals/ai/sandboxes/agents/docker-agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ $ sbx secret set -g openrouter
You only need to configure the providers you want to use. Docker Agent detects
available credentials and routes requests to the appropriate provider.

Alternatively, export the environment variables (`OPENAI_API_KEY`,
You can also source these from environment variables (`OPENAI_API_KEY`,
`ANTHROPIC_API_KEY`, `GOOGLE_API_KEY`, `XAI_API_KEY`, `NEBIUS_API_KEY`,
`MISTRAL_API_KEY`, `OPENROUTER_API_KEY`) in your shell before running the
sandbox. See
[Credentials](../security/credentials.md) for details on both methods.
`MISTRAL_API_KEY`, `OPENROUTER_API_KEY`) through
[credential bindings](../security/credentials.md#credential-bindings); the
sandbox prompts you to approve one per provider on first run. See
[Credentials](../security/credentials.md) for details.

## Configuration

Expand Down
7 changes: 4 additions & 3 deletions content/manuals/ai/sandboxes/agents/droid.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ your Factory account.
$ sbx secret set -g droid
```

Alternatively, export the `FACTORY_API_KEY` environment variable in your shell
before running the sandbox. See
[Credentials](../security/credentials.md) for details on both methods.
You can also source the key from the `FACTORY_API_KEY` environment variable
through a [credential binding](../security/credentials.md#credential-bindings);
the sandbox prompts you to approve one on first run. See
[Credentials](../security/credentials.md) for details.

**OAuth**: If no API key is set, Droid prompts you to authenticate
interactively on first run. The proxy handles the OAuth flow, so credentials
Expand Down
8 changes: 5 additions & 3 deletions content/manuals/ai/sandboxes/agents/gemini.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ Gemini requires either a Google API key or a Google account with Gemini access.
$ sbx secret set -g google
```

Alternatively, export the `GEMINI_API_KEY` or `GOOGLE_API_KEY` environment
variable in your shell before running the sandbox. See
[Credentials](../security/credentials.md) for details on both methods.
You can also source the key from the `GEMINI_API_KEY` or `GOOGLE_API_KEY`
environment variable through a
[credential binding](../security/credentials.md#credential-bindings); the
sandbox prompts you to approve one on first run. See
[Credentials](../security/credentials.md) for details.

**Google account**: If no API key is set, Gemini prompts you to sign in
interactively when it starts. Interactive authentication is scoped to the
Expand Down
10 changes: 6 additions & 4 deletions content/manuals/ai/sandboxes/agents/opencode.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,12 @@ $ sbx secret set -g openrouter
You only need to configure the providers you want to use. OpenCode detects
available credentials and offers those providers in the TUI.

You can also use environment variables (`OPENAI_API_KEY`, `ANTHROPIC_API_KEY`,
`GOOGLE_GENERATIVE_AI_API_KEY`, `XAI_API_KEY`, `GROQ_API_KEY`,
`AWS_ACCESS_KEY_ID`, `OPENROUTER_API_KEY`). See
[Credentials](../security/credentials.md) for details on both methods.
You can also source these from environment variables (`OPENAI_API_KEY`,
`ANTHROPIC_API_KEY`, `GOOGLE_GENERATIVE_AI_API_KEY`, `XAI_API_KEY`,
`GROQ_API_KEY`, `AWS_ACCESS_KEY_ID`, `OPENROUTER_API_KEY`) through
[credential bindings](../security/credentials.md#credential-bindings); the
sandbox prompts you to approve one per provider on first run. See
[Credentials](../security/credentials.md) for details.

## Configuration

Expand Down
8 changes: 5 additions & 3 deletions content/manuals/ai/sandboxes/agents/shell.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ $ sbx run shell -- -c "echo hi" # runs bash -l -c "echo hi"

When the first argument is a bare word, it replaces `-l` instead.

Set your API keys as environment variables so the sandbox proxy can inject
them into API requests automatically. Credentials are never stored inside
the VM:
Provide your API keys as environment variables so the sandbox proxy can inject
them into API requests. The proxy injects a key once a
[credential binding](../security/credentials.md#credential-bindings) authorizes
it — the sandbox prompts you to approve one on first run. Credentials are never
stored inside the VM:

```console
$ export ANTHROPIC_API_KEY=sk-ant-xxxxx
Expand Down
36 changes: 18 additions & 18 deletions content/manuals/ai/sandboxes/customize/kit-examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ ruff-lint/
```

```yaml {title="ruff-lint/spec.yaml"}
schemaVersion: "1"
schemaVersion: "2"
kind: mixin
name: ruff-lint
displayName: Ruff
Expand Down Expand Up @@ -95,7 +95,7 @@ the kit and install each certificate before running
`update-ca-certificates`.

```yaml {title="internal-ca/spec.yaml"}
schemaVersion: "1"
schemaVersion: "2"
kind: mixin
name: internal-ca

Expand Down Expand Up @@ -196,7 +196,7 @@ docker-review/
```

```yaml {title="docker-review/spec.yaml"}
schemaVersion: "1"
schemaVersion: "2"
kind: mixin
name: docker-review
displayName: Dockerfile review skill
Expand Down Expand Up @@ -260,7 +260,7 @@ built-in `claude` agent but drops `--dangerously-skip-permissions` so
every tool call prompts for approval:

```yaml {title="claude-safe/spec.yaml"}
schemaVersion: "1"
schemaVersion: "2"
kind: sandbox
name: claude-safe
displayName: Claude Code (with approval prompts)
Expand All @@ -272,22 +272,22 @@ sandbox:
entrypoint:
run: [claude]

network:
serviceDomains:
api.anthropic.com: anthropic
console.anthropic.com: anthropic
serviceAuth:
anthropic:
headerName: x-api-key
valueFormat: "%s"
allowedDomains:
- "claude.com:443"
caps:
network:
allow:
- "claude.com:443"

credentials:
sources:
anthropic:
env:
- ANTHROPIC_API_KEY
- service: anthropic
apiKey:
name: ANTHROPIC_API_KEY
inject:
- domain: api.anthropic.com
header: x-api-key
format: "%s"
- domain: console.anthropic.com
header: x-api-key
format: "%s"
```

Launch with the kit's `name:` as the agent argument to `sbx run`:
Expand Down
Loading
Loading