Part 13 of the GoWind series. The framework posts covered how one YAML assembles a microservice and how plugins extend it. This one is the tool that fills in the remaining boilerplate: GoWind Toolkit — the gow CLI (11 subcommands), 7 protoc plugins, and a Wails-based desktop client, MIT-licensed.
The idea: kill repetitive CRUD, not by hiding it, but by generating it
The toolkit is a development tool, not a runtime dependency — nothing it generates requires the framework at runtime. The core workflows:
1. From database to full service
Point gow at MySQL / PostgreSQL / SQLite / Oracle and it generates the whole Kratos service chain: Ent or GORM models, Protobuf API definitions, gRPC + REST implementations, Wire dependency injection — wired into a runnable service.
2. From Go source, no database needed
The unusual one: schema sources ent:// and gorm:// read your existing Ent/GORM model definitions straight from Go source and generate CRUD from them. If your project already has models, you skip the database-introspection step entirely — generation becomes a purely compile-time, in-repo affair.
3. Frontend projects in one click
The desktop client (gowind-uiapp, Vue 3 + Wails v2) generates three complete frontend projects from the same API: Vue3 + Element Plus, Vue3 + Vben, React + Ant Design Pro. Same contract, three stacks, your pick — consistent with the family's one-backend-many-frontends approach.
Schema inputs for backend generation: a live database, an OpenAPI document, or ent:///gorm:// Go source.
The CLI surface
go install github.com/tx7do/go-wind-toolkit/gowind/cmd/gow@latest | Subcommand | What it does |
|---|---|
new | project scaffold |
add service | add a microservice to a project |
generate | code generation |
extract | extract a microservice module out of a project |
run / build | service lifecycle |
ent / wire / api | Ent models, Wire DI, Protobuf API definitions |
extract is the one worth calling out: it pulls a module out of a monolith into its own service — the escape hatch that makes the monolith↔microservices switch a refactor instead of a rewrite.
The protoc plugins
Seven plugins extend the protobuf toolchain:
-
protoc-gen-fieldmap— declarative field-mapping generation -
protoc-gen-wind-errors— error-code generation -
protoc-gen-go-http— Go HTTP interface code -
protoc-gen-go-redact— field redaction (PII out of logs) -
protoc-gen-dart-http/protoc-gen-typescript-http— Dart and TS HTTP clients -
protoc-gen-common— shared code generation
The client generators matter for Flutter shops: one proto change regenerates the Dart client, and the TS client keeps web frontends in sync.
The AI-assisted desktop client
gowind-uiapp wraps everything in a visual UI — table configuration, service assignment, start/stop management, a dev-tools panel for buf/wire/ent — plus LLM assist via any OpenAI-compatible API (OpenAI, DeepSeek, Ollama for local models):
- natural language → DDL for new tables
- AI-assisted microservice partitioning — propose service boundaries from your schema
- AI code review before you commit the generated output
Where to get it
- Releases: github.com/tx7do/go-wind-toolkit/releases
- Docs: gowind.cloud/en/toolkit/intro.html
- MIT — and since it's a build-time tool, adopting it doesn't couple you to anything at runtime. Try
gow newon a side project and see what the generated baseline looks like.
If you have an existing Kratos/Ent/GORM project, ent:// generation is the lowest-friction entry — no database creds needed, just Go source.
Next in the series: a self-hosted B2B CRM in Go — leads to payments, on your own servers.