You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(claude-code): strip Terraform and Coder-internal jargon from README
Rewrite phrases that leaked Terraform lifecycle or Coder internals into
plain English. The README is read by template authors who don't need
to know that each env map pair becomes a `coder_env` resource or that
validation happens "at plan time" rather than before the workspace
deploys.
Also replaces two em dashes around the "Unattended mode" intro with
parentheses, matching the no-emdash convention used in coder/coder.
Copy file name to clipboardExpand all lines: registry/coder/modules/claude-code/README.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ module "claude-code" {
29
29
30
30
## Environment variables (`env`)
31
31
32
-
Pass any Claude Code env var (or any custom var your pre/post scripts consume) through the `env` map. Each key/value pair becomes one `coder_env` resource on the agent.
32
+
Pass any Claude Code env var (or any custom var your pre/post scripts consume) through the `env` map. Each pair is exposed as an environment variable to the workspace.
33
33
34
34
```tf
35
35
variable "anthropic_api_key" {
@@ -69,7 +69,7 @@ module "claude-code" {
69
69
70
70
Route Claude Code through [Coder AI Gateway](https://coder.com/docs/ai-coder/ai-gateway) for centralized auditing and token usage tracking. Requires Coder Premium with the AI Governance add-on and `CODER_AIBRIDGE_ENABLED=true` on the server.
71
71
72
-
Point `ANTHROPIC_BASE_URL` at your deployment's `/api/v2/aibridge/anthropic` endpoint and authenticate with the workspace owner's session token via `ANTHROPIC_AUTH_TOKEN`. Claude Code reads both variables natively; no API key is required.
72
+
Point `ANTHROPIC_BASE_URL` at your deployment's `/api/v2/aibridge/anthropic` endpoint and authenticate with the workspace owner's session token via `ANTHROPIC_AUTH_TOKEN`. Claude Code reads both variables directly, so no API key is required.
73
73
74
74
```tf
75
75
data "coder_workspace" "me" {}
@@ -124,7 +124,7 @@ module "claude-code" {
124
124
125
125
Route Claude Code through [Google Vertex AI](https://docs.claude.com/en/docs/claude-code/google-vertex-ai). Requires a GCP project with Vertex AI enabled, Claude models enabled via Model Garden, and a service account with the Vertex AI User role.
126
126
127
-
The service account JSON has to land on the workspace filesystem where Claude can read it, so authenticating gcloud happens in `pre_install_script`:
127
+
The service account JSON must be written to disk where Claude can read it, so gcloud authentication happens in `pre_install_script`:
128
128
129
129
```tf
130
130
variable "vertex_sa_json" {
@@ -236,7 +236,7 @@ module "claude-code" {
236
236
237
237
## Using a pre-installed binary
238
238
239
-
`claude_binary_path` is only consulted when `install_claude_code = false`. The official installer always drops the binary at `$HOME/.local/bin/claude` and does not accept a custom destination, so combining `install_claude_code = true` with a custom `claude_binary_path` is rejected at plan time.
239
+
`claude_binary_path` is only consulted when `install_claude_code = false`. The official installer always drops the binary at `$HOME/.local/bin/claude` and does not accept a custom destination, so combining `install_claude_code = true` with a custom `claude_binary_path` is rejected before the workspace deploys.
240
240
241
241
To use a binary you bake into the image (or install via a separate module), set `install_claude_code = false` and point `claude_binary_path` at the directory containing it:
242
242
@@ -280,7 +280,7 @@ module "claude-code" {
280
280
281
281
## Unattended mode (skip setup wizard and permission prompts)
282
282
283
-
For template-admin setups where Claude Code should just work — CI agents, headless workspaces, AI coding agents that do not have a human to click through the first-run wizard or confirm bypass-permissions mode — pre-write `settings.json` and `~/.claude.json` via `pre_install_script`.
283
+
For templates that need Claude Code to run without human interaction (CI agents, headless workspaces, AI coding agents that cannot click through the first-run wizard or confirm bypass-permissions mode), pre-write `settings.json` and `~/.claude.json` via `pre_install_script`.
284
284
285
285
```tf
286
286
module "claude-code" {
@@ -335,7 +335,7 @@ claude -p "$PROMPT" --dangerously-skip-permissions --permission-mode bypassPermi
335
335
336
336
## Outputs
337
337
338
-
`scripts` is a list of `coder exp sync`names for every `coder_script`this module creates, in the order`coder-utils` runs them. Use it to gate a downstream `coder_script`behind Claude Code's install:
338
+
`scripts` is the list of script names this module creates, in run order. Use it with `coder exp sync` to make another `coder_script`wait until Claude Code finishes installing:
-`claude_api_key`, `claude_code_oauth_token`, `model`, `disable_autoupdater`, `claude_md_path` removed as dedicated variables. Set them through `env` instead. The module now emits`ANTHROPIC_API_KEY` (the variable Claude Code actually reads), not `CLAUDE_API_KEY`.
379
-
- All Tasks, AgentAPI, Boundary, AI Bridge (now **AI Gateway**), and web-app variables removed. Compose dedicated modules or set env vars via `env`. See the AI Gateway example above for the replacement pattern.
378
+
-`claude_api_key`, `claude_code_oauth_token`, `model`, `disable_autoupdater`, `claude_md_path` removed as dedicated variables. Set them through `env` instead. The module now sets`ANTHROPIC_API_KEY` (the variable Claude Code actually reads), not `CLAUDE_API_KEY`.
379
+
- All Tasks, AgentAPI, Boundary, AI Bridge (now **AI Gateway**), and web-app variables removed. Use dedicated modules instead, or set env vars through the `env` map. See the AI Gateway example above for the replacement pattern.
380
380
-`workdir` removed. MCP applies at user scope.
381
381
-`install_via_npm` removed. Official installer only.
382
382
-`allowed_tools` / `disallowed_tools` removed. Write `~/.claude/settings.json` via `pre_install_script` with `permissions.allow` / `permissions.deny` arrays.
0 commit comments