Skip to content

Commit 73e5a26

Browse files
authored
Add secrets docs and consolidate SDK references (#69)
1 parent 451761e commit 73e5a26

File tree

11 files changed

+621
-563
lines changed

11 files changed

+621
-563
lines changed

docs/cli/projects.mdx

Lines changed: 0 additions & 168 deletions
This file was deleted.

docs/cli/secrets.mdx

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
title: "Secrets"
3+
description: "Manage secret stores and secrets from the CLI"
4+
---
5+
6+
## Secret stores
7+
8+
```bash
9+
# Create a store (with optional egress restrictions)
10+
oc secret-store create --name my-secrets --egress-allowlist api.anthropic.com
11+
12+
# List stores
13+
oc secret-store list
14+
15+
# Update a store
16+
oc secret-store update <store-id> --egress-allowlist api.anthropic.com,*.openai.com
17+
18+
# Delete a store (and all its secrets)
19+
oc secret-store delete <store-id>
20+
```
21+
22+
## Secrets
23+
24+
```bash
25+
# Set a secret
26+
oc secret set <store-id> ANTHROPIC_API_KEY sk-ant-...
27+
28+
# Set from stdin
29+
echo "sk-ant-..." | oc secret set <store-id> ANTHROPIC_API_KEY --from-stdin
30+
31+
# Restrict a secret to specific hosts
32+
oc secret set <store-id> ANTHROPIC_API_KEY sk-ant-... --allowed-hosts api.anthropic.com
33+
34+
# List secrets (names only — values are never returned)
35+
oc secret list <store-id>
36+
37+
# Delete a secret
38+
oc secret delete <store-id> ANTHROPIC_API_KEY
39+
```
40+
41+
## Using secrets in sandboxes
42+
43+
```bash
44+
# Create a sandbox with a secret store
45+
oc create --secret-store my-secrets
46+
47+
# Env vars are sealed — real values are never in the VM
48+
oc exec <sandbox-id> -- echo '$ANTHROPIC_API_KEY'
49+
# osb_sealed_7f3a9c... (not the real key)
50+
```
51+
52+
For how secrets work under the hood, see [Secrets](/sandboxes/secrets).

docs/mint.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
"sandboxes/interactive-terminals",
5454
"sandboxes/checkpoints",
5555
"sandboxes/templates",
56+
"sandboxes/secrets",
5657
"sandboxes/patches",
5758
"sandboxes/preview-urls"
5859
]
@@ -66,7 +67,8 @@
6667
"cli/shell",
6768
"cli/checkpoint",
6869
"cli/patch",
69-
"cli/preview"
70+
"cli/preview",
71+
"cli/secrets"
7072
]
7173
},
7274
{

0 commit comments

Comments
 (0)