{"id":47768042,"url":"https://github.com/zizzfizzix/claude-devcontainers","last_synced_at":"2026-05-29T23:02:20.137Z","repository":{"id":344133129,"uuid":"1180319015","full_name":"zizzfizzix/claude-devcontainers","owner":"zizzfizzix","description":null,"archived":false,"fork":false,"pushed_at":"2026-05-27T17:38:59.000Z","size":205,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-27T19:27:53.599Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zizzfizzix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-12T23:25:52.000Z","updated_at":"2026-05-27T17:38:45.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/zizzfizzix/claude-devcontainers","commit_stats":null,"previous_names":["zizzfizzix/claude-devcontainers"],"tags_count":35,"template":false,"template_full_name":null,"purl":"pkg:github/zizzfizzix/claude-devcontainers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zizzfizzix%2Fclaude-devcontainers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zizzfizzix%2Fclaude-devcontainers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zizzfizzix%2Fclaude-devcontainers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zizzfizzix%2Fclaude-devcontainers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zizzfizzix","download_url":"https://codeload.github.com/zizzfizzix/claude-devcontainers/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zizzfizzix%2Fclaude-devcontainers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33673628,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-03T07:55:10.603Z","updated_at":"2026-05-29T23:02:20.095Z","avatar_url":"https://github.com/zizzfizzix.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Claude Code Devcontainers\n\nBaseline devcontainer configs for [Claude Code](https://claude.ai/code). Adds a secure, firewall-restricted dev environment to any repo in one command.\n\n\u003e **Requires [`jq`](https://jqlang.github.io/jq/)** — used by the installer and updater to manage extensions.\n\n## Bootstrap a new repo\n\n**Interactive** — prompts for template, target directory, and VS Code extensions:\n\n```bash\nbash \u003c(curl -fsSL \"https://raw.githubusercontent.com/zizzfizzix/claude-devcontainers/main/install.sh\")\n```\n\n\u003e `install.sh` downloads only the files it needs — no clone required.\n\n**Non-interactive** — pass the template (and optionally a target directory) as arguments:\n\n```bash\ncurl -fsSL \"https://raw.githubusercontent.com/zizzfizzix/claude-devcontainers/main/install.sh\" | bash -s -- typescript\ncurl -fsSL \"https://raw.githubusercontent.com/zizzfizzix/claude-devcontainers/main/install.sh\" | bash -s -- typescript /path/to/project\n```\n\nThen open the folder in VS Code → **Reopen in Container**.\n\n### Windows\n\nThe installer works in **Git Bash** (ships with [Git for Windows](https://gitforwindows.org/)). Use the non-interactive form (`curl | bash -s -- typescript`) — `bash \u003c(...)` process substitution is not supported in Git Bash.\n\n## Updating an existing install\n\nRun `update.sh` from inside the container (or directly on the host):\n\n```bash\n.devcontainer/update.sh\n```\n\nThe updater fetches the latest upstream version of itself first, then syncs all upstream-owned files while leaving your project-local customizations untouched. It prints a GitHub compare URL so you can review what changed.\n\n## Templates\n\n| Template     | Base image                                        | Extra tooling                                    |\n| ------------ | ------------------------------------------------- | ------------------------------------------------ |\n| `typescript` | `mcr.microsoft.com/devcontainers/base:debian`     | Node 24, git-delta, Claude Code                  |\n| `php`        | `mcr.microsoft.com/devcontainers/base:debian`     | PHP 8.2 + extensions, Composer, WP-CLI, Node 24  |\n| `research`   | `mcr.microsoft.com/devcontainers/base:debian`     | Pandoc, ripgrep, Markdown tools — firewall disabled (`UNRESTRICTED_NETWORK=true`) |\n\nAll templates include:\n\n- Claude Code with `--dangerously-skip-permissions` aliased (safe inside the firewall-restricted container)\n- `iptables` firewall: allowlists only necessary outbound domains, drops everything else\n- Transparent HTTPS proxy (mitmproxy) with OAuth credential management\n- Persistent shell history and Claude config across container rebuilds\n- git-delta, fzf, zsh\n\n## First use\n\nAfter the container starts, authenticate Claude Code:\n\n```bash\nclaude /login\n```\n\nCredentials are persisted in `.devcontainer/.data/proxy/credentials.json` and survive container rebuilds.\n\n## What gets installed\n\n```\n.devcontainer/\n├── proxy/\n│   ├── Dockerfile                  # mitmproxy sidecar image\n│   ├── addon.py                    # token swap + request inspection\n│   └── start.sh                    # firewall setup + transparent proxy launch\n├── claude-wt.zsh                   # git worktree helper for multi-branch Claude sessions\n├── devcontainer.json\n├── docker-compose.yml\n├── docker-compose.override.yml     # project-local Docker Compose overrides (yours to edit)\n├── extensions.json                 # upstream extension catalog\n├── extensions.local.json           # your extension selections (generated on install)\n├── postcreate.sh\n├── postcreate.local.sh             # project-local post-create hook (yours to edit)\n├── poststart.sh\n├── poststart.local.sh              # project-local post-start hook (yours to edit)\n├── shell-config.zsh\n├── shell-config.local.zsh          # project-local shell config (yours to edit)\n├── update.sh                       # upstream update script\n└── .upstream-version               # version stamp, e.g. typescript@v1.2.0\n```\n\nFiles marked \"yours to edit\" are installed once and never overwritten by `update.sh`.\n\n## Customizing without forking\n\n`update.sh` distinguishes between **upstream-owned** files (always synced) and **project-local** files (installed once, never touched again). Customize via the local files:\n\n| What you want to customize | File to edit |\n| -------------------------- | ------------ |\n| Extra packages, repo setup | `postcreate.local.sh` |\n| Per-session startup logic  | `poststart.local.sh` |\n| Shell aliases, exports     | `shell-config.local.zsh` |\n| Extra Docker services      | `docker-compose.override.yml` |\n| VS Code extension selection | `extensions.local.json` |\n\n## VS Code extensions\n\n`extensions.json` is the upstream extension catalog. Extensions have two tiers:\n\n- **base** — always installed (Claude Code, GitLens)\n- **optional** — shown in the install prompt; your choices are saved to `extensions.local.json`\n\n`update.sh` re-reads `extensions.local.json` on every upgrade so your selections survive.\n\n## How the proxy works\n\nThe `claude-proxy` sidecar runs mitmproxy as a transparent HTTPS proxy alongside an `iptables`/`nftables` firewall. All outbound traffic from the dev container is redirected through it.\n\n- **Domain allowlist**: only requests to whitelisted domains (GitHub, npm, Anthropic, VS Code, etc.) are forwarded; all others get a 403.\n- **Credential management**: real OAuth tokens are captured from login responses, stored in `.devcontainer/.data/proxy/credentials.json`, and replaced with dummy tokens that are swapped back transparently on every outbound request. This prevents real tokens from appearing in Claude's context or logs.\n- **CA certificate**: the proxy CA is automatically trusted in the system store and Python's `certifi` bundle on container start.\n\n## Extending the firewall allowlist\n\nAdd extra domains via the `claude-proxy` service environment — no script fork needed:\n\n```yaml\nclaude-proxy:\n  environment:\n    EXTRA_ALLOWED_DOMAINS: \"registry.example.com cdn.example.com\"\n```\n\nThe proxy resolves and allowlists them at container start.\n\n## Disabling the firewall\n\nTo allow all outbound traffic (e.g. for initial setup or debugging):\n\n```yaml\nclaude-proxy:\n  environment:\n    UNRESTRICTED_NETWORK: \"true\"\n```\n\n## Forwarding host credentials\n\nHost credentials are forwarded into the container before it starts via `initializeCommand` scripts. Each integration reads env vars from the host, writes them to `.devcontainer/.data/`, and the container loads them at startup.\n\n### GitHub CLI (`gh`)\n\nIf `gh` is installed and authenticated on the host, the token is read automatically via `gh auth token` and forwarded into the container — no manual setup required.\n\n### Atlassian CLI (`acli`)\n\nSet the following env vars on the host before opening in container:\n\n| Variable | Description |\n| -------- | ----------- |\n| `ATLASSIAN_API_TOKEN` | Atlassian API token |\n| `ATLASSIAN_EMAIL` | Account email |\n| `ATLASSIAN_SITE` | Site name (e.g. `myorg.atlassian.net`) |\n\n`postcreate.sh` will authenticate `acli` for both Jira and Confluence automatically. If the vars are not set, the step is silently skipped.\n\n### GitLab CLI (`glab`)\n\nSet `GITLAB_TOKEN` on the host before opening in container. For self-managed or GitLab Dedicated instances, also set `GITLAB_HOST`:\n\n| Variable | Description |\n| -------- | ----------- |\n| `GITLAB_TOKEN` | GitLab personal access token |\n| `GITLAB_HOST` | GitLab instance URL (optional, defaults to `https://gitlab.com`) |\n\n`glab` reads `GITLAB_TOKEN` directly from the environment — no explicit login step is needed. If the var is not set, the step is silently skipped.\n\n## Git worktree helper\n\n`claude-wt.zsh` provides a `claude-wt \u003cbranch\u003e` function that creates a git worktree for `\u003cbranch\u003e`, injects a one-shot VS Code task to launch Claude Code, and reopens VS Code into that worktree. Useful for running multiple Claude sessions on different branches simultaneously.\n\n## Local usage (from a clone)\n\nInteractive:\n\n```bash\n./install.sh\n```\n\nNon-interactive:\n\n```bash\n./install.sh [typescript|php|research] [target-directory]\n```\n\n`target-directory` defaults to the current directory.\n\n## Repo layout\n\n```\n├── base/\n│   ├── claude/\n│   │   └── settings.json\n│   ├── stubs/                      # init-only stub files installed into projects\n│   ├── claude-wt.zsh\n│   ├── extensions.json             # VS Code extension catalog\n│   ├── postcreate.sh\n│   ├── poststart.sh\n│   ├── shell-config.zsh\n│   └── update.sh                   # upstream update script\n├── proxy/\n│   ├── addon.py\n│   ├── Dockerfile\n│   └── start.sh\n├── templates/\n│   ├── php/\n│   │   ├── devcontainer.json\n│   │   ├── docker-compose.yml\n│   │   ├── manifest.txt\n│   │   ├── postcreate-php.sh\n│   │   └── version.txt\n│   ├── research/\n│   │   ├── devcontainer.json\n│   │   ├── docker-compose.yml\n│   │   ├── manifest.txt\n│   │   └── version.txt\n│   └── typescript/\n│       ├── devcontainer.json\n│       ├── docker-compose.yml\n│       ├── manifest.txt\n│       └── version.txt\n├── .devcontainer/                  # this repo's own devcontainer\n│   └── devcontainer.json\n├── .release-please-manifest.json\n├── release-please-config.json\n└── install.sh\n```\n\n## Adding a new template\n\n1. Add `templates/\u003cname\u003e/devcontainer.json`, `docker-compose.yml`, `manifest.txt`, and `version.txt` (start at `0.0.0`)\n2. Add `\u003cname\u003e` to the `TEMPLATES` and `DESCRIPTIONS` arrays in `install.sh`\n3. Add a package entry to `release-please-config.json` and `.release-please-manifest.json`\n4. Add a row to the Templates table above\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzizzfizzix%2Fclaude-devcontainers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzizzfizzix%2Fclaude-devcontainers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzizzfizzix%2Fclaude-devcontainers/lists"}