Buf(1)
π 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=""β thebuf.yamlfile 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 forexport. 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 (envBUF_DEBUG). for when you need to know everything π--log-format="color"β the log format:text,color,jsonβ¨envBUF_LOG_FORMATβ©. pick your aesthetic π--timeout=0sβ the duration until timing out; setting it to0means no timeout (envBUF_TIMEOUT). zero means forever, bestie, choose wisely π
π SEE ALSO π
buf(1)β the parent, the icon, the blueprint π
π HISTORY π
2026-10-22β Auto generated byspf13/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
- 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