Buf CLI#
The Buf CLI is the ultimate tool for modern, fast, and efficient Protobuf API management. It makes crucial tasks like code generation, breaking change detection, and linting easy to configure, and integrates seamlessly with your existing workflows, so you can focus on what matters most: writing great APIs.
Commands#
Buf's commands change Protobuf management from a chore into a workflow: generate code, safely evolve your schemas, test APIs, and collaborate with others through the Buf Schema Registry:
generate: Generate code stubs from Protobuf files usingprotocpluginsbreaking: Verify no breaking changes have been made, to guard against compatibility issueslint: Lint your Protobuf files according to best practicesformat: Format your Protobuf files for consistencycurl: Test your APIs by invoking an RPC endpoint, similar to usingcurlconvert: Convert a message from binary to JSON or vice versa—useful when debugging or testingregistry,push, andexport: Manage your repositories in the Buf Schema Registryconfig: Generate and manage Buf configuration files
See the Buf CLI reference for complete options and flags for each command.
Configuration#
The Buf CLI is configured through a few simple YAML files: buf.yaml for workspace and module settings, buf.gen.yaml for code generation, and buf.lock for dependency pinning. See the configuration reference for details.