Installing protoc & Go gRPC Plugins

By Engineering Team•October 11, 2026•2 min read

Any service that exposes or consumes a gRPC API (see @templates/go-grpc-microservice/) needs protoc and its Go plugins installed locally to regenerate code after a .proto contract changes.

1. Install protoc

brew install protobuf

Verify:

protoc --version

This should print something like libprotoc 34.1.

2. Install the Go Plugins

protoc itself only parses .proto files — generating actual Go code needs two separate plugins:

go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest

3. Confirm the Plugins Are on Your PATH

protoc finds protoc-gen-go/protoc-gen-go-grpc by searching $PATH for binaries matching the protoc-gen-* naming convention — so the same Go bin directory from Installing Go (macOS) must already be exported:

export PATH="$PATH:$(go env GOPATH)/bin"

If this line isn’t already in your shell profile from the Go install step, add it there now rather than duplicating it elsewhere.