Skip to content

Repository files navigation

gobuild - Basic Golang Project Template Generator

A simple yet powerful CLI tool to generate complete Golang project templates with a single command.

Ask DeepWiki

Features

  • 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 tidy to set up dependencies
  • Uses your local Go version for generated files
  • Customizable project name

Installation

From Source

# 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/

Using Go Install

go install github.com/vukyn/gobuild@latest

Usage

# 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 iot

Presets

Select 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 /health endpoint and graceful shutdown.
  • platform-service — full clean-architecture Go service (Fiber v2, Bun/SQLite, sarulabs/di, kuery) with an example item domain and DI wiring.
  • iot — minimal ESP32-S3 firmware skeleton (C++/PlatformIO, non-Go). Renders platformio.ini (single esp32-s3 env pinning the shared kuino lib), a thin src/main.cpp wired to kuino::wifi, include/config.h.example, .gitignore, README.md, CLAUDE.md. go mod tidy is skipped (no go.mod).

Generated Project Structure

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

Example Output

$ 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!

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

CLI tool to generate complete Golang project templates with a single command.

Topics

Resources

Stars

Watchers

Forks

Used by

Contributors

Languages