Need help with vizdeps?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

131 Stars 11 Forks Apache License 2.0 60 Commits 5 Opened issues


Visualize Leiningen dependencies using Graphviz

Services available


Need anything else?

Contributors list


Clojars Project

We're moving to clj-commons!

An alternative to

lein deps :tree
that uses Graphviz to present a dependency diagram of all the artifacts (Maven-speak for "libraries") in your project.

Here's an example of a relatively small project:


A single artifact may be a transitive dependency of multiple other artifacts.

can show this (
lein deps :tree
doesn't), and will highlight in red any dependencies with a version mismatch. This can make it much easier to identify version conflicts and provide the best exclusions and overrides.

These dependency graphs can get large; using the

option may make large trees more readable.


To keep the graph from getting any more cluttered, the

artifact is treated specially (just the dependency from the project root is shown).


option is used when managing version conflicts; it removes uninteresting artifacts. Those that remain either have a version conflict (such as
, below) or transitively depend on an artifact with such a conflict:


Often, you are struck trying to track down why a specific artifact is included. In large projects, the Graphviz chart can become difficult to read. Use the

option to limit which artifacts are shown. For example,
lein vizdeps --vertical --focus jackson-core




[walmartlabs/vizdeps "0.2.0"]
into the
vector of your

The plugin makes use of the

command, part of Graphviz, which must be installed. On OS X, Graphviz can be installed using Homebrew:
brew install graphviz

On other platforms, Graphviz can be downloaded.

vizdeps task

Usage: lein vizdeps [options]

Options: -d, --dev Include :dev dependencies in the graph. -f, --focus ARTIFACT Excludes artifacts whose names do not match a supplied value. Repeatable. -H, --highlight ARTIFACT Highlight the artifact, and any dependencies to it, in blue. Repeatable. -n, --no-view If given, the image will not be opened after creation. -o, --output-file FILE target/dependencies.pdf Output file path. Extension chooses format: pdf or png. -p, --prune Exclude artifacts and dependencies that do not involve version conflicts. -s, --save-dot Save the generated GraphViz DOT file well as the output file. -v, --vertical Use a vertical, not horizontal, layout. -h, --help This usage summary.


option can be repeated; any artifact that contains any of the provided strings will be highlighted.


option allows you to mark some dependencies for inclusion; every artifact that does not match, or does not transitively depend on a marked artifact, is excluded. This is very useful when trying to work out how a specific artifact is transitively included.

vizconflicts task

Usage: lein vizconflicts [options]

Options: -o, --output-file FILE target/conflicts.pdf Output file path. Extension chooses format: pdf or png. -X, --exclude NAME Exclude any project whose name matches the value. Repeatable. -a, --artifact NAME If given, then only artifacts whose name matches are included. Repeatable. -s, --save-dot Save the generated GraphViz DOT file well as the output file. -n, --no-view If given, the image will not be opened after creation. -h, --help This usage summary.

is used in concert with lein-sub to analyze dependencies between and across a multi-module project.
identifies all artifacts in use across all sub-modules, and identifies where different versions of the same artifact are used. The generated document includes a diagram for each artifact that has such version conflicts.

For very large projects, the resulting diagram can be very large (even overwhelming Graphviz's ability to create a legible layout). Projects can be excluded, using the

option. Alternately, you can focus on a subset of conflicting artifacts using the

When different versions of the same artifact are in use, the output document will include a diagram of how that artifact is used across the different modules:


The lines in each chart identify dependencies; solid lines are explicit dependencies, dotted lines are transitive dependencies.

When one version of the artifact is the majority (based on total number of dependencies), it is highlighted in blue (and other versions are drawn in red).


Copyright © 2016- Walmartlabs

Distributed under the Apache Software License 2.0.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.