Buf(1)
β¨ 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 agoogle.protobuf.FileDescriptorSetinstead of an image. ngl this one's a little sleeper agent: images are wire compatible withFileDescriptorSets, but this flag strips the extra metadata that was added for Buf usage. so like, you lose the Buf seasoning π--config=""β thebuf.yamlfile 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 issourceπ§-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 (envBUF_DEBUG) π--log-format="color"β the log formattext,color,jsonβ¨envBUF_LOG_FORMATβ© π--timeout=0sβ the duration until timing out; setting it to0means no timeout (envBUF_TIMEOUT). so0sis 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
- arch rolling: buf 1.75.0-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms