CLI for bootstrapping project-specific .devcontainer setups with sane defaults and Claude Code integration. The tool detects your tech stack, copies a bundled template (Python, Node, Go, Rust, generic, compose-aware, etc.), and optionally wires in Claude-specific mounts or legacy template sources.
devcont initauto-detects stack + docker-compose usage and scaffolds.devcontainer/accordingly.- Bundled template catalog (run
devcont templatesto inspect) plus--template <id>override support. - Legacy
--sourceflag to copy from an existing.devcontainerfolder if you need full control. devcont up|attach|down|shellwrappers for the official Dev Containers CLI.
npm install -g @devcontainers/cli
cd /path/to/devcont
npm install
npm install -g .
# or once published
npm install -g devcont# Initialize a repo with an auto-selected template
cd /path/to/project
devcont init
# Force a specific template
devcont init --template python-uv
# Specify compose service when your docker-compose has multiple entries
# (CLI prompts if omitted; `DEVCONT_NO_PROMPT=1` skips prompts)
devcont init --compose-service api
# Opt into Claude mounts or firewall hardening for non-Claude templates
devcont init --claude-mounts --firewall
# List bundled templates
devcont templates
# Legacy mode: copy from an existing template repo
devcont init --source ~/projects/custom-devcontainerAfter initialization:
devcont up # build+start container
devcont attach # open shell inside
# or combine
devcont shellTemplate sources live under templates/ with metadata in templates/index.json. See docs/templates.md for details on adding/modifying templates, compose behavior, and tests.
Preview: asciinema demo shows devcont init --template node creating a sandboxed .devcontainer.
- Requirements: Node.js 20+, npm.
- Run
npm test,npm run lint:templates,npm run spec(requiresdevcontainerCLI), andnpm run smoke(parallelized, tune viaSMOKE_MAX_WORKERS) before sending changes. - Follow the doc in
docs/devcontainer-template-plan.mdto evolve template architecture.
- Recommended GitHub Actions flow:
npm ci,npm run lint:templates,npm run smoke,npm test. (Prompts are disabled automatically by settingDEVCONT_NO_PROMPT=1.)
devcont init --source <path> copies .devcontainer/ from another repo (your previous Claude checkout, for example). When this flag is present we skip the bundled templates entirely and run the old “copy+patch” flow, so only use it if you truly need a custom template tree. Otherwise prefer the catalog via --template.
MIT – see LICENSE.