Buf(1)

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

πŸ’… BUF-EXPORT, BESTIE 🌸

okay so this is the manual for Buf(1) β€” yes, capital B, it's that girl β€” and specifically the buf-export command, which is the one that yeets your proto files from one place to another. no cap, it's genuinely so useful. let's get into it 🫢


✨ NAME ✨

buf-export β€” export proto files from one location to another. that's it. that's the whole vibe. moving files, but make it fashion πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

buf export  [flags]

πŸŽ€ DESCRIPTION πŸŽ€

okay so the first argument is the source, or the module you wanna export β€” and bestie, it must be one of these formats: dir, git, mod, protofile, tar, zip. if you don't give it any argument at all? it just defaults to "." (as in, the current directory, as in, right where you're standing, icon behaviour honestly). ✨

πŸ’« Examples πŸ’«

here are the examples, and yes i'm keeping every single one because they all ate:

export proto files in source to an output directory:

$ buf export <source> --output=<output-dir>

export the 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 (yes the :ref is doing the work, iykyk):

$ 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 you set this, you get any available documentation and license files for the exported input too. cutie bonus content πŸ’– but listen: if the input has more than one module, the documentation and license file names get suffixed with the module name. noted. no cap.
  • --config="" β€” the buf.yaml file or data to use for configuration. your config era ✨
  • --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 they are never followed on the Buf Schema Registry. so like, different energy in different places πŸ’…
  • --exclude-imports[=false] β€” exclude imports. that's the whole thing. bye imports πŸ‘‹
  • --exclude-path=[] β€” exclude specific files or directories, e.g. "proto/a/a.proto", "proto/a". if you specify it multiple times, the union is taken (so like, all of them together, not just the last one 🫢)
  • -h, --help[=false] β€” help for export. your little safety net 🌸
  • -o, --output="" β€” the output directory for exported files. the destination. the receiving end. the main character directory πŸ’…
  • --path=[] β€” limit to specific files or directories, e.g. "proto/a/a.proto", "proto/a". if you specify it multiple times, the union is taken. same energy as --exclude-path, opposite direction ✨

πŸ‘‘ OPTIONS INHERITED FROM PARENT COMMANDS πŸ‘‘

these come from the parent command, like hand-me-downs but make them iconic:

  • --debug[=false] β€” turn on debug logging (env BUF_DEBUG). for when you need to know everything πŸ”
  • --log-format="color" β€” the log format: text, color, json ⟨env BUF_LOG_FORMAT⟩. pick your aesthetic 🌈
  • --timeout=0s β€” the duration until timing out; setting it to 0 means no timeout (env BUF_TIMEOUT). zero means forever, bestie, choose wisely πŸ’€

🌟 SEE ALSO 🌟

  • buf(1) β€” the parent, the icon, the blueprint πŸŽ€

πŸ“œ HISTORY πŸ“œ

2026-10-22 β€” Auto generated by spf13/cobra

and that's the page!! slay πŸ’– this whole thing was auto generated by spf13/cobra, dated 2026-10-22 β€” so like, thank you cobra bestie, we love a generator that shows up and does the work πŸ™ˆβœ¨ bye!! πŸ¦‹

πŸ“¦ where this page comes from