Inspired by go-blueprint, I aim to develop a modern CLI tool that generates Go web projects. go-symphony produces Go applications utilizing the Gin framework, PostgreSQL database, and SQLC for type-safe queries. My motivation stems from exclusively employing Gin as an API server and PostgreSQL as my database, eliminating the need for alternative options. Having recently adopted Supabase extensively, I intend to integrate its capabilities into this project. Finally, as I use SvelteKit or Next.js to build the front-end, so I incorporate it into go-symphony.
Check out a video walkthrough of go-symphony in action: YouTube Demo
go install github.com/Tomlord1122/go-symphony@latest
Download the latest binary from GitHub Releases.
git clone https://github.com/Tomlord1122/go-symphony.git
cd go-symphony
go build -o go-symphony .
--git stage or --git commitUse this when you want prompts:
go-symphony create
Use advanced feature prompts:
go-symphony create --advanced
Use this when scripting or working with an AI agent:
go-symphony create \
--name github.com/acme/my-api \
--driver postgres \
--feature sqlc \
--feature docker \
--frontend none \
--git skip \
--no-interactive
go-symphony create \
--name github.com/acme/my-api \
--driver postgres \
--feature sqlc \
--frontend none \
--git skip \
--no-interactive \
--dry-run
plan is the agent-friendly preview command. It validates the input and prints the scaffold steps without creating files.
go-symphony plan \
--name github.com/acme/my-api \
--driver postgres \
--feature sqlc \
--feature docker \
--frontend sveltekit \
--sveltekit-template minimal \
--sveltekit-types ts \
--sveltekit-package-manager pnpm \
--git skip
Both create --dry-run and plan support JSON output.
go-symphony plan \
--name github.com/acme/my-api \
--driver supabase \
--supabase-mode init-only \
--frontend none \
--git skip \
--output json
Use --skip-install when you only want the scaffolded files and want to run dependency/bootstrap steps later.
go-symphony create \
--name github.com/acme/my-api \
--driver postgres \
--feature docker \
--frontend none \
--git skip \
--no-interactive \
--skip-install
go-symphony now works well in an AI-assisted workflow because it supports:
--no-interactive for deterministic execution--dry-run for previewing the scaffold planplan for a dedicated planning step--output json for machine-readable output--skip-install for file generation without dependency/bootstrap side effectsRecommended AI workflow:
create with the same flags.Example:
go-symphony plan \
--name github.com/acme/my-api \
--driver postgres \
--feature sqlc \
--feature githubaction \
--frontend none \
--git skip \
--output json
go-symphony create \
--name github.com/acme/my-api \
--driver postgres \
--feature sqlc \
--feature githubaction \
--frontend none \
--git skip \
--no-interactive \
--skip-install
There is also a reusable go-symphony skill definition available in the tomtom-skill repository:
../tomtom-skill/skills/go-symphony/SKILL.mdpostgressupabasenonesqlcdockergithubactionwebsocketsveltekitnextjsnonecommitstageskipinit-onlylocal-dbTypical backend output:
your-project/
βββ cmd/api/main.go
βββ internal/
β βββ server/
β βββ database/
βββ Makefile
βββ README.md
βββ .env
βββ .air.toml
βββ .gitignore
Optional additions depend on selected features:
sqlc/ for SQLC migrations and queriessupabase/ for Supabase bootstrap files.github/workflows/ for GitHub ActionsDockerfile and docker-compose.yml only when feature=docker is enabled<project>-frontend/ for SvelteKit or Next.jsAfter generating a project:
cd your-project
# Start the generated Go server
make run
# Optional: start the Postgres container
make docker-run
# Optional: generate SQLC code
make sqlc-generate
# Optional: run tests
make test
# Optional: build the project
make build
If you want generated Docker assets, include --feature docker when creating the project.
go-symphony create [flags]
go-symphony plan [flags]
go-symphony version
We welcome contributions! Please see our contributing guidelines:
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSE file for details.