Skip to content

nbintang/goscaff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gemini_Generated_Image_t7f4pjt7f4pjt7f4

goscaff

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.


Features

  • Instant setup — create a new Go project with one command
  • 🧱 Presetsbase (minimal) and full (production-ready)
  • 🧩 Flexible architecture — no forced DI or framework coupling
  • 📦 Go modules readygo.mod generated 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

Installation

Using Go

go install github.com/nbintang/goscaff@latest

Ensure $GOPATH/bin or $HOME/go/bin is in your PATH.


Usage

Create a new project (default: base preset)

goscaff new myapp

This will:

  • Create a myapp directory
  • Scaffold the base project structure
  • Generate go.mod
  • Run go mod tidy
  • Initialize a git repository
  • Print clear next steps to run the project

Specify module path (optional)

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

If --module is omitted, the module name defaults to the project name.


Use full preset

goscaff new myapp --preset full

The full preset includes additional infrastructure and production-oriented defaults.


Choose database (full preset only)

goscaff new myapp --preset full --db mysql

Supported databases:

  • postgres (default)
  • mysql

Database overlays are applied only for the full preset. The base preset stays minimal.


Example Project Structure

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

Philosophy

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

Contributing

Contributions are welcome!

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit 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

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages