A simple yet powerful CLI tool to generate complete Golang project templates with a single command.
- Generates a complete project structure in seconds
- Creates essential files (main.go, go.mod, .env, Makefile, README.md)
- Automatically initializes git repository
- Runs
go mod tidyto set up dependencies - Uses your local Go version for generated files
- Customizable project name
# Clone the repository
git clone https://github.com/vukyn/gobuild.git
cd gobuild
# Build the binary
go build -o gobuild
# Optional: Move to your PATH for global access
mv gobuild /usr/local/bin/go install github.com/vukyn/gobuild@latest# Simple usage
gobuild hello-world
# With custom go version
gobuild hello-world --go 1.24.2
# With a preset
gobuild my-service --preset platform-service
gobuild my-device --preset iotSelect a preset with --http-template/--preset (default base):
- base — plain "hello world" Go project (
main.go,go.mod,.env,Makefile,README.md,.gitignore,todo). - fiber — Fiber v3 HTTP server with a
/healthendpoint and graceful shutdown. - platform-service — full clean-architecture Go service (Fiber v2, Bun/SQLite, sarulabs/di, kuery) with an example
itemdomain and DI wiring. - iot — minimal ESP32-S3 firmware skeleton (C++/PlatformIO, non-Go). Renders
platformio.ini(single esp32-s3 env pinning the sharedkuinolib), a thinsrc/main.cppwired tokuino::wifi,include/config.h.example,.gitignore,README.md,CLAUDE.md.go mod tidyis skipped (nogo.mod).
The tool generates the following structure:
hello-world/
├── .env # Environment variables
├── Makefile # Common development commands
├── README.md # Project documentation
├── go.mod # Go module configuration
├── todo # Todo list
└── main.go # Main application entry point
$ gobuild awesomeproject
$ Successfully created awesomeproject project template!
$ Running go mod tidy...
$ Initializing git repository...
$ Initialized empty Git repository in /Users/username/awesomeproject/.git/
$ Project setup complete, you are ready to go!
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.