Devbox Reproducible Dev Environments Prompt
Stand up reproducible, isolated developer environments with Devbox (Nix under the hood) — pinned toolchains, per-project shells, init scripts, and CI parity — without forcing the team to learn Nix.
- Target user
- Developers and platform teams standardizing local toolchains
- Difficulty
- Beginner
- Tools
- Claude, ChatGPT
The prompt
You are a developer-experience engineer who has rolled out Devbox to teams to kill "works on my machine" without making everyone learn Nix. I will provide: - The project's stack (languages, runtimes, CLIs, databases) - Current onboarding pain (version drift, brew chaos, slow setup) - OS mix on the team (macOS/Linux/WSL) - Whether I also want the same environment in CI Your job: 1. **Why Devbox** — explain that it wraps Nix to give a pinned, isolated, per-project shell from a simple `devbox.json`, and compare it briefly to Docker dev containers and plain Nix flakes for my case. Be honest about limitations. 2. **devbox.json design** — define `packages` with explicit versions, `env` variables, and `shell.init_hook` for setup. Show a complete annotated example for my stack. 3. **Pinning and reproducibility** — explain `devbox.lock`, how to update packages deliberately, and how to search for available package versions. 4. **Scripts** — define `shell.scripts` (e.g. `test`, `lint`, `db:up`) so the team runs tasks the same way everywhere. 5. **Services** — use Devbox services/process-compose to run local dependencies (Postgres, Redis) without global installs or Docker, if appropriate. 6. **Onboarding flow** — the new-hire path: install Devbox, `devbox shell`, done. Show what that replaces. 7. **CI parity** — run the exact same environment in CI with the Devbox GitHub Action (or `devbox run`), so local and CI toolchains match by construction. 8. **Editor integration** — direnv + `devbox generate direnv` so the shell activates automatically on `cd`. 9. **Adoption plan** — how to introduce it incrementally without disrupting people mid-sprint, and a fallback if someone hits a missing package. Output as: (a) a complete annotated `devbox.json`, (b) the onboarding README snippet, (c) the CI config using Devbox, (d) direnv setup, (e) a migration plan from the current setup. Pin everything and keep the lockfile committed; reproducibility is the whole point.
Run this prompt with AI
Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.
Related prompts
-
IaC Module Documentation Generator Prompt
Generate clear, consumable documentation for an infrastructure-as-code module, role, or chart — inputs, outputs, examples, requirements, and an upgrade note — so consumers adopt the paved road without reading the source, across any IaC tool.
-
NixOS Module & Options Design Prompt
Design a clean NixOS module with typed options, sensible defaults, and assertions so a service is configured declaratively and consumers can't set it into an invalid state.
-
Nix Flakes Reproducible Infrastructure Prompt
Use Nix flakes to pin reproducible build/dev environments and declarative server config (NixOS / nixos-rebuild / deploy-rs) so 'works on my machine' and drift both disappear.
-
AWS CDK Escape Hatches & L1 Override Prompt
Use CDK escape hatches (addPropertyOverride, addOverride, addDeletionOverride, and L2-to-L1 access) to set properties the L2 construct does not expose, without forking constructs or dropping to raw CloudFormation.
More Infrastructure as Code prompts & error guides
Browse every Infrastructure as Code prompt and troubleshooting guide in one place.
Reading prompts? Get all 500 in one free PDF
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.