Buf CLI

Buf plugins – Overview

With Buf plugins, you can create custom lint and breaking change rules and categories to augment Buf's built-in rules. Buf plugins are locally installed binaries that fit into your existing Buf CLI workflow. Once you install a plugin, you can configure it in the buf.yaml file just like any of Buf's built-in rules. You can add and remove rules, ignore them for certain files, and suppress errors via code comments.

Buf plugins are built on top of the Bufplugin Protobuf API and the PluginRPC framework. bufplugin-go connects them into a library that makes implementing and testing rules simple and straightforward. All of Buf's built-in lint and breaking change rules run on this platform.

The bufplugin-go library provides several detailed implementation examples to help get you started, and the tutorial is a step-by-step walkthrough of creating a plugin from scratch.

  1. Related docs