Buf(1)

NAME
buf-build - Build Protobuf files into a Buf image

SYNOPSIS
buf build [flags]

DESCRIPTION
The first argument is the source or module to build or image to convert, which must be one of format [binpb,dir,git,json,mod,protofile,tar,txtpb,yaml,zip]. This defaults to "." if no argument is specified.

OPTIONS
--as-file-descriptor-set[=false]
    Output as a google.protobuf.FileDescriptorSet instead of an image Note that images are wire compatible with FileDescriptorSets, but this flag strips the additional metadata added for Buf usage

--config=""
    The buf.yaml file or data to use for configuration

--disable-symlinks[=false]
    Do not follow symlinks when reading sources or configuration from the local filesystem By default, symlinks are followed in this CLI, but never followed on the Buf Schema Registry

--error-format="text"
    The format for build errors printed to stderr. Must be one of [text,json,msvs,junit,github-actions,gitlab-code-quality]

--exclude-imports[=false]
    Exclude imports.

--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

-o, --output="/dev/null"
    The output location for the built image. Must be one of format [binpb,json,txtpb,yaml]

--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

OPTIONS INHERITED FROM PARENT COMMANDS
--debug[=false]
    Turn on debug logging

--log-format="color"
    The log format [text,color,json]

--timeout=0s
    The duration until timing out, setting it to 0 means no timeout

SEE ALSO
buf(1)

HISTORY
2026-04-22 Auto generated by spf13/cobra