As we work towards v1.0, we are cleaning up the CLI UX. As part of this, we made the following changes:
buf image build
has been moved tobuf build
and now accepts images as inputs.buf beta image convert
has been deleted, asbuf build
now covers this functionality.- The
-o
flag is no longer required forbuf build
, instead defaulting to the OS equivalent of/dev/null
. - The
--source
flag onbuf build
has been deprecated in favor of passing the input as the first argument. - The
--source-config
flag onbuf build
has been moved to--config
. - The
--input
flag onbuf check lint
has been deprecated in favor of passing the input as the first argument. - The
--input-config
flag onbuf check lint
has been moved to--config
. - The
--input
flag onbuf check breaking
has been deprecated in favor of passing the input as the first argument. - The
--input-config
flag onbuf check breaking
has been moved to--config
. - The
--against-input
flag onbuf check breaking
has been moved to--against
. - The
--against-input-config
flag onbuf check breaking
has been moved to--against-config
. - The
--input
flag onbuf generate
has been deprecated in favor of passing the input as the first argument. - The
--input-config
flag onbuf generate
has been moved to--config
. - The
--input
flag onbuf ls-files
has been deprecated in favor of passing the input as the first argument. - The
--input-config
flag onbuf ls-files
has been moved to--config
.
We feel these changes make using buf
more natural. Examples:
# compile the files in the current directory
buf build
# equivalent to the default no-arg invocation
buf build .
# build the repository at https://github.com/foo/bar.git
buf build https://github.com/foo/bar.git
# lint the files in the proto directory
buf check lint proto
# check the files in the current directory against the files on the master branch for breaking changes
buf check breaking --against .git#branch=master
# check the files in the proto directory against the files in the proto directory on the master branch
buf check breaking proto --against .git#branch=master,subdir=proto
Note that existing commands and flags continue to work. While the deprecation messages will be printed, and we recommend migrating to the new invocations, your existing invocations have no change in functionality.