buf push

Push to a registry


$ buf push <source> [flags]


The first argument is the source to push, which must be one of format [dir,git,protofile,tar,zip]. This defaults to "." if no argument is specified.



Create the repository if it does not exist. Defaults to creating a private repository if --create-visibility is not set.

--create-default-label string

The repository's default label setting, if created. If this is not set, then the repository will be created with the default label "main".

--create-visibility string

The repository's visibility setting, if created. Can only be set with --create. Must be one of [public,private]

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

--error-format string

The format for build errors printed to stderr. Must be one of [text,json,msvs,junit,github-actions]


Only push named modules to the BSR. Named modules must not have any unnamed dependencies.


Uses the Git source control state to set flag values. If this flag is set, we will use the following values for your flags:

--source-control-url to <git remote URL>/<repository name>/<route>/<checked out commit sha> (e.g.
--label for each Git tag and branch pointing to the currently checked out commit. You can set additional labels using --label with this flag.
--create-default-label to the Git default branch (e.g. main) - this is only in effect if --create is also set.

The source control URL and default branch is based on the required Git remote "origin". This flag is only compatible with checkouts of Git source repositories. If you set the --source-control-url flag and/or --create-default-label flag yourself, then the value(s) will be used instead and the information will not be derived from the Git source control state.

-h, --help

help for push

--label strings

Associate the label with the modules pushed. Can be used multiple times.

--source-control-url string

The URL for viewing the source code of the pushed modules (e.g. the specific commit in source control).

Flags inherited from parent commands


Turn on debug logging

--log-format string

The log format [text,color,json]

--timeout duration

The duration until timing out, setting it to zero means no timeout

-v, --verbose

Turn on verbose mode

Parent Command

  • buf - The Buf CLI