DEV Community

Alex Spinov
Alex Spinov

Posted on

Buf Has a Free Protobuf Tool — Linting, Breaking Change Detection, and Code Generation

Buf is a modern Protobuf toolchain — lint, detect breaking changes, and generate code from .proto files.

What You Get for Free

  • Linting — 90+ lint rules for .proto files
  • Breaking change detection — CI check for API compatibility
  • Code generation — generate Go, Java, Python, TypeScript, etc.
  • BSR (Registry) — share Protobuf schemas like npm packages
  • Managed plugins — code gen plugins without local setup
  • Format — auto-format .proto files
  • CLI — fast, single binary
  • Editor support — VS Code extension with diagnostics

Quick Start

brew install bufbuild/buf/buf
buf mod init
Enter fullscreen mode Exit fullscreen mode
# buf.yaml
version: v2
lint:
  use:
    - DEFAULT
breaking:
  use:
    - FILE
Enter fullscreen mode Exit fullscreen mode
buf lint          # check proto files for issues
buf breaking --against '.git#branch=main'  # detect breaking changes
buf generate      # generate code from protos
Enter fullscreen mode Exit fullscreen mode

Why Developers Switch from protoc

protoc is hard to install, has no linting, and requires plugins:

  • One tool — lint, format, generate, check breaking changes
  • No plugins to install — managed remote plugins
  • CI-friendlybuf breaking catches API breaks in PRs
  • BSR — publish and consume schemas like packages

A team broke their mobile app 3 times by changing Protobuf fields without realizing clients depended on them. After buf breaking in CI: zero accidental breaking changes — PR blocked if API compatibility breaks.

Need Custom Data Solutions?

I build production-grade scrapers and data pipelines for startups, agencies, and research teams.

Browse 88+ ready-made scrapers on Apify → — Reddit, HN, LinkedIn, Google, Amazon, and more.

Custom project? Email me: spinov001@gmail.com — fast turnaround, fair pricing.

Top comments (0)