InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now. Learn more →
Top 22 Go Codegen Projects
-
Wire is a compile-time dependency injection tool developed by Google. It generates Go code that manually wires dependencies before compilation, ensuring that there is no runtime overhead.
-
InfluxDB
InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
-
To take a more in-depth look at how GraphQL works, check out this project built using Go and gqlgen.
-
-
With tools like ogen[1], one can take a single Swagger or OpenAPI doc and generate server code with request/response validation, Prometheus metrics, OpenTelemetry, and more.
It can also generate clients and webhooks. Authentication is just declaring a SecurityScheme in the OpenAPI documentation then implementing a single function. The rest of the backend is just implementing a single interface. Unlike oapi-codegen, there is no need to tinker with middleware for authentication or logging.
Pair this with a tool like sqlc[2] and SQLite's `pragma user_version`, and you get type-safe database code and database migrations for free. I will concede that adding SQLite is a manual process, but its just two imports added to main.go.
Frontend is entirely your choice. Go's standard library provides good enough text templating that I don't miss ERB or Django-style templates. Using embed/fs, one can easily embed a bunch of assets into a single static binary, so deployment can be as simple as `go build` and moving a single binary.
I actually have a hard time using languages besides Go for developing backends, because the code generation tools eliminate the boilerplate I frequently face in other languages while also avoiding the hundreds of dependencies that Spring Boot or Quarkus need.
[1] https://ogen.dev/
-
-
vtprotobuf
A Protocol Buffers compiler that generates optimized marshaling & unmarshaling Go code for ProtoBuf APIv2
-
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
shortlink
Shortlink service (Microservice example) ⭐️ Star the repo if you like it! (by shortlink-org)
-
-
-
-
-
-
-
-
-
-
structuresmith
Validate, Diff, Render - A powerful tool designed to automate the generation of project files using customizable templates.
-
Project mention: Ask HN: Is there any software you only made for your own use but nobody else? | news.ycombinator.com | 2024-07-04
I’ve spent five years and 100KLoC building https://github.com/kyleu/projectforge which helps generate and update other Golang projects I maintain. I use it daily.
-
-
Project mention: A compiler/code generator for the Concise Data Definition Language(RFC 8610) | news.ycombinator.com | 2024-10-24
-
terraform-provider-hashicups
(Template, Clone this to get started) Terraform provider for Hashicups. (by speakeasy-sdks)
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
Go Codegen discussion
Go Codegen related posts
-
Show HN: Protobuf-go-lite: reflection-free protobuf for Go with JSON support
-
Navigating System Communication: A Comprehensive Overview
-
GraphQL Types
-
@Autowired magic in SpringBoot
-
Show HN: Structuresmith – Generate Project Files and Templates for Consistency
-
vektra/mockery has fully released the "packages" feature! This blog explains what it is and how it works.
-
GitHub - Warashi/compgen: Compgen is a gqlgen plugin designed to simplify the generation of ComplexityRoot for gqlgen.
-
A note from our sponsor - InfluxDB
www.influxdata.com | 21 May 2025
Index
What are some of the best open-source Codegen projects in Go? This list will help you:
# | Project | Stars |
---|---|---|
1 | wire | 13,746 |
2 | gqlgen | 10,334 |
3 | moq | 2,077 |
4 | ogen | 1,706 |
5 | genqlient | 1,206 |
6 | vtprotobuf | 976 |
7 | oto | 838 |
8 | shortlink | 764 |
9 | tygo | 722 |
10 | interfaces | 430 |
11 | kyaml2go | 284 |
12 | options-gen | 90 |
13 | sqlgen | 84 |
14 | githubevents | 80 |
15 | gut | 72 |
16 | gomarvin | 57 |
17 | revgen | 43 |
18 | structuresmith | 33 |
19 | projectforge | 18 |
20 | sqlc-gen-fsharp | 18 |
21 | cddlc | 8 |
22 | terraform-provider-hashicups | 3 |