Skip to content

chore(codespaces): add devcontainer with Claude Code + auto sign-in - #196

Merged
kellenmurphy merged 1 commit into
mainfrom
chore/devcontainer-claude-code
Jul 11, 2026
Merged

chore(codespaces): add devcontainer with Claude Code + auto sign-in#196
kellenmurphy merged 1 commit into
mainfrom
chore/devcontainer-claude-code

Conversation

@kellenmurphy

Copy link
Copy Markdown
Owner

What

Adds .devcontainer/devcontainer.json so Codespaces (and prebuilds) come up ready to use with Claude Code:

  • Keeps the default mcr.microsoft.com/devcontainers/universal:2 image (Node 24, npm, git, and the Codespaces GPG commit-signing wrapper).
  • Installs the Claude Code CLI via ghcr.io/anthropics/devcontainer-features/claude-code so claude is on PATH in the terminal.
  • Installs + enables the anthropic.claude-code VS Code extension automatically.
  • Runs npm ci on create so the workspace is ready to build/test.

Auto sign-in

Authentication is provided at runtime by a CLAUDE_CODE_OAUTH_TOKEN Codespaces secret (repo → Settings → Secrets and variables → Codespaces). Both the CLI and the extension read it automatically, so new/prebuilt Codespaces are signed in with no interactive prompt. The token is intentionally not committed or baked into the prebuilt image.

Follow-up (manual, one-time)

  • Add the CLAUDE_CODE_OAUTH_TOKEN Codespaces secret (generated via claude setup-token).
  • Enable a prebuild targeting main (Settings → Codespaces → Set up prebuild).

🤖 Generated with Claude Code

Adds a devcontainer that installs the Claude Code CLI (via the anthropics
devcontainer feature) and the anthropic.claude-code VS Code extension, and
runs npm ci on create. Sign-in is provided at runtime via the
CLAUDE_CODE_OAUTH_TOKEN Codespaces secret, so new/prebuilt Codespaces are
authenticated without an interactive prompt.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Jul 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@kellenmurphy
kellenmurphy merged commit 57523e8 into main Jul 11, 2026
10 checks passed
@kellenmurphy
kellenmurphy deleted the chore/devcontainer-claude-code branch July 11, 2026 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant