All Projects → greglook → lein-hiera

greglook / lein-hiera

Licence: Unlicense license
Generate Clojure namespace hierarchy graphs

Programming Languages

clojure
4091 projects

Labels

Projects that are alternatives of or similar to lein-hiera

Visualize ruby
Transform code into a flowchart and experimentally trace the execution path through it
Stars: ✭ 237 (+330.91%)
Mutual labels:  graphviz
graphviz
PHP Graphviz library
Stars: ✭ 70 (+27.27%)
Mutual labels:  graphviz
dotnets
Create simple drawings of neural networks using graphviz
Stars: ✭ 161 (+192.73%)
Mutual labels:  graphviz
Azure Plantuml
PlantUML sprites, macros, and other includes for Azure services
Stars: ✭ 247 (+349.09%)
Mutual labels:  graphviz
home-assistant-graph
No description or website provided.
Stars: ✭ 30 (-45.45%)
Mutual labels:  graphviz
bandersnatch-graph
Graphing all possibilities in the Netflix Black Mirror episode, "Bandersnatch"
Stars: ✭ 42 (-23.64%)
Mutual labels:  graphviz
Deepgraph
Analyze Data with Pandas-based Networks. Documentation:
Stars: ✭ 232 (+321.82%)
Mutual labels:  graphviz
nmap-formatter
A tool that allows you to convert NMAP results to html, csv, json, markdown, graphviz (dot). Simply put it's nmap converter.
Stars: ✭ 129 (+134.55%)
Mutual labels:  graphviz
rtl2dot
C call graph generator
Stars: ✭ 48 (-12.73%)
Mutual labels:  graphviz
rel
command line tool for managing personal graphs of anything and writing them to dot
Stars: ✭ 51 (-7.27%)
Mutual labels:  graphviz
ecto erd
A mix task for generating Entity Relationship Diagram from Ecto schemas available in your project.
Stars: ✭ 173 (+214.55%)
Mutual labels:  graphviz
xmpaint
处理有向图的有力工具
Stars: ✭ 65 (+18.18%)
Mutual labels:  graphviz
yed py
Making graphs for yEd
Stars: ✭ 54 (-1.82%)
Mutual labels:  graphviz
C4 Plantuml
C4-PlantUML combines the benefits of PlantUML and the C4 model for providing a simple way of describing and communicate software architectures
Stars: ✭ 3,522 (+6303.64%)
Mutual labels:  graphviz
plugins
Collection of builtin GNU TeXmacs plugins
Stars: ✭ 33 (-40%)
Mutual labels:  graphviz
Ansible Playbook Grapher
A command line tool to create a graph representing your Ansible playbook tasks and roles
Stars: ✭ 234 (+325.45%)
Mutual labels:  graphviz
kraph
Go module for scraping APIs to graphs
Stars: ✭ 12 (-78.18%)
Mutual labels:  graphviz
noflo-graphviz
NoFlo visualization tools for GraphViz
Stars: ✭ 14 (-74.55%)
Mutual labels:  graphviz
tlaplus specs
Different TLA+ specifications, mostly for learning purposes
Stars: ✭ 25 (-54.55%)
Mutual labels:  graphviz
heroku-buildpack-graphviz
Install Graphviz on Heroku
Stars: ✭ 18 (-67.27%)
Mutual labels:  graphviz

clj-hiera

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 tool was originally inspired by lein-ns-dep-graph, but has many additional options for graph generation.

Usage

There are a few different ways to use clj-hiera. First, you'll need Graphviz installed in order to generate the images. Check your local package manager:

# Debian/Ubuntu:
sudo apt-get install graphviz

# OS X with Homebrew:
brew install graphviz

Deps Alias

If you're using tools.deps, you can use this by adding an alias to your deps.edn file:

:hiera
{:deps {io.github.greglook/clj-hiera {:git/tag "2.0.0", :git/sha "b14e514"}}
 :exec-fn hiera.main/graph
 :exec-args {,,,}}

To generate namespace graphs:

clj -X:hiera [opts]

Clojure Tool

Alternately, you can use this as a standalone Clojure tool:

clj -Ttools install-latest :lib io.github.greglook/clj-hiera :as hiera

Then, to invoke the tool in any Clojure project:

clj -Thiera graph [opts]

Leiningen

For Leiningen, you can use this via the lein-hiera plugin. Add the following to your project.clj file or user-level profile:

[lein-hiera "2.0.0"]

Then you can run:

lein hiera [opts]

Options

The available options, and their default values are:

name default description
:sources #{"src"} Set of directories containing source files to analyze.
:output "target/hiera" Directory to write files to.
:layout :vertical Whether to lay out the graph vertically or horizontally.
:cluster-depth 0 Number of namespace segments to cluster nodes by.
:external false Show external namespaces as nodes in the graph.
:ignore #{} A set of namespace prefixes or patterns to exclude from the graph.

When using Leiningen, graph generation options may be provided under the :hiera key in the project map. You can also provide/override the configuration options by specifying them on the command line with keyword arguments:

lein hiera :cluster-depth 3 :layout :horizontal

Example

This image shows the dependency hierarchy from a moderately complex project. The namespaces are clustered by two levels, and it shows a dependency on the external puget library.

Example dependency hierarchy

License

This is free and unencumbered software released into the public domain. See the UNLICENSE file for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].