Buf(1)

NAME
buf-export - Export proto files from one location to another

SYNOPSIS
buf export [flags]

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

Examples:

Export proto files in to an output directory.
    $ buf export <source> --output=<output-dir>

Export current directory to another local directory.
    $ buf export . --output=<output-dir>

Export the latest remote module to a local directory.
    $ buf export <buf.build/owner/repository> --output=<output-dir>

Export a specific version of a remote module to a local directory.
    $ buf export <buf.build/owner/repository:ref> --output=<output-dir>

Export a git repo to a local directory.
    $ buf export https://github.com/owner/repository.git --output=<output-dir>

OPTIONS
--all[=false]
    When set, include any available documentation and license files for the exported input. If the input has more than one module, then the documentation and license file names will be suffixed with the module name.

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

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

-h, --help[=false]
    help for export

-o, --output=""
    The output directory for exported files

--path=[]
    Limit to specific files or directories, e.g. "proto/a/a.proto", "proto/a" If specified multiple times, the union is taken

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