Buf(1)

πŸ“¦
version 1.75.0 Β· 3 versions
, in arch rolling

✨ Buf(1) β€” the buf-build glow-up ✨

okay so bestie, welcome to Buf(1), the manual page for buf build, and honestly? it's giving "build your Protobuf files into a Buf image" main character energy πŸŽ€ no cap. let's get into it.


🌸 NAME 🌸

buf-build β€” Build Protobuf files into a Buf image πŸ’… like, that's the whole vibe.


πŸ¦‹ SYNOPSIS πŸ¦‹

buf build  [flags]

literally that's it. so clean. so iconic.


🌈 DESCRIPTION 🌈

so the first argument is the source or module to build, or the image to convert β€” and it must be one of these formats, periodt:

[binpb,dir,git,json,mod,protofile,tar,txtpb,yaml,zip]

if you don't pass any argument at all? it lowkey defaults to "." 🫢 (that's your current directory, bestie, in case you were wondering).


✨ OPTIONS ✨

okay here's the full menu, every single one, no skips πŸ“

  • --as-file-descriptor-set[=false] β€” output as a google.protobuf.FileDescriptorSet instead of an image. ngl this one's a little sleeper agent: images are wire compatible with FileDescriptorSets, but this flag strips the extra metadata that was added for Buf usage. so like, you lose the Buf seasoning 😭
  • --config="" β€” the buf.yaml file or data to use for configuration. your config, your rules πŸ’–
  • --disable-symlinks[=false] β€” don't follow symlinks when reading sources or configuration from the local filesystem. by default symlinks are followed in this CLI, but they're never followed on the Buf Schema Registry πŸ‘€ (yes, that's a real difference, write it down)
  • --error-format="text" β€” the format for build errors printed to stderr. must be one of [text,json,msvs,junit,github-actions,gitlab-code-quality] β€” pick your fighter ⭐
  • --exclude-imports[=false] β€” exclude imports. that's it, that's the whole thing πŸ™ˆ
  • --exclude-path=[] β€” exclude specific files or directories, e.g. "proto/a/a.proto", "proto/a". if specified multiple times, the union is taken πŸ”₯
  • --exclude-source-info[=false] β€” exclude source info πŸŽ€
  • --exclude-source-retention-options[=false] β€” exclude options whose retention is source 🧚
  • -h, --help[=false] β€” help for build. the classic. the icon πŸ‘‘
  • -o, --output="/dev/null" β€” the output location for the built image. must be one of format [binpb,json,txtpb,yaml]. and yeah, the default literally yeets everything into /dev/null πŸ’€ so specify something if you actually want it
  • --path=[] β€” limit to specific files or directories, e.g. "proto/a/a.proto", "proto/a". if specified multiple times, the union is taken 🌸
  • --type=[] β€” the types (package, message, enum, extension, service, method) that should be included in this image. when specified, the resulting image will only include descriptors to describe the requested types. a type name may end with .** to recursively include the named element and everything nested beneath it β€” such as a package and all of its sub-packages πŸ¦‹ (recursive slay, honestly)

πŸ’œ OPTIONS INHERITED FROM PARENT COMMANDS πŸ’œ

these are the family hand-me-downs, and they're still cute:

  • --debug[=false] β€” turn on debug logging (env BUF_DEBUG) πŸ›
  • --log-format="color" β€” the log format text,color,json ⟨env BUF_LOG_FORMAT⟩ 🌈
  • --timeout=0s β€” the duration until timing out; setting it to 0 means no timeout (env BUF_TIMEOUT). so 0s is the "we stay vibing forever" setting ⏳

🫢 SEE ALSO 🫢

  • buf(1) β€” the parent, the origin story, the blueprint πŸ’–

πŸŽ€ HISTORY πŸŽ€

2026-10-22 Auto generated by spf13/cobra

bestie reminder: this whole page was Auto generated by spf13/cobra, dated 2026-10-22, and it lives under the manual name Buf(1) ✨ so if anything breaks, blame the cobra, not me πŸ’… periodt πŸ’œ
πŸ“¦ where this page comes from