A Boot task that generates a graph of the dependency hierarchy of a set of clojure files. This uses the clojure.tools.namespace library for namespace parsing and Rhizome for graph generation using Graphviz.
This plugin is inspired by lein-ns-dep-graph and lein-hiera.
Add boot-reload
to your build.boot
dependencies and require
the namespace:
(set-env! :dependencies '[[hendrick/boot-medusa "X.Y.Z" :scope "test"]])
(require '[hendrick.boot-medusa :refer :all])
You'll also need Graphviz installed, in order to generate the graph images. Check your local package manager:
# Debian/Ubuntu:
$ sudo apt-get install graphviz
# OS X:
$ brew install graphviz
You can see the options available on the command line:
boot medusa -h
or in the REPL:
boot.user=> (doc medusa)
A namespace graph can be generated by running:
boot medusa
This will generate a dependency graph at ns-hierarchy.png
, showing the interdependency of the project's source namespaces for .clj
files located in the src
directory.
Eclipse Public License.