Skip to content

Commit 78ecee6

Browse files
committed
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.
1 parent dbb2c21 commit 78ecee6

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

registry/coder/modules/claude-code/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ module "claude-code" {
2929

3030
## Environment variables (`env`)
3131

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.
3333

3434
```tf
3535
variable "anthropic_api_key" {
@@ -69,7 +69,7 @@ module "claude-code" {
6969

7070
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.
7171

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.
7373

7474
```tf
7575
data "coder_workspace" "me" {}
@@ -124,7 +124,7 @@ module "claude-code" {
124124

125125
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.
126126

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`:
128128

129129
```tf
130130
variable "vertex_sa_json" {
@@ -236,7 +236,7 @@ module "claude-code" {
236236

237237
## Using a pre-installed binary
238238

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.
240240

241241
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:
242242

@@ -280,7 +280,7 @@ module "claude-code" {
280280

281281
## Unattended mode (skip setup wizard and permission prompts)
282282

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`.
284284

285285
```tf
286286
module "claude-code" {
@@ -335,7 +335,7 @@ claude -p "$PROMPT" --dangerously-skip-permissions --permission-mode bypassPermi
335335

336336
## Outputs
337337

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:
339339

340340
```tf
341341
module "claude-code" {
@@ -360,7 +360,7 @@ resource "coder_script" "wait_for_claude" {
360360

361361
## Troubleshooting
362362

363-
Module logs live at `$HOME/.coder-modules/claude-code/`:
363+
Module logs are written to `$HOME/.coder-modules/claude-code/`:
364364

365365
```bash
366366
cat $HOME/.coder-modules/claude-code/install.log
@@ -375,8 +375,8 @@ cat $HOME/.coder-modules/claude-code/post_install.log
375375
376376
Breaking changes in v5.0.0:
377377

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 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.
380380
- `workdir` removed. MCP applies at user scope.
381381
- `install_via_npm` removed. Official installer only.
382382
- `allowed_tools` / `disallowed_tools` removed. Write `~/.claude/settings.json` via `pre_install_script` with `permissions.allow` / `permissions.deny` arrays.

0 commit comments

Comments
 (0)