Skip to content

Repository files navigation

Goscaff

Goscaff Banner

Instant Go project scaffolding CLI.
Generate production-ready Go backend projects in seconds with an interactive wizard or automation-friendly flags.


✨ Features

  • 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

Installation

Using Go

go install github.com/nbintang/goscaff@latest

Make sure your Go binary directory is available in your PATH.

export PATH=$PATH:$(go env GOPATH)/bin

Verify installation:

goscaff --help

Quick Start

Create a new project:

goscaff new myapp

The 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

Non-Interactive Mode

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-fx

Specify a custom module path:

goscaff new myapp \
  --module github.com/username/myapp

You can also specify a template directly:

goscaff new myapp \
  --template gin-postgres-uber-fx-modular

Available Options

Frameworks

Value Description
gin Gin Framework
fiber Fiber Framework

Databases

Value Description
postgres PostgreSQL
mysql MySQL

Architectures

Value Description
modular Feature-based modular architecture
layered Traditional layered architecture
full-setup Production-ready full project structure

Dependency Injection

Value Description
none No DI container
uber-dig Uber Dig
uber-fx Uber Fx

Command Reference

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 ID

See all available options:

goscaff new --help

Example

goscaff new awesome-api \
  --module github.com/acme/awesome-api \
  --framework fiber \
  --db postgres \
  --architecture modular \
  --di uber-fx

Philosophy

goscaff 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.

Contributing

Contributions are welcome.

  1. Fork the repository.
  2. Create a feature branch.
  3. Commit your changes.
  4. Open a Pull Request.

License

MIT License

About

Goscaff is a Go-based CLI tool for scaffolding production-ready backend projects. It generates a structured boilerplate with architecture, modular templates, and sensible defaults so you can start building immediately instead of setting up from scratch

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages