Instant Go project scaffolding CLI.
Generate production-ready Go backend projects in seconds with an interactive wizard or automation-friendly flags.
- ⚡ Interactive wizard — generate projects through a simple step-by-step CLI
- 🚀 Multiple frameworks — Gin and Fiber
- 🗄️ Database selection — PostgreSQL and MySQL
- 🏗️ Architecture options — Modular, Layered, and Full Setup
- 🔌 Optional Dependency Injection — None, Uber Dig, or Uber Fx
- 📦 Go Modules ready — automatically generates
go.mod - 🔧 Git initialized — project is ready to use immediately
- 🎨 Clean CLI output — colorful progress, configuration summary, and next steps
- 🤖 Automation friendly — fully configurable using command-line flags
go install github.com/nbintang/goscaff@latestMake sure your Go binary directory is available in your PATH.
export PATH=$PATH:$(go env GOPATH)/binVerify installation:
goscaff --helpCreate a new project:
goscaff new myappThe interactive wizard will guide you through:
? Select framework
❯ Gin
Fiber
? Select database
❯ PostgreSQL
MySQL
? Select architecture
❯ Modular
Layered
Full Setup
? Dependency Injection
❯ None
Uber Dig
Uber Fx
? Module path
❯ myapp
Configuration
Project Name : myapp
Module Path : myapp
Framework : Gin
Database : PostgreSQL
Architecture : Modular
DI : Uber Fx
? Continue?
Then goscaff will automatically:
- Create the project directory
- Generate project files
- Create
go.mod - Run
go mod tidy - Initialize Git
- Display the next steps
Perfect for automation or CI.
Generate a Gin project using PostgreSQL, Modular architecture, and Uber Fx:
goscaff new myapp \
--framework gin \
--db postgres \
--architecture modular \
--di uber-fxSpecify a custom module path:
goscaff new myapp \
--module github.com/username/myappYou can also specify a template directly:
goscaff new myapp \
--template gin-postgres-uber-fx-modular| Value | Description |
|---|---|
gin |
Gin Framework |
fiber |
Fiber Framework |
| Value | Description |
|---|---|
postgres |
PostgreSQL |
mysql |
MySQL |
| Value | Description |
|---|---|
modular |
Feature-based modular architecture |
layered |
Traditional layered architecture |
full-setup |
Production-ready full project structure |
| Value | Description |
|---|---|
none |
No DI container |
uber-dig |
Uber Dig |
uber-fx |
Uber Fx |
goscaff new [project-name]
Flags:
--module Go module path
--framework gin | fiber
--db postgres | mysql
--architecture modular | layered | full-setup
--di none | uber-dig | uber-fx
--template Template IDSee all available options:
goscaff new --helpgoscaff new awesome-api \
--module github.com/acme/awesome-api \
--framework fiber \
--db postgres \
--architecture modular \
--di uber-fxgoscaff follows a few simple principles:
- Simple by default — generate projects without unnecessary complexity.
- Interactive first — sensible defaults through an intuitive wizard.
- Flexible — choose only the technologies you need.
- Automation friendly — every interactive option has a corresponding CLI flag.
- Production-ready — generated projects follow clean and maintainable structures.
Contributions are welcome.
- Fork the repository.
- Create a feature branch.
- Commit your changes.
- Open a Pull Request.
MIT License