Package Exports
- container-superposition
- container-superposition/dist/scripts/init.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (container-superposition) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
container-superposition
Composable devcontainer scaffolds that collapse into normal, editable configs.
Development Policy
This project follows spec-first development. Every feature MUST start with a
reviewed spec committed under docs/specs/ before implementation code is
written.
Quickstart
# 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
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 migrateWhat It Does
- 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
Core Commands
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
Documentation
Start here:
- Docs index
- Quick reference
- Adopt command
- Hash command
- Examples
- Presets
- Architecture
- Overlays
- Custom patches
- Workflows and regen
- Filesystem contract
- Security
- Publishing
Examples
Contributing
See CONTRIBUTING.md
License
MIT. See LICENSE