buf-dep-graph(1)

Buf(1) Buf(1)

NAME

buf-dep-graph - Print the dependency graph

SYNOPSIS

buf dep graph [flags]

DESCRIPTION

As an example, if module in directory "src/proto" depends on module "buf.build/foo/bar" from the BSR with commit "12345", and "buf.build/foo/bar:12345" depends on module "buf.build/foo/baz" from the BSR with commit "67890", the following will be printed:

digraph {

"src/proto" -> "buf.build/foo/bar:12345"
"buf.build/foo/bar:12345" -> "buf.build/foo/baz:67890"

}

The actual output may vary between CLI versions and has no stability guarantees, however the output will always be in valid DOT format. If you'd like us to produce an alternative stable format (such as a Protobuf message that we serialize to JSON), let us know!

See https://graphviz.org to explore Graphviz and the DOT language. Installation of graphviz will vary by platform, but is easy to install using homebrew:

brew install graphviz

You can easily visualize a dependency graph using the dot tool:

buf dep graph | dot -Tpng >| graph.png && open graph.png The first argument is the source or module to print the dependency graph for, which must be one of format [dir,git,mod,protofile,tar,zip]. This defaults to "." if no argument is specified.

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

--error-format="text" The format for build errors printed to stderr. Must be one of [text,json,msvs,junit,github-actions,gitlab-code-quality]

--format="dot" The format to print graph as. Must be one of [dot,json]

-h, --help[=false] help for graph

OPTIONS INHERITED FROM PARENT COMMANDS

--debug[=false] Turn on debug logging

--log-format="color" The log format [text,color,json]

--timeout=0s The duration until timing out, setting it to 0 means no timeout

SEE ALSO

buf-dep(1)

HISTORY

20-Jan-2026 Auto generated by spf13/cobra

Jan 2026 Auto generated by spf13/cobra