Cara Setup Environment Development Instan dengan Claude Code
PC baru atau proyek baru, Claude Code menangani setup dev environment dalam hitungan menit.
Ever spent half a day setting up a dev environment on a new PC or for a new project? With Claude Code, it takes minutes.
1. Scaffold a New Project
Stand up a project from zero.
mkdir my-app && cd my-app
claude -p "
Set up a Next.js 15 + TypeScript + Tailwind CSS + Prisma + PostgreSQL project.
Include:
- ESLint + Prettier config
- Vitest setup
- Docker Compose (PostgreSQL)
- .env.example
- GitHub Actions CI
- CLAUDE.md
Run npm install when done.
"
In 5 minutes you get a best-practice project ready to go.
2. Bootstrap an Existing Repo
After cloning a team repo, automate the setup.
git clone https://github.com/team/project.git
cd project
claude -p "
Set up the dev environment for this project.
Read README.md and package.json, then:
- Install dependencies
- Set up env vars (.env.example -> .env)
- Set up the database
- Run migrations
- Start the dev server to verify
If errors occur, fix them automatically.
"
It reads the README, parses package.json, runs commands in order, and auto-fixes errors along the way.
3. Docker Environment
Docker Compose config in one shot.
claude -p "
Create a docker-compose.yml with:
- PostgreSQL 16 (port 5432)
- Redis 7 (port 6379)
- MinIO S3-compatible (ports 9000/9001)
Include health checks, volume persistence, and .env variable loading.
Run docker compose up -d.
"
4. Editor Config Standardization
Align everyone’s editor settings.
claude -p "
Create VS Code config files:
.vscode/settings.json:
- Auto-format on save with Prettier
- TypeScript strict mode
- Auto-sort imports
.vscode/extensions.json:
- Recommended extensions for the team
.editorconfig:
- 2-space indent
- Trim trailing whitespace
- Final newline
"
Commit to Git and every team member works with the same settings. See Team Collaboration Guide.
5. CI/CD Pipeline
Auto-generate GitHub Actions.
claude -p "
Create a GitHub Actions workflow for this project:
- On push: lint -> typecheck -> test -> build
- On PR: above + coverage report
- On main merge: above + deploy to Cloudflare Pages
"
See CI/CD Setup Guide.
6. Environment Variable Management
Keep .env.example in sync automatically.
claude -p "
Scan all files for process.env.XXX references.
Output a complete .env.example with dummy values.
If .env.example exists, only add missing vars.
"
Never forget to update .env.example when adding new env vars.
7. Record Setup Steps in CLAUDE.md
Save the setup procedure so it auto-replays for new members.
claude -p "
Add a '## Environment Setup' section to CLAUDE.md.
Document every step from clone to running dev server.
"
Next time someone joins, Claude Code reads CLAUDE.md and sets up automatically. See CLAUDE.md Best Practices.
Gotchas
Node.js Version Management
Use .nvmrc or .node-version — Claude Code auto-detects them.
Docker Permission Issues
On Linux/WSL, permission errors are common. Just tell Claude Code “fix this Docker error.”
Apple Silicon vs Intel
Build behavior differs. Note it in CLAUDE.md and Claude Code adapts.
Conclusion
- New project scaffolding in 5 minutes
- Existing project setup automated (including error recovery)
- Docker, editor, CI/CD configs generated in one shot
- Env var management with zero drift
- CLAUDE.md preserves setup steps for the team
Dev environment setup has moved from “manual labor” to “ask Claude Code.” See the Anthropic Claude Code docs.
Tingkatkan alur kerja Claude Code kamu
50 template prompt yang sudah teruji, siap copy-paste ke Claude Code sekarang juga.
PDF Gratis: Cheatsheet Claude Code dalam 5 Menit
Cukup masukkan emailmu dan kami akan langsung mengirim cheatsheet PDF A4 satu halaman.
Kami menjaga data pribadimu dengan aman dan tidak pernah mengirim spam.
Tentang Penulis
Masa
Engineer yang aktif menggunakan Claude Code. Mengelola claudecode-lab.com, media teknologi 10 bahasa dengan lebih dari 2.000 halaman.
Artikel Terkait
Cara Memangkas Waktu Onboarding Engineer Baru dengan Claude Code
Ubah ramp-up 3 bulan menjadi 2 minggu. Jadikan Claude Code copilot untuk codebase, environment, dan PR pertama.
Cara Memvisualisasikan dan Mengurangi Tech Debt Secara Sistematis dengan Claude Code
Tech debt yang tidak dilunasi menguras velocity engineering. Pelajari cara memunculkan, memprioritaskan, dan melunasinya secara bertahap dengan Claude Code.
Cara Mempercepat Desain REST API dengan Claude Code
Dari desain endpoint hingga OpenAPI, validasi, dan error handling. Claude Code sebagai mitra desain API.