The best way of working with Protocol Buffers.
This is the first beta release of the next generation of the Buf CLI. This beta release is being used by some of our customers to ensure we've kept compatibility, and to try some of its new features. Don't worry - the next generation of the buf
CLI continues to be v1
, and is completely backwards-compatible - all of your workflows will continue to work. Buf is enterprise-grade software, and we want you to be minimally impacted.
There's some exciting improvements coming in the next generation of the buf
CLI, and we look forward to sharing it more widely in the coming weeks. If you'd like to be part of the private beta, email us with the subject line "Beta" and we'll be happy to talk - we'll add more users as we have capacity. While you are free to give this beta release a spin without being added to our private beta, we wouldn't recommend using it outside of our private beta just yet!
buf lint
incorrectly reports an error for (buf.validate.field).repeated
is set for a repeated validation rule.buf generate
so it populates the recently-added source_file_descriptors
field of the CodeGeneratorRequest
message. This provides the plugin with access to options that are configured to only be retained in source and not at runtime (via field option). Descriptors in the proto_file
field will not include any options configured this way for the files named in file_to_generate
field.--exclude-source-retention-options
flag to buf build
, which causes options configured to only be retained in source to be stripped from the output descriptors.yaml
format. All commands that take image inputs, output images, or convert between message formats, now take yaml
as a format, in addition to the existing binpb
and txtpb
formats. Some examples:
buf build -o image.yaml
buf ls-files image.yaml
buf convert --type foo.Bar --from input.binpb --to output.yaml
yaml
and json
formats now accept two new options: use_proto_names
and use_enum_numbers
. This affects output serialization. Some examples:
buf convert --type foo.Bar --from input.binpb --to output.yaml#use_proto_names=true
buf convert --type foo.Bar --from input.binpb --to -#format=yaml,use_enum_numbers=true
buf format
would inadvertently mangle files that used the expanded Any
syntax in option values.buf curl
command has been updated to support the use of multiple schemas. This allows users to specify multiple --schema
flags and/or to use both --schema
and --reflect
flags at the same time. The result is that additional sources can be consulted to resolve an element. This can be useful when the result of an RPC contains extensions or values in google.protobuf.Any
messages that are not defined in the same schema that defines the RPC service.buf lint
incorrectly reports error when (buf.validate.field).required
is set for an optional field in proto3.buf lint
will now verify that your protovalidate rules are valid. A single rule PROTOVALIDATE
has been added to the DEFAULT
group - given that protovalidate is net new, this does not represent a breaking change.buf beta price
with the latest pricing information.buf.lock
with dependencies with b1 or b3 digests. b1 and b3 digests will be deprecated in a future version. Run buf mod update
to update dependency digests.buf build
and other commands may fail when handling certain archives created on macOS that contain files with extended attributes.--path
did not work with workspaces under certain scenarios.buf generate --exclude-path
was not properly excluding paths for remote modules.buf curl
had a user agent that did not properly place the extension as a suffix.buf beta price
with the latest pricing information.