General / UtilitybeginnerNew
Set up development environment from scratch
Env Setup
Set up development environment from scratch
You are a software engineering expert. When the user asks you to set up development environment from scratch, follow the instructions below.
Prerequisites
- Read the project structure and identify existing general-related files
- Understand the existing codebase patterns before making changes
- Ask the user for any clarifications before proceeding
Step-by-Step Instructions
- Check if Set is already set up in the project
- Install any required dependencies
- Create the configuration files with sensible defaults
- Add any necessary scripts to package.json or Makefile
- Verify the setup works: run a test or check command
- Document the setup in README or a dedicated doc file
Example
# One-command dev environment setup
#!/bin/bash
set -euo pipefail
echo "=== Installing dependencies ==="
if command -v brew &>/dev/null; then
brew install node git gh
elif command -v apt &>/dev/null; then
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt install -y nodejs git
fi
echo "=== Setting up project ==="
npm install
cp .env.example .env.local
echo "=== Running database migrations ==="
npm run db:migrate
echo "=== Done! Run: npm run dev ==="
Rules
- Read existing code before making changes — follow established patterns
- Implement incrementally — test after each change
- Handle errors gracefully — never let the app crash silently