Open History to see the last commit
1# Local dev secrets for `wrangler dev`. Copy to `.dev.vars` and fill in.
2# `.dev.vars` is gitignored; never commit real keys.
3
4# Which in-sandbox coding agent to run: claude-code (default) | codex | grok.
5# (Also set in wrangler.jsonc `vars`; .dev.vars overrides it locally.) Only the
6# matching key below is needed for your choice.
7HARNESS=claude-code
8
9# claude-code → Anthropic API key for the in-sandbox `claude` CLI.
10ANTHROPIC_API_KEY=sk-ant-...
11
12# codex → OpenAI Codex key. Injected into the sandbox AS CODEX_API_KEY (a bare
13# OPENAI_API_KEY is accepted too and mapped to it).
14# CODEX_API_KEY=sk-...
15
16# grok → xAI key for the Grok Build CLI (GROK_API_KEY accepted as an alias).
17# XAI_API_KEY=xai-...
18
19# The key is injected into the sandbox env via the workspace `secrets` (never
20# persisted to logs/snapshots).
21
22# Local dev needs NO host config. The container reaches the Worker's tool-bridge at
23# `host.docker.internal:3001`, and preview URLs use a Cloudflare quick tunnel
24# (`*.trycloudflare.com`) served from inside the sandbox — no tunnel setup, no
25# custom domain, local or deployed. These vars are only OVERRIDES:
26#
27# PUBLIC_HOSTNAME — pin the container→Worker bridge host (e.g. a stable named
28# tunnel). Unset → host.docker.internal locally.
29# PREVIEW_HOSTNAME — ONLY for the optional `exposePort`-fronted preview path (Worker
30# serves the preview on a custom domain). Not needed for the
31# default quick-tunnel previews. Requires a `*.<domain>` route.
32# PUBLIC_HOSTNAME=your-host.example.com
33# PREVIEW_HOSTNAME=preview.example.com