container-superposition 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +843 -0
- package/dist/scripts/init.d.ts +3 -0
- package/dist/scripts/init.d.ts.map +1 -0
- package/dist/scripts/init.js +1190 -0
- package/dist/scripts/init.js.map +1 -0
- package/dist/scripts/migrate-to-manifests.d.ts +12 -0
- package/dist/scripts/migrate-to-manifests.d.ts.map +1 -0
- package/dist/scripts/migrate-to-manifests.js +230 -0
- package/dist/scripts/migrate-to-manifests.js.map +1 -0
- package/dist/tool/questionnaire/composer.d.ts +6 -0
- package/dist/tool/questionnaire/composer.d.ts.map +1 -0
- package/dist/tool/questionnaire/composer.js +1232 -0
- package/dist/tool/questionnaire/composer.js.map +1 -0
- package/dist/tool/readme/markdown-parser.d.ts +30 -0
- package/dist/tool/readme/markdown-parser.d.ts.map +1 -0
- package/dist/tool/readme/markdown-parser.js +139 -0
- package/dist/tool/readme/markdown-parser.js.map +1 -0
- package/dist/tool/readme/readme-generator.d.ts +9 -0
- package/dist/tool/readme/readme-generator.d.ts.map +1 -0
- package/dist/tool/readme/readme-generator.js +422 -0
- package/dist/tool/readme/readme-generator.js.map +1 -0
- package/dist/tool/schema/custom-loader.d.ts +17 -0
- package/dist/tool/schema/custom-loader.d.ts.map +1 -0
- package/dist/tool/schema/custom-loader.js +149 -0
- package/dist/tool/schema/custom-loader.js.map +1 -0
- package/dist/tool/schema/overlay-loader.d.ts +47 -0
- package/dist/tool/schema/overlay-loader.d.ts.map +1 -0
- package/dist/tool/schema/overlay-loader.js +252 -0
- package/dist/tool/schema/overlay-loader.js.map +1 -0
- package/dist/tool/schema/types.d.ts +212 -0
- package/dist/tool/schema/types.d.ts.map +1 -0
- package/dist/tool/schema/types.js +5 -0
- package/dist/tool/schema/types.js.map +1 -0
- package/docs/README.md +308 -0
- package/docs/architecture.md +233 -0
- package/docs/creating-overlays.md +549 -0
- package/docs/custom-patches.md +540 -0
- package/docs/dependencies.md +279 -0
- package/docs/examples/custom-patches-example.md +85 -0
- package/docs/examples.md +576 -0
- package/docs/messaging-comparison.md +265 -0
- package/docs/messaging-quick-start.md +385 -0
- package/docs/observability-workflow.md +537 -0
- package/docs/overlay-manifest-refactoring.md +214 -0
- package/docs/overlay-metadata-archive.md +54 -0
- package/docs/overlays.md +523 -0
- package/docs/presets-architecture.md +498 -0
- package/docs/presets.md +366 -0
- package/docs/publishing.md +476 -0
- package/docs/quick-reference.md +326 -0
- package/docs/ux.md +170 -0
- package/features/README.md +85 -0
- package/features/cross-distro-packages/README.md +146 -0
- package/features/cross-distro-packages/devcontainer-feature.json +20 -0
- package/features/cross-distro-packages/install.sh +58 -0
- package/features/local-secrets-manager/devcontainer-feature.json +18 -0
- package/features/local-secrets-manager/install.sh +127 -0
- package/features/project-scaffolder/devcontainer-feature.json +24 -0
- package/features/project-scaffolder/install.sh +100 -0
- package/features/team-conventions/devcontainer-feature.json +24 -0
- package/features/team-conventions/install.sh +93 -0
- package/overlays/.registry/README.md +14 -0
- package/overlays/.registry/base-images.yml +26 -0
- package/overlays/.registry/base-templates.yml +7 -0
- package/overlays/README.md +155 -0
- package/overlays/alertmanager/.env.example +5 -0
- package/overlays/alertmanager/README.md +465 -0
- package/overlays/alertmanager/alert-rules.yml +56 -0
- package/overlays/alertmanager/alertmanager.yml +42 -0
- package/overlays/alertmanager/devcontainer.patch.json +12 -0
- package/overlays/alertmanager/docker-compose.yml +20 -0
- package/overlays/alertmanager/overlay.yml +17 -0
- package/overlays/alertmanager/setup.sh +53 -0
- package/overlays/alertmanager/verify.sh +31 -0
- package/overlays/aws-cli/README.md +473 -0
- package/overlays/aws-cli/devcontainer.patch.json +13 -0
- package/overlays/aws-cli/overlay.yml +13 -0
- package/overlays/azure-cli/README.md +551 -0
- package/overlays/azure-cli/devcontainer.patch.json +8 -0
- package/overlays/azure-cli/overlay.yml +13 -0
- package/overlays/bun/README.md +312 -0
- package/overlays/bun/devcontainer.patch.json +41 -0
- package/overlays/bun/overlay.yml +16 -0
- package/overlays/bun/setup.sh +79 -0
- package/overlays/bun/verify.sh +30 -0
- package/overlays/codex/README.md +128 -0
- package/overlays/codex/devcontainer.patch.json +3 -0
- package/overlays/codex/overlay.yml +14 -0
- package/overlays/codex/setup.sh +24 -0
- package/overlays/codex/verify.sh +30 -0
- package/overlays/commitlint/README.md +333 -0
- package/overlays/commitlint/devcontainer.patch.json +8 -0
- package/overlays/commitlint/overlay.yml +16 -0
- package/overlays/commitlint/setup.sh +234 -0
- package/overlays/direnv/README.md +504 -0
- package/overlays/direnv/devcontainer.patch.json +6 -0
- package/overlays/direnv/overlay.yml +13 -0
- package/overlays/direnv/setup.sh +139 -0
- package/overlays/docker-in-docker/README.md +534 -0
- package/overlays/docker-in-docker/devcontainer.patch.json +10 -0
- package/overlays/docker-in-docker/overlay.yml +13 -0
- package/overlays/docker-sock/README.md +256 -0
- package/overlays/docker-sock/devcontainer.patch.json +9 -0
- package/overlays/docker-sock/docker-compose.yml +8 -0
- package/overlays/docker-sock/overlay.yml +13 -0
- package/overlays/dotnet/README.md +147 -0
- package/overlays/dotnet/devcontainer.patch.json +51 -0
- package/overlays/dotnet/global-tools.txt +24 -0
- package/overlays/dotnet/overlay.yml +13 -0
- package/overlays/dotnet/setup.sh +51 -0
- package/overlays/dotnet/verify.sh +26 -0
- package/overlays/gcloud/README.md +269 -0
- package/overlays/gcloud/devcontainer.patch.json +14 -0
- package/overlays/gcloud/overlay.yml +14 -0
- package/overlays/gcloud/verify.sh +52 -0
- package/overlays/git-helpers/README.md +168 -0
- package/overlays/git-helpers/devcontainer.patch.json +33 -0
- package/overlays/git-helpers/overlay.yml +15 -0
- package/overlays/git-helpers/setup.sh +91 -0
- package/overlays/go/README.md +293 -0
- package/overlays/go/devcontainer.patch.json +43 -0
- package/overlays/go/overlay.yml +15 -0
- package/overlays/go/setup.sh +33 -0
- package/overlays/go/verify.sh +40 -0
- package/overlays/grafana/.env.example +9 -0
- package/overlays/grafana/README.md +462 -0
- package/overlays/grafana/dashboard-provider.yml +11 -0
- package/overlays/grafana/dashboards/observability-overview.json +263 -0
- package/overlays/grafana/devcontainer.patch.json +12 -0
- package/overlays/grafana/docker-compose.yml +27 -0
- package/overlays/grafana/grafana-datasources.yml +57 -0
- package/overlays/grafana/overlay.yml +21 -0
- package/overlays/grafana/verify.sh +34 -0
- package/overlays/jaeger/.env.example +7 -0
- package/overlays/jaeger/README.md +867 -0
- package/overlays/jaeger/devcontainer.patch.json +12 -0
- package/overlays/jaeger/docker-compose.yml +17 -0
- package/overlays/jaeger/overlay.yml +19 -0
- package/overlays/java/README.md +267 -0
- package/overlays/java/devcontainer.patch.json +44 -0
- package/overlays/java/overlay.yml +16 -0
- package/overlays/java/setup.sh +41 -0
- package/overlays/java/verify.sh +42 -0
- package/overlays/just/README.md +443 -0
- package/overlays/just/devcontainer.patch.json +3 -0
- package/overlays/just/overlay.yml +13 -0
- package/overlays/just/setup.sh +182 -0
- package/overlays/kubectl-helm/README.md +660 -0
- package/overlays/kubectl-helm/devcontainer.patch.json +10 -0
- package/overlays/kubectl-helm/overlay.yml +13 -0
- package/overlays/loki/.env.example +5 -0
- package/overlays/loki/README.md +1156 -0
- package/overlays/loki/devcontainer.patch.json +12 -0
- package/overlays/loki/docker-compose.yml +18 -0
- package/overlays/loki/loki-config.yaml +45 -0
- package/overlays/loki/overlay.yml +17 -0
- package/overlays/minio/.env.example +9 -0
- package/overlays/minio/README.md +639 -0
- package/overlays/minio/devcontainer.patch.json +30 -0
- package/overlays/minio/docker-compose.yml +28 -0
- package/overlays/minio/overlay.yml +18 -0
- package/overlays/minio/setup.sh +61 -0
- package/overlays/minio/verify.sh +64 -0
- package/overlays/mkdocs/README.md +309 -0
- package/overlays/mkdocs/devcontainer.patch.json +24 -0
- package/overlays/mkdocs/overlay.yml +15 -0
- package/overlays/modern-cli-tools/README.md +556 -0
- package/overlays/modern-cli-tools/devcontainer.patch.json +3 -0
- package/overlays/modern-cli-tools/overlay.yml +13 -0
- package/overlays/modern-cli-tools/setup.sh +153 -0
- package/overlays/mongodb/.env.example +9 -0
- package/overlays/mongodb/README.md +481 -0
- package/overlays/mongodb/devcontainer.patch.json +32 -0
- package/overlays/mongodb/docker-compose.yml +44 -0
- package/overlays/mongodb/overlay.yml +17 -0
- package/overlays/mongodb/verify.sh +48 -0
- package/overlays/mysql/.env.example +11 -0
- package/overlays/mysql/README.md +542 -0
- package/overlays/mysql/devcontainer.patch.json +34 -0
- package/overlays/mysql/docker-compose.yml +55 -0
- package/overlays/mysql/overlay.yml +16 -0
- package/overlays/mysql/verify.sh +48 -0
- package/overlays/nats/.env.example +5 -0
- package/overlays/nats/README.md +762 -0
- package/overlays/nats/devcontainer.patch.json +24 -0
- package/overlays/nats/docker-compose.yml +31 -0
- package/overlays/nats/overlay.yml +18 -0
- package/overlays/nats/verify.sh +50 -0
- package/overlays/ngrok/README.md +503 -0
- package/overlays/ngrok/devcontainer.patch.json +3 -0
- package/overlays/ngrok/overlay.yml +14 -0
- package/overlays/ngrok/setup.sh +125 -0
- package/overlays/nodejs/README.md +192 -0
- package/overlays/nodejs/devcontainer.patch.json +49 -0
- package/overlays/nodejs/global-packages.txt +16 -0
- package/overlays/nodejs/overlay.yml +14 -0
- package/overlays/nodejs/setup.sh +46 -0
- package/overlays/nodejs/verify.sh +32 -0
- package/overlays/otel-collector/.env.example +9 -0
- package/overlays/otel-collector/README.md +1257 -0
- package/overlays/otel-collector/devcontainer.patch.json +28 -0
- package/overlays/otel-collector/docker-compose.yml +22 -0
- package/overlays/otel-collector/otel-collector-config.yaml +68 -0
- package/overlays/otel-collector/overlay.yml +21 -0
- package/overlays/otel-collector/setup.sh +49 -0
- package/overlays/otel-demo-nodejs/.env.example +2 -0
- package/overlays/otel-demo-nodejs/Dockerfile-otel-demo-nodejs +17 -0
- package/overlays/otel-demo-nodejs/README.md +409 -0
- package/overlays/otel-demo-nodejs/devcontainer.patch.json +12 -0
- package/overlays/otel-demo-nodejs/docker-compose.yml +19 -0
- package/overlays/otel-demo-nodejs/overlay.yml +23 -0
- package/overlays/otel-demo-nodejs/package-otel-demo-nodejs.json +20 -0
- package/overlays/otel-demo-nodejs/server-otel-demo-nodejs.js +259 -0
- package/overlays/otel-demo-nodejs/tracing-otel-demo-nodejs.js +57 -0
- package/overlays/otel-demo-nodejs/verify.sh +31 -0
- package/overlays/otel-demo-python/.env.example +2 -0
- package/overlays/otel-demo-python/Dockerfile-otel-demo-python +16 -0
- package/overlays/otel-demo-python/README.md +82 -0
- package/overlays/otel-demo-python/app-otel-demo-python.py +208 -0
- package/overlays/otel-demo-python/devcontainer.patch.json +12 -0
- package/overlays/otel-demo-python/docker-compose.yml +19 -0
- package/overlays/otel-demo-python/overlay.yml +23 -0
- package/overlays/otel-demo-python/requirements-otel-demo-python.txt +4 -0
- package/overlays/otel-demo-python/verify.sh +31 -0
- package/overlays/playwright/README.md +629 -0
- package/overlays/playwright/devcontainer.patch.json +9 -0
- package/overlays/playwright/overlay.yml +13 -0
- package/overlays/postgres/.env.example +6 -0
- package/overlays/postgres/README.md +602 -0
- package/overlays/postgres/devcontainer.patch.json +21 -0
- package/overlays/postgres/docker-compose.yml +22 -0
- package/overlays/postgres/overlay.yml +15 -0
- package/overlays/postgres/verify.sh +45 -0
- package/overlays/powershell/README.md +314 -0
- package/overlays/powershell/devcontainer.patch.json +22 -0
- package/overlays/powershell/overlay.yml +13 -0
- package/overlays/powershell/setup.sh +29 -0
- package/overlays/powershell/verify.sh +38 -0
- package/overlays/pre-commit/README.md +263 -0
- package/overlays/pre-commit/devcontainer.patch.json +9 -0
- package/overlays/pre-commit/overlay.yml +16 -0
- package/overlays/pre-commit/setup.sh +129 -0
- package/overlays/presets/docs-site.yml +118 -0
- package/overlays/presets/fullstack.yml +181 -0
- package/overlays/presets/microservice.yml +118 -0
- package/overlays/presets/web-api.yml +109 -0
- package/overlays/prometheus/.env.example +5 -0
- package/overlays/prometheus/README.md +1246 -0
- package/overlays/prometheus/devcontainer.patch.json +12 -0
- package/overlays/prometheus/docker-compose.yml +22 -0
- package/overlays/prometheus/overlay.yml +17 -0
- package/overlays/prometheus/prometheus.yml +12 -0
- package/overlays/prometheus/verify.sh +34 -0
- package/overlays/promtail/.env.example +2 -0
- package/overlays/promtail/README.md +357 -0
- package/overlays/promtail/devcontainer.patch.json +5 -0
- package/overlays/promtail/docker-compose.yml +16 -0
- package/overlays/promtail/overlay.yml +17 -0
- package/overlays/promtail/promtail-config.yaml +60 -0
- package/overlays/promtail/verify.sh +31 -0
- package/overlays/pulumi/README.md +472 -0
- package/overlays/pulumi/devcontainer.patch.json +13 -0
- package/overlays/pulumi/overlay.yml +14 -0
- package/overlays/pulumi/verify.sh +31 -0
- package/overlays/python/README.md +919 -0
- package/overlays/python/devcontainer.patch.json +41 -0
- package/overlays/python/overlay.yml +12 -0
- package/overlays/python/requirements-overlay.txt +13 -0
- package/overlays/python/setup.sh +47 -0
- package/overlays/python/verify.sh +32 -0
- package/overlays/rabbitmq/.env.example +7 -0
- package/overlays/rabbitmq/README.md +680 -0
- package/overlays/rabbitmq/devcontainer.patch.json +28 -0
- package/overlays/rabbitmq/docker-compose.yml +30 -0
- package/overlays/rabbitmq/overlay.yml +18 -0
- package/overlays/rabbitmq/verify.sh +41 -0
- package/overlays/redis/.env.example +4 -0
- package/overlays/redis/README.md +776 -0
- package/overlays/redis/devcontainer.patch.json +21 -0
- package/overlays/redis/docker-compose.yml +21 -0
- package/overlays/redis/overlay.yml +15 -0
- package/overlays/redis/verify.sh +41 -0
- package/overlays/redpanda/.env.example +10 -0
- package/overlays/redpanda/README.md +703 -0
- package/overlays/redpanda/devcontainer.patch.json +37 -0
- package/overlays/redpanda/docker-compose.yml +67 -0
- package/overlays/redpanda/overlay.yml +21 -0
- package/overlays/redpanda/verify.sh +48 -0
- package/overlays/rust/README.md +299 -0
- package/overlays/rust/devcontainer.patch.json +39 -0
- package/overlays/rust/overlay.yml +15 -0
- package/overlays/rust/setup.sh +36 -0
- package/overlays/rust/verify.sh +51 -0
- package/overlays/sqlite/README.md +584 -0
- package/overlays/sqlite/devcontainer.patch.json +14 -0
- package/overlays/sqlite/overlay.yml +15 -0
- package/overlays/sqlite/setup.sh +27 -0
- package/overlays/sqlite/verify.sh +43 -0
- package/overlays/sqlserver/.env.example +6 -0
- package/overlays/sqlserver/README.md +592 -0
- package/overlays/sqlserver/devcontainer.patch.json +22 -0
- package/overlays/sqlserver/docker-compose.yml +32 -0
- package/overlays/sqlserver/overlay.yml +17 -0
- package/overlays/sqlserver/verify.sh +30 -0
- package/overlays/tempo/.env.example +5 -0
- package/overlays/tempo/README.md +273 -0
- package/overlays/tempo/devcontainer.patch.json +12 -0
- package/overlays/tempo/docker-compose.yml +20 -0
- package/overlays/tempo/overlay.yml +20 -0
- package/overlays/tempo/tempo-config.yaml +32 -0
- package/overlays/tempo/verify.sh +31 -0
- package/overlays/terraform/README.md +389 -0
- package/overlays/terraform/devcontainer.patch.json +15 -0
- package/overlays/terraform/overlay.yml +14 -0
- package/overlays/terraform/verify.sh +63 -0
- package/package.json +74 -0
- package/templates/README.md +285 -0
- package/templates/compose/.devcontainer/devcontainer.json +46 -0
- package/templates/compose/.devcontainer/docker-compose.yml +12 -0
- package/templates/compose/README.md +20 -0
- package/templates/plain/.devcontainer/devcontainer.json +35 -0
- package/templates/plain/README.md +21 -0
- package/tool/README.md +281 -0
- package/tool/schema/base-images.schema.json +43 -0
- package/tool/schema/base-templates.schema.json +34 -0
- package/tool/schema/config.schema.json +71 -0
- package/tool/schema/overlay-manifest.schema.json +86 -0
package/tool/README.md
ADDED
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
# Container Superposition Init Tool
|
|
2
|
+
|
|
3
|
+
A **humble, purpose-driven devcontainer picker** that helps you bootstrap your first `.devcontainer/` setup without the pain of choosing between too many options.
|
|
4
|
+
|
|
5
|
+
## Philosophy
|
|
6
|
+
|
|
7
|
+
This tool is designed to:
|
|
8
|
+
|
|
9
|
+
- ✅ **Reduce choice paralysis** with guided questions (5–8 max)
|
|
10
|
+
- ✅ **Output boring, editable `.devcontainer/` folders** — not proprietary formats
|
|
11
|
+
- ✅ **Stay humble** — generate once, then get out of your way
|
|
12
|
+
- ✅ **Compose solution-ready templates** with lightweight overlays
|
|
13
|
+
- ✅ **Provide battle-tested defaults** — opinionated choices that work in production
|
|
14
|
+
- ❌ **NOT** become a framework you have to learn
|
|
15
|
+
- ❌ **NOT** require the tool for manual edits or updates
|
|
16
|
+
- ❌ **NOT** generate mysterious black-box configurations
|
|
17
|
+
|
|
18
|
+
### Opinionated Defaults
|
|
19
|
+
|
|
20
|
+
We make deliberate choices about base images, tool versions, and configurations based on real-world usage:
|
|
21
|
+
|
|
22
|
+
- **Default Base Image**: Debian Bookworm (`mcr.microsoft.com/devcontainers/base:bookworm`)
|
|
23
|
+
- Stable, well-maintained, broad compatibility
|
|
24
|
+
- Microsoft's recommended base for general development
|
|
25
|
+
- Regular security updates and long-term support
|
|
26
|
+
|
|
27
|
+
- **Why Opinionated?**
|
|
28
|
+
- Reduces decision fatigue for common use cases
|
|
29
|
+
- Configurations have been validated in production environments
|
|
30
|
+
- Predictable behavior across teams and projects
|
|
31
|
+
|
|
32
|
+
- **Customization Available**
|
|
33
|
+
- Select alternative base images (Trixie for newer packages)
|
|
34
|
+
- Provide custom images (⚠️ may conflict with overlays)
|
|
35
|
+
- All generated files are editable post-generation
|
|
36
|
+
|
|
37
|
+
## Quick Start
|
|
38
|
+
|
|
39
|
+
### Interactive Mode (Recommended for First-Time Users)
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
npm run init
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
You'll be greeted with a beautiful, color-coded interface that guides you through:
|
|
46
|
+
|
|
47
|
+
1. **Base Template**: plain (simple image) or compose (docker-compose based)
|
|
48
|
+
2. **Base Image**: Debian Bookworm (recommended), Trixie, or custom
|
|
49
|
+
3. **Overlays**: Single categorized multi-select with:
|
|
50
|
+
- **Languages**: .NET, Node.js, Python, MkDocs
|
|
51
|
+
- **Databases**: PostgreSQL, Redis
|
|
52
|
+
- **Observability**: OpenTelemetry Collector, Jaeger, Prometheus, Grafana, Loki
|
|
53
|
+
- **Cloud Tools**: AWS CLI, Azure CLI, kubectl/helm
|
|
54
|
+
- **Dev Tools**: docker-in-docker, docker-sock, Playwright, Codex
|
|
55
|
+
4. **Output Path**: Where to write the configuration (default: `./.devcontainer`)
|
|
56
|
+
5. **Port Offset**: Optional offset for running multiple instances
|
|
57
|
+
|
|
58
|
+
The tool features:
|
|
59
|
+
|
|
60
|
+
- 🎨 Color-coded prompts with chalk
|
|
61
|
+
- 📦 Beautiful boxed headers with boxen
|
|
62
|
+
- ⏳ Progress spinners with ora
|
|
63
|
+
- ✅ Visual confirmation of selections
|
|
64
|
+
- 🎯 Clear configuration summary before generation
|
|
65
|
+
- 🔗 Automatic dependency resolution (required overlays auto-selected)
|
|
66
|
+
- ⚠️ Conflict detection and resolution (e.g., docker-in-docker ↔ docker-sock)
|
|
67
|
+
- 🎚️ Port offset support for running multiple instances
|
|
68
|
+
|
|
69
|
+
### Non-Interactive Mode (For Automation)
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
npm run init -- --stack compose --language dotnet --database postgres
|
|
73
|
+
npm run init -- --stack plain --language nodejs --playwright --cloud-tools azure-cli,kubectl-helm
|
|
74
|
+
npm run init -- --stack compose --language nodejs --database postgres+redis --output ./my-project/.devcontainer
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Via npx (Once Published)
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
npx container-superposition init
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Enhanced User Experience
|
|
84
|
+
|
|
85
|
+
The tool provides a polished CLI experience using:
|
|
86
|
+
|
|
87
|
+
- **chalk** - Color-coded output for better readability
|
|
88
|
+
- **boxen** - Beautiful bordered boxes for headers and summaries
|
|
89
|
+
- **ora** - Elegant spinners during file operations
|
|
90
|
+
- **commander** - Robust argument parsing with built-in help
|
|
91
|
+
|
|
92
|
+
This makes the questionnaire more engaging and the output easier to scan.
|
|
93
|
+
|
|
94
|
+
## CLI Options
|
|
95
|
+
|
|
96
|
+
| Option | Description | Example |
|
|
97
|
+
| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------- |
|
|
98
|
+
| `--stack <name>` | Base template: `plain`, `compose` | `--stack compose` |
|
|
99
|
+
| `--language <name>` | Language/framework: `dotnet`, `nodejs`, `python`, `mkdocs` | `--language dotnet` |
|
|
100
|
+
| `--database <type>` | Database: `postgres`, `redis`, `mongodb`, `mysql`, `sqlserver`, `sqlite`, `minio` | `--database postgres` |
|
|
101
|
+
| `--observability <list>` | Observability tools: `otel-collector`, `jaeger`, `prometheus`, `grafana`, `loki` | `--observability jaeger,prometheus,grafana` |
|
|
102
|
+
| `--playwright` | Include Playwright browser automation | `--playwright` |
|
|
103
|
+
| `--cloud-tools <list>` | Cloud tools: `aws-cli`, `azure-cli`, `gcloud`, `kubectl-helm`, `terraform`, `pulumi` | `--cloud-tools aws-cli,kubectl-helm` |
|
|
104
|
+
| `--dev-tools <list>` | Development tools: `docker-in-docker`, `docker-sock`, `playwright`, `codex`, `git-helpers`, `pre-commit`, `commitlint`, `just`, `direnv`, `modern-cli-tools`, `ngrok` | `--dev-tools docker-in-docker,playwright` |
|
|
105
|
+
| `--port-offset <number>` | Add offset to all exposed ports (e.g., 100 makes Grafana 3100) | `--port-offset 100` |
|
|
106
|
+
| `-o`, `--output <path>` | Output directory (default: `./.devcontainer`) | `-o ./custom-path` |
|
|
107
|
+
| `-h`, `--help` | Show help | `--help` |
|
|
108
|
+
|
|
109
|
+
## What It Does
|
|
110
|
+
|
|
111
|
+
1. **Selects** the appropriate base template from `templates/`
|
|
112
|
+
2. **Composes** additional capabilities using overlays from `overlays/`
|
|
113
|
+
3. **Merges** features, environment variables, ports, and scripts
|
|
114
|
+
4. **Writes** a normal `.devcontainer/` folder you can edit directly
|
|
115
|
+
5. **Steps aside** — you own the output, not the tool
|
|
116
|
+
|
|
117
|
+
## Output Structure
|
|
118
|
+
|
|
119
|
+
After running the tool, you'll have:
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
.devcontainer/
|
|
123
|
+
├── devcontainer.json # Main configuration (editable!)
|
|
124
|
+
├── docker-compose.yml # Base compose file (if using compose template)
|
|
125
|
+
├── .env.example # Environment variables from selected overlays
|
|
126
|
+
├── scripts/
|
|
127
|
+
│ └── post_create.sh # Post-creation scripts
|
|
128
|
+
├── docker-compose.postgres.yml # (if postgres selected)
|
|
129
|
+
├── docker-compose.redis.yml # (if redis selected)
|
|
130
|
+
├── docker-compose.otel-collector.yml # (if otel-collector selected)
|
|
131
|
+
├── docker-compose.jaeger.yml # (if jaeger selected)
|
|
132
|
+
├── docker-compose.prometheus.yml # (if prometheus selected)
|
|
133
|
+
├── docker-compose.grafana.yml # (if grafana selected)
|
|
134
|
+
├── docker-compose.loki.yml # (if loki selected)
|
|
135
|
+
├── otel-collector-config.yaml # (if otel-collector selected)
|
|
136
|
+
├── prometheus.yml # (if prometheus selected)
|
|
137
|
+
├── grafana-datasources.yml # (if grafana selected)
|
|
138
|
+
└── loki-config.yaml # (if loki selected)
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
All `.env.example` files from selected overlays are automatically merged into a single file with all relevant environment variables.
|
|
142
|
+
|
|
143
|
+
## Available Templates
|
|
144
|
+
|
|
145
|
+
- **dotnet**: .NET 10 with C# Dev Kit, testing, and build tools
|
|
146
|
+
- **node-typescript**: Node.js LTS with TypeScript, ESLint, and Prettier
|
|
147
|
+
- **python-mkdocs**: Python 3 with MkDocs, Poetry, and documentation tools
|
|
148
|
+
- **fullstack**: Polyglot setup with Node.js + Python + tooling
|
|
149
|
+
|
|
150
|
+
## Available Overlays
|
|
151
|
+
|
|
152
|
+
Overlays add specific capabilities to your base template:
|
|
153
|
+
|
|
154
|
+
**Language & Framework:**
|
|
155
|
+
|
|
156
|
+
- **dotnet**: .NET 10 SDK with C# DevKit
|
|
157
|
+
- **nodejs**: Node.js LTS with TypeScript and tooling
|
|
158
|
+
- **python**: Python 3 with pip and development tools
|
|
159
|
+
- **mkdocs**: MkDocs documentation framework
|
|
160
|
+
|
|
161
|
+
**Databases:**
|
|
162
|
+
|
|
163
|
+
- **postgres**: PostgreSQL 16 + client tools
|
|
164
|
+
- **redis**: Redis 7 + redis-tools
|
|
165
|
+
|
|
166
|
+
**Observability:**
|
|
167
|
+
|
|
168
|
+
- **otel-collector**: OpenTelemetry Collector for trace/metric collection
|
|
169
|
+
- **jaeger**: Distributed tracing UI and storage
|
|
170
|
+
- **prometheus**: Metrics collection and alerting
|
|
171
|
+
- **grafana**: Visualization and dashboards (requires prometheus)
|
|
172
|
+
- **loki**: Log aggregation and querying
|
|
173
|
+
|
|
174
|
+
**Cloud Tools:**
|
|
175
|
+
|
|
176
|
+
- **aws-cli**: AWS command-line tools
|
|
177
|
+
- **azure-cli**: Azure command-line tools
|
|
178
|
+
- **kubectl-helm**: Kubernetes kubectl and Helm
|
|
179
|
+
|
|
180
|
+
**Dev Tools:**
|
|
181
|
+
|
|
182
|
+
- **docker-in-docker**: Docker daemon inside container (conflicts with docker-sock)
|
|
183
|
+
- **docker-sock**: Docker socket mounting (conflicts with docker-in-docker)
|
|
184
|
+
- **playwright**: Browser automation with Chromium
|
|
185
|
+
- **codex**: AI-powered code assistant
|
|
186
|
+
- **kubectl-helm**: Kubernetes CLI + Helm
|
|
187
|
+
|
|
188
|
+
## How Overlays Work
|
|
189
|
+
|
|
190
|
+
Each overlay is a composable package that can include:
|
|
191
|
+
|
|
192
|
+
```
|
|
193
|
+
overlays/postgres/
|
|
194
|
+
├── devcontainer.patch.json # Features, env vars, ports (merged into devcontainer.json)
|
|
195
|
+
├── docker-compose.yml # Service definition (copied as docker-compose.{overlay}.yml)
|
|
196
|
+
├── .env.example # Environment variables (merged into combined .env.example)
|
|
197
|
+
└── [additional files] # Config files, scripts, directories (copied as-is)
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
The tool intelligently handles each file type:
|
|
201
|
+
|
|
202
|
+
- **devcontainer.patch.json** - Deep-merged into devcontainer.json (arrays concatenated, objects merged)
|
|
203
|
+
- **docker-compose.yml** - Copied as `docker-compose.{overlay}.yml` and referenced in devcontainer.json
|
|
204
|
+
- **.env.example** - Content merged into combined `.env.example` in output
|
|
205
|
+
- **Other files/directories** - Copied as-is to output (e.g., `otel-collector.yml`, `config/redis.conf`)
|
|
206
|
+
|
|
207
|
+
This allows overlays to provide complete, self-contained configurations including any necessary config files.
|
|
208
|
+
|
|
209
|
+
## Guardrails
|
|
210
|
+
|
|
211
|
+
To prevent "tool rot" and stay humble:
|
|
212
|
+
|
|
213
|
+
1. **Never required for manual use** — templates remain first-class citizens
|
|
214
|
+
2. **One-command install** from a fresh clone: `npm run init`
|
|
215
|
+
3. **Output is editable** — not tied to the tool after generation
|
|
216
|
+
4. **No "update" command** — default is "generate once, edit forever"
|
|
217
|
+
5. **No DSL or custom schemas** — just plain JSON you already know
|
|
218
|
+
|
|
219
|
+
## Development
|
|
220
|
+
|
|
221
|
+
```bash
|
|
222
|
+
# Install dependencies
|
|
223
|
+
npm install
|
|
224
|
+
|
|
225
|
+
# Run the tool in dev mode (with tsx)
|
|
226
|
+
npm run init
|
|
227
|
+
|
|
228
|
+
# Build TypeScript to dist/
|
|
229
|
+
npm run build
|
|
230
|
+
|
|
231
|
+
# Run built version
|
|
232
|
+
npm run init:build
|
|
233
|
+
|
|
234
|
+
# Clean build artifacts
|
|
235
|
+
npm run clean
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
## Documentation
|
|
239
|
+
|
|
240
|
+
Complete documentation is available in the [/docs](../docs/) folder:
|
|
241
|
+
|
|
242
|
+
- **[Documentation Index](../docs/README.md)** - Complete documentation overview
|
|
243
|
+
- **[Publishing Guide](../docs/publishing.md)** - How to publish to npm
|
|
244
|
+
- **[Architecture](../docs/architecture.md)** - Design principles, composition algorithm, deep merge logic
|
|
245
|
+
- **[Dependencies](../docs/dependencies.md)** - Service dependencies, startup order, runServices configuration
|
|
246
|
+
- **[Creating Overlays](../docs/creating-overlays.md)** - Complete guide to creating new overlays
|
|
247
|
+
- **[UX Design](../docs/ux.md)** - Visual design, CLI enhancements, accessibility
|
|
248
|
+
- **[Examples](../docs/examples.md)** - Common usage patterns, observability stacks, customization
|
|
249
|
+
- **[Quick Reference](../docs/quick-reference.md)** - Quick lookup for templates, overlays, ports, commands
|
|
250
|
+
|
|
251
|
+
## Contributing
|
|
252
|
+
|
|
253
|
+
Want to add a new overlay or template?
|
|
254
|
+
|
|
255
|
+
1. **Template**: Add to `templates/<name>/.devcontainer/`
|
|
256
|
+
2. **Overlay**: Add to `overlays/<name>/`
|
|
257
|
+
- Required: `devcontainer.patch.json`
|
|
258
|
+
- Optional: `docker-compose.yml` for services
|
|
259
|
+
- Optional: `.env.example` for environment variables
|
|
260
|
+
- Optional: Any additional config files or directories
|
|
261
|
+
3. **Update questionnaire**: Edit `scripts/init.ts` to offer the new option
|
|
262
|
+
4. **Test**: Run `npm run init` and verify the output
|
|
263
|
+
|
|
264
|
+
All files in an overlay directory (except `devcontainer.patch.json` and `.env.example`) will be copied to the output. This allows you to include configuration files like `otel-collector.yml`, config directories, or any other files your overlay needs.
|
|
265
|
+
|
|
266
|
+
## Philosophy in Practice
|
|
267
|
+
|
|
268
|
+
This tool embodies the **container-superposition** principle:
|
|
269
|
+
|
|
270
|
+
> **Build a thin picker that outputs normal configurations, not a platform.**
|
|
271
|
+
|
|
272
|
+
If you find yourself tempted to add:
|
|
273
|
+
|
|
274
|
+
- A "sync" or "update" command → **Don't**. Output should be forkable.
|
|
275
|
+
- A custom DSL → **Don't**. Use standard JSON.
|
|
276
|
+
- Required preprocessing → **Don't**. Output should work standalone.
|
|
277
|
+
- Framework lock-in → **Don't**. Users should be able to delete this tool after using it.
|
|
278
|
+
|
|
279
|
+
## License
|
|
280
|
+
|
|
281
|
+
MIT
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://container-superposition.dev/schema/base-images.json",
|
|
4
|
+
"title": "Base Images Configuration",
|
|
5
|
+
"description": "Available base container images",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["base_images"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"base_images": {
|
|
10
|
+
"type": "array",
|
|
11
|
+
"items": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"required": ["id", "name", "description", "image"],
|
|
14
|
+
"properties": {
|
|
15
|
+
"id": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "Unique identifier for the base image",
|
|
18
|
+
"pattern": "^[a-z0-9-]+$"
|
|
19
|
+
},
|
|
20
|
+
"name": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "Human-readable name"
|
|
23
|
+
},
|
|
24
|
+
"description": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"description": "Description of the base image"
|
|
27
|
+
},
|
|
28
|
+
"image": {
|
|
29
|
+
"type": ["string", "null"],
|
|
30
|
+
"description": "Docker image reference (null for custom)"
|
|
31
|
+
},
|
|
32
|
+
"package_manager": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"description": "Package manager for this image",
|
|
35
|
+
"enum": ["apt", "apk"]
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"additionalProperties": false
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"additionalProperties": false
|
|
43
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://container-superposition.dev/schema/base-templates.json",
|
|
4
|
+
"title": "Base Templates Configuration",
|
|
5
|
+
"description": "Available base devcontainer templates",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["base_templates"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"base_templates": {
|
|
10
|
+
"type": "array",
|
|
11
|
+
"items": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"required": ["id", "name", "description"],
|
|
14
|
+
"properties": {
|
|
15
|
+
"id": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "Unique identifier for the template",
|
|
18
|
+
"enum": ["plain", "compose"]
|
|
19
|
+
},
|
|
20
|
+
"name": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "Human-readable name"
|
|
23
|
+
},
|
|
24
|
+
"description": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"description": "Description of the template type"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"additionalProperties": false
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"additionalProperties": false
|
|
34
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"title": "Container Superposition Configuration",
|
|
5
|
+
"description": "Configuration for initializing a devcontainer with container-superposition",
|
|
6
|
+
"properties": {
|
|
7
|
+
"stack": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"enum": ["plain", "compose"],
|
|
10
|
+
"description": "The base template to use (plain or compose)"
|
|
11
|
+
},
|
|
12
|
+
"baseImage": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"enum": ["bookworm", "trixie", "custom"],
|
|
15
|
+
"default": "bookworm",
|
|
16
|
+
"description": "Base Debian image version"
|
|
17
|
+
},
|
|
18
|
+
"customImage": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "Custom base image (only when baseImage is 'custom')"
|
|
21
|
+
},
|
|
22
|
+
"language": {
|
|
23
|
+
"type": "array",
|
|
24
|
+
"items": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"enum": ["dotnet", "nodejs", "python", "mkdocs"]
|
|
27
|
+
},
|
|
28
|
+
"default": [],
|
|
29
|
+
"description": "Language/framework overlays"
|
|
30
|
+
},
|
|
31
|
+
"database": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"enum": ["none", "postgres", "redis", "postgres+redis"],
|
|
34
|
+
"default": "none",
|
|
35
|
+
"description": "Database requirements"
|
|
36
|
+
},
|
|
37
|
+
"playwright": {
|
|
38
|
+
"type": "boolean",
|
|
39
|
+
"default": false,
|
|
40
|
+
"description": "Include Playwright for browser automation"
|
|
41
|
+
},
|
|
42
|
+
"cloudTools": {
|
|
43
|
+
"type": "array",
|
|
44
|
+
"items": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"enum": ["azure-cli", "aws-cli", "kubectl-helm", "docker-in-docker", "docker-sock"]
|
|
47
|
+
},
|
|
48
|
+
"default": [],
|
|
49
|
+
"description": "Cloud/orchestration tools to include"
|
|
50
|
+
},
|
|
51
|
+
"observability": {
|
|
52
|
+
"type": "array",
|
|
53
|
+
"items": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"enum": ["otel-collector", "jaeger", "prometheus", "grafana", "loki"]
|
|
56
|
+
},
|
|
57
|
+
"default": [],
|
|
58
|
+
"description": "Observability tools to include"
|
|
59
|
+
},
|
|
60
|
+
"portOffset": {
|
|
61
|
+
"type": "number",
|
|
62
|
+
"description": "Port offset for running multiple instances"
|
|
63
|
+
},
|
|
64
|
+
"outputPath": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"default": "./.devcontainer",
|
|
67
|
+
"description": "Where to write the devcontainer configuration"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"required": ["stack"]
|
|
71
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://container-superposition.dev/schema/overlay-manifest.json",
|
|
4
|
+
"title": "Overlay Manifest",
|
|
5
|
+
"description": "Metadata for a Container Superposition overlay",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["id", "name", "description", "category"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"id": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "Unique identifier for the overlay (must match directory name)",
|
|
12
|
+
"pattern": "^[a-z0-9-]+$"
|
|
13
|
+
},
|
|
14
|
+
"name": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"description": "Human-readable name for display in UI"
|
|
17
|
+
},
|
|
18
|
+
"description": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "One-line summary of what this overlay provides"
|
|
21
|
+
},
|
|
22
|
+
"category": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"description": "Category grouping for the overlay",
|
|
25
|
+
"enum": ["language", "database", "observability", "cloud", "dev", "preset"]
|
|
26
|
+
},
|
|
27
|
+
"supports": {
|
|
28
|
+
"type": "array",
|
|
29
|
+
"description": "Which base templates this overlay works with (empty = all)",
|
|
30
|
+
"items": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"enum": ["plain", "compose"]
|
|
33
|
+
},
|
|
34
|
+
"default": []
|
|
35
|
+
},
|
|
36
|
+
"requires": {
|
|
37
|
+
"type": "array",
|
|
38
|
+
"description": "Hard dependencies that must be automatically installed",
|
|
39
|
+
"items": {
|
|
40
|
+
"type": "string"
|
|
41
|
+
},
|
|
42
|
+
"default": []
|
|
43
|
+
},
|
|
44
|
+
"suggests": {
|
|
45
|
+
"type": "array",
|
|
46
|
+
"description": "Recommended overlays that work well together",
|
|
47
|
+
"items": {
|
|
48
|
+
"type": "string"
|
|
49
|
+
},
|
|
50
|
+
"default": []
|
|
51
|
+
},
|
|
52
|
+
"conflicts": {
|
|
53
|
+
"type": "array",
|
|
54
|
+
"description": "Overlays that cannot be used together",
|
|
55
|
+
"items": {
|
|
56
|
+
"type": "string"
|
|
57
|
+
},
|
|
58
|
+
"default": []
|
|
59
|
+
},
|
|
60
|
+
"tags": {
|
|
61
|
+
"type": "array",
|
|
62
|
+
"description": "Keywords for search and filtering",
|
|
63
|
+
"items": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"pattern": "^[a-z0-9-]+$"
|
|
66
|
+
},
|
|
67
|
+
"default": []
|
|
68
|
+
},
|
|
69
|
+
"ports": {
|
|
70
|
+
"type": "array",
|
|
71
|
+
"description": "Ports used by the overlay (for offset calculation)",
|
|
72
|
+
"items": {
|
|
73
|
+
"type": "integer",
|
|
74
|
+
"minimum": 1,
|
|
75
|
+
"maximum": 65535
|
|
76
|
+
},
|
|
77
|
+
"default": []
|
|
78
|
+
},
|
|
79
|
+
"order": {
|
|
80
|
+
"type": "integer",
|
|
81
|
+
"description": "Display order within category (lower = first)",
|
|
82
|
+
"minimum": 1
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"additionalProperties": false
|
|
86
|
+
}
|