Overview
The setup wizard is an interactive command-line tool that configures your freshly scaffolded project by removing infrastructure and packages you don’t need. It runs once after you clone the template, leaving you with a clean, tailored codebase.The setup wizard is destructive—it deletes files and code. Run it immediately after scaffolding your project, before making any changes.
How It Works
The wizard uses comment markers in source files to identify removable sections:# [docker] and # [/docker] is automatically removed.
Configuration Steps
The wizard walks you through four configuration screens:Docker Support
Includes: Choose Yes if:
Dockerfile, compose.yaml, .dockerignore, and Docker-related Makefile targets- You want containerized deployments
- You need Docker Compose for development
- You want hot reload with
docker compose watch
- You’re deploying directly to VMs or serverless
- You prefer local development without containers
PostgreSQL Support
Includes: Choose Yes if:
pkg/db/ directory, sqlc queries, goose migrations, database Makefile targets- Your application needs persistent storage
- You want type-safe database queries
- You need relational data management
- Your app is stateless
- You’re using a different database (MongoDB, Redis, etc.)
- You don’t need persistence
PostgreSQL Hosting (conditional)
This screen only appears if you selected both Docker and PostgreSQL:
- Docker: Includes a postgres service in
compose.yamlandmake dbcommand - External: Removes Docker postgres; you’ll provide your own database URL
Optional Packages
Select which utility packages to include. All are pre-selected by default:
Package Details
HTTP Client
HTTP Client
Location: Keep this if you’re building scrapers or need to bypass bot detection.
pkg/client/Advanced HTTP client with:- TLS fingerprinting to mimic real browsers (Chrome, Firefox, Safari)
- HTTP/2 fingerprint control
- Proxy support (HTTP, SOCKS5)
- Cookie jar with domain-based management
- Automatic decompression
Worker Pool
Worker Pool
Location: Keep this for concurrent job processing, scraping, or API calls.
pkg/worker/Bounded concurrency primitives for parallel processing:Retry
Retry
Location: Keep this for network operations, API calls, or database connections.
pkg/retry/Exponential backoff with full jitter for transient errors:State
State
Location: Keep this for resumable scrapers, progress tracking, or single-instance enforcement.
pkg/state/File-backed JSON persistence with cross-platform file locking:Cycle
Cycle
Location: Keep this for proxy rotation, account switching, or load distribution.
pkg/cycle/Thread-safe round-robin rotator for files:Fake Data
Fake Data
Location:
pkg/fake/Helpers for generating realistic test data.Keep this for testing, seeding databases, or development fixtures.What Gets Removed
The setup wizard cleans up your project by:- Deleting entire directories for deselected packages
- Removing tagged sections from files (Makefile, .env.example, etc.)
- Cleaning up compose.yaml by removing unused services
- Removing itself (
cmd/setup/directory) after completion - Running
go mod tidyto remove unused dependencies
Re-running Setup
If you need to adjust your configuration after setup:- Add packages: Copy the package directory from the original template
- Remove packages: Delete the package directory and run
go mod tidy - Change Docker/PostgreSQL: Manually edit or restore relevant files
Advanced Customization
Before running the setup wizard, you can customize the removal logic:Adding Custom Tags
Define new tags incmd/setup/feature.go:
Custom Removal Rules
Add your feature to theoptionalPackages slice:
Troubleshooting
Setup wizard not found
Setup wizard not found
Make sure you’re in the project root directory and haven’t run setup yet:If missing, the wizard has already run and deleted itself.
Import errors after setup
Import errors after setup
Run The setup wizard does this automatically, but manual changes may require it again.
go mod tidy to clean up dependencies:Need to restore removed packages
Need to restore removed packages
Copy the package directory from the original template:
Next Steps
Development Workflow
Learn about available make commands and development practices
Project Structure
Understand the organization of your configured project
