Write a Dev Environment Setup Script
Generate a shell script that sets up a complete development environment from scratch.
The Prompt
Write a shell script that sets up a complete development environment. Requirements: 1. Check for and install required tools (Homebrew, nvm, Docker, etc.) 2. Set up environment variables (.env file from .env.example) 3. Install dependencies (npm install / pip install / etc.) 4. Run database migrations 5. Seed development data 6. Idempotent — safe to run multiple times 7. Clear progress messages with color coding 8. Error handling — stop and explain if any step fails Project stack: [DESCRIBE YOUR STACK — e.g., Node.js 20 app with PostgreSQL, requires Docker for the database, Redis for caching, and a local .env with DATABASE_URL and REDIS_URL] OS target: [MACOS / LINUX / BOTH]
Example Output
Generated a 120-line bash setup script that checks for brew/nvm/docker, installs missing tools, creates .env from .env.example with prompts for missing secrets, starts Docker services, runs npm install and prisma migrate dev, seeds the database, and prints a success summary.
FAQ
Which AI model is best for Write a Dev Environment Setup Script?
Claude Sonnet 4 — writes careful shell scripts with proper error handling.
How do I use the Write a Dev Environment Setup Script prompt?
Copy the prompt, replace the [BRACKETED] placeholders with your specific information, and paste into your preferred AI assistant (ChatGPT, Claude, Gemini, etc.). Generated a 120-line bash setup script that checks for brew/nvm/docker, installs missing tools, creates .env from .env.example with prompts for missing secrets, starts Docker services, runs npm install and prisma migrate dev, seeds the database, and prints a success summary.
Model Recommendation
Claude Sonnet 4 — writes careful shell scripts with proper error handling.