Buf(1)
πΈ Buf(1) β the buf convert era πΈ
okay bestie, welcome to the Buf manual, page Buf(1). this one's all about buf convert and honestly? it's giving transformation station β¨
β¨ NAME β¨
buf-convert β converts a message between binary, text, or JSON π
π SYNOPSIS π
buf convert [flags]
π¦ DESCRIPTION π¦
so the whole vibe is: you hand it an input proto, it interprets a proto/json message, and it converts that message into a different format. that's it. that's the main character energy π₯
Examples:
$ buf convert <input> --type=<type> --from=<payload> --to=<output>
the input can be a local .proto file, binary output of buf build, a bsr module, or a local buf module β literally all of those, no cap:
$ buf convert example.proto --type=Foo.proto --from=payload.json --to=output.binpb
all of input, --from and to accept formatting options π
$ buf convert example.proto#format=binpb --type=buf.Foo --from=payload#format=json --to=out#format=json
both input and --from accept stdin redirecting π«Ά
$ buf convert <(buf build -o -)#format=binpb --type=foo.Bar --from=<(echo "{\"one\":\"55\"}")#format=json
redirect from stdin to --from:
$ echo "{\"one\":\"55\"}" | buf convert buf.proto --type buf.Foo --from -#format=json
redirect from stdin to input:
$ buf build -o - | buf convert -#format=binpb --type buf.Foo --from=payload.json
and use a module on the bsr, obviously π
$ buf convert <buf.build/owner/repository> --type buf.Foo --from=payload.json
π OPTIONS π
--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 (so don't come for the BSR, it plays by its own rules π)--error-format="text"β the format for build errors printed to stderr. must be one of[text,json,msvs,junit,github-actions,gitlab-code-quality]--from="-"β the location of the payload to be converted. supported formats are[binpb,json,txtpb,yaml]-h,--help[=false]β help for convert π₯Ί--to="-"β the output location of the conversion. supported formats are[binpb,json,txtpb,yaml]--type=""β the full type name of the message within the input (e.g.acme.weather.v1.Units) β like, the whole entire name, not a nickname--validate[=false]β validate the message specified with--fromby applying protovalidate rules to it. see https://github.com/bufbuild/protovalidate for more details. she checks your work, respectfully π
π OPTIONS INHERITED FROM PARENT COMMANDS π
these come from the parent command, so they're not even this command's kids, they're just hanging around being iconic:
--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) β³
ngl, --timeout=0s meaning no timeout is such a mood. she waits. patiently. forever.
π§ SEE ALSO π§
buf(1) β go say hi to the parent, she raised this one π«Ά
π HISTORY π
2026-10-22 β auto generated by spf13/cobra
and that's the whole page!! auto generated by spf13/cobra, dated 2026-10-22, straight out of the Buf(1) manual π slay, 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