Skip to content

Installation

db-gen ships as a single self-contained executable. There is no installer and no runtime dependency.

Download a release

Grab the latest db-gen-win.exe (Windows) or db-gen-linux (Linux) from the Releases page.

Commit the binary into your repo

We recommend committing the binary next to your code. Yes, the repository gets bigger — but in five years, when you need to regenerate, it will still be there and still produce identical output. You can also run db-gen generate as part of CI/CD.

Build from source

Requires Go 1.21+.

go build -o db-gen-win.exe .
go build -o db-gen-linux .

Verify

db-gen version

Shell completion (optional)

db-gen can emit a completion script for your shell:

db-gen completion bash > /etc/bash_completion.d/db-gen
db-gen completion zsh > "${fpath[1]}/_db-gen"
db-gen completion fish > ~/.config/fish/completions/db-gen.fish
db-gen completion powershell | Out-String | Invoke-Expression

What you need to run it

Next: Quick Start.