Composable devcontainer scaffolds that collapse into normal, editable configs.
This project follows spec-first development. Every feature MUST start with a
reviewed spec committed under docs/specs/ before implementation code is
written.
# Guided questionnaire — always writes superposition.yml
npx container-superposition init
# Declarative project config committed in the repo
cat > .superposition.yml <<'YAML'
stack: compose
language:
- nodejs
database:
- postgres
env:
APP_ENV: development
mounts:
- "./local-tools:/workspace/tools"
customizations:
envTemplate:
POSTGRES_PASSWORD: postgres
YAML
npx container-superposition init --no-interactive
# Regenerate from the repository project file (superposition.yml is required)
npx container-superposition regen
# Or select the project file explicitly
npx container-superposition regen --from-project
# Non-interactive example
npx container-superposition init --stack compose --language nodejs --database postgres
# Write only superposition.yml without generating .devcontainer/
npx container-superposition init --stack compose --language nodejs --no-scaffold
# Preview before writing files
npx container-superposition plan --stack compose --overlays nodejs,postgres,grafana
# Explain why dependencies were included
npx container-superposition plan --stack compose --overlays grafana --verbose
# Migrate a manifest-only repo to the project-file model
npx container-superposition migrate- Base templates:
plain(single image) andcompose(multi-service). - Overlays: add languages, databases, observability, cloud tools, dev tools.
- Composition: merges overlays into a standard
.devcontainer/you can edit freely. - Project config:
superposition.yml(or.superposition.yml) is the canonical input for all generation and regeneration flows. Commit it to your repo for reproducible team and CI builds.initalways writessuperposition.ymlas its primary outputregenreads only the project file —superposition.jsonis an output-only receipt- Repos without a project file should run
cs migrateonce to create one from their manifest doctorcompares the project file against the last-generated manifest and reports drift
init— run the interactive questionnaire; always writessuperposition.ymland (by default) scaffolds.devcontainer/- Add
--no-scaffoldto write only the project file without generating.devcontainer/ - Add
--project-root <path>to resolve persisted input from a different repository root
- Add
regen— deterministically replay the repository project file (superposition.ymlrequired)- Add
--project-root <path>to resolve persisted input from a different repository root
- Add
migrate— one-time migration: createssuperposition.ymlfrom an existingsuperposition.json- Required for repos that ran
initbefore this project-file-first model was introduced
- Required for repos that ran
adopt— migrate an existing.devcontainer/to the overlay-based workflowlist— browse overlaysexplain— overlay detailsplan— preview output- Add
--verboseto narrate dependency resolution and inclusion reasons - Add
--from-manifest <path>to preview an existing manifest with the same explanation model
- Add
hash— deterministic environment fingerprintdoctor— validate environment and detect project-file drift
Start here:
- Docs index
- superposition.yml reference ← project file authoring guide
- Quick reference
- Adopt command
- Hash command
- Examples
- Presets
- Architecture
- Overlays
- Custom patches
- Workflows and regen
- Filesystem contract
- Security
- Publishing
See CONTRIBUTING.md
MIT. See LICENSE