The Buf CLI is a developer tool that enables building and management of APIs through the command line. It's easy to install, compatible with macOS, Windows, and Linux, and equipped with features to enhance the developer experience with Buf. You can use the Buf CLI to:

  • Features include linting, code generation, formatting, and breaking change detection.
  • Improve API development and maintenance efficiency.
  • Buf CLI seamlessly integrates with your workflow.

Install the Buf CLI

To install the CLI, you can either utilize an installation script or download and extract an archive file that corresponds to the version of your operating system from the command line.

You can install buf on macOS or Linux using Homebrew:

$ brew install bufbuild/buf/buf

This installs:

  • The binaries buf, protoc-gen-buf-breaking, protoc-gen-buf-lint.
  • Bash completion for buf.
  • Fish completion for buf.
  • Zsh completion for buf.

Next Steps