Skip to content

Installation

The quickstart uses buf with go run — no binary install required. If you need a standalone binary for other workflows, choose from the methods below.

Pre-built binaries

Download the latest release for your platform from GitHub Releases.

Binaries are available for Linux, macOS, and Windows (amd64 and arm64).

After downloading, make the binary executable and place it somewhere on your PATH:

chmod +x protoc-gen-pydantic
mv protoc-gen-pydantic /usr/local/bin/

Install with Go

If you have Go 1.21+ installed:

go install github.com/cjermain/protoc-gen-pydantic@latest

This places the binary in $(go env GOPATH)/bin. Make sure that directory is on your PATH.

Build from source

git clone https://github.com/cjermain/protoc-gen-pydantic
cd protoc-gen-pydantic
go build -o protoc-gen-pydantic .

Verify installation

protoc-gen-pydantic --version

Prerequisites

To use the plugin you also need one of:

  • protoc — the Protocol Buffers compiler
  • buf — recommended; handles dependency management and code generation configuration automatically

For most projects, buf is the simpler choice. See Using with buf for details.