Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Attention: This repository has been renamed from brew-graph to homebrew-graph to adhere to the Homebrew naming conventions of tap repositories. Please update your local clones or forks (for consistency only, GitHub makes sure everything still works for you):

git remote set-url origin


brew-graph is a Ruby script that creates a dependency graph of Homebrew formulae. The currently supported output options are DOT and GraphML.

In general, if you'd like to know more about Untangling Your Homebrew Dependencies, check out the blog post by Jonathan Palardy.


brew tap martido/homebrew-graph

Note: If you already have the brew-graph formula installed from the old tap repository, uninstall it first:

brew uninstall brew-graph
brew untap martido/homebrew-brew-graph


Type brew graph --help.

brew graph [options] formula1 formula2 ... | --installed | --all

Create a dependency graph of Homebrew formulae.


 -h, --help            Print this help message.
 -f, --format FORMAT   Specify FORMAT of graph (dot, graphml). Default: dot
 --highlight-leaves    Highlight formulae that are not dependencies of another
                       formula. Default: false
 --highlight-outdated  Highlight formulae that are outdated. Default: false
 -o, --output FILE     Write output to FILE instead of stdout
 --installed           Create graph for installed Homebrew formulae
 --all                 Create graph for all Homebrew formulae


brew graph --installed
 Create a dependency graph of installed formulae and
 print it in DOT format to stdout.

brew graph -f graphml --installed
 Same as before, but output GraphML markup.

brew graph graphviz python
 Create a dependency graph of 'graphviz' and 'python' and
 print it in DOT format to stdout.

brew graph -f graphml -o deps.graphml graphviz python
 Same as before, but output GraphML markup to a file named 'deps.graphml'.


You can use Graphviz to visualize DOT graphs.

brew install graphviz
brew graph --installed | dot -Tpng -ograph.png
open graph.png

Of course, you can also use a different Graphviz layout, such as fdp. Simply replace dot with fdp:

brew graph --installed | fdp -Tpng -ograph.png

You can use the yEd graph editor to visualize GraphML markup. The created markup uses yFiles's extensions to GraphML and heavily relies on defaults to keep the output reasonably small. It contains no layout information because yEd already provides an exhaustive set of algorithms.


Creates a simple dependency graph of Homebrew formulae.




No packages published


You can’t perform that action at this time.