By default, buf looks for a buf.yaml in this manner:

  • For dir, bin, json inputs, buf looks at your current directory for a buf.yaml file.
  • For tar and zip inputs, buf looks at the root of the archive for a buf.yaml file after strip_components is applied.
  • For git inputs, buf looks at the root of the cloned repository at the head of the cloned branch.

The configuration can be overridden with the --config flag. See the configuration documentation for more details.