Instant Go project scaffolding CLI.
goscaff is a lightweight Go CLI tool that scaffolds clean, production-ready Go backend projects in seconds—without boilerplate fatigue or framework lock-in.
- ⚡ Instant setup — create a new Go project with one command
- 🧱 Presets —
base(minimal) andfull(production-ready) - 🧩 Flexible architecture — no forced DI or framework coupling
- 📦 Go modules ready —
go.modgenerated automatically - 🧰 Git initialized — repository ready out of the box
- 🌱 Environment files included —
.env,.env.example,.env.local - 🎨 Clean CLI output — readable, colored progress & next-steps
go install github.com/nbintang/goscaff@latestEnsure $GOPATH/bin or $HOME/go/bin is in your PATH.
goscaff new myappThis will:
- Create a
myappdirectory - Scaffold the base project structure
- Generate
go.mod - Run
go mod tidy - Initialize a git repository
- Print clear next steps to run the project
goscaff new myapp --module github.com/username/myappIf --module is omitted, the module name defaults to the project name.
goscaff new myapp --preset fullThe full preset includes additional infrastructure and production-oriented defaults.
goscaff new myapp --preset full --db mysqlSupported databases:
postgres(default)mysql
Database overlays are applied only for the
fullpreset. Thebasepreset stays minimal.
myapp/
├── cmd/
│ └── api/
│ │ └── main.go
│ └── migrate
│ │ └── main.go
│ └── ...
│
├── internal/
│ ├── auth/
│ ├── apperr/
│ ├── infra/
│ │ ├── database/
│ │ ├── cache/
│ │ └── ...
│ ├── http/
│ └── ...
│
├── pkg/
│ ├── env/
│ ├── slice/
│ └── ...
├── .env
├── .env.example
├── .env.local
├── go.mod
└── README.md
goscaff is designed with a few simple principles:
- Minimal by default — start clean, add complexity only when needed
- Fast feedback — scaffolding should take seconds, not minutes
- Structure without lock-in — you own the architecture decisions
Contributions are welcome!
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
MIT License