Generate class diagrams from scala source code
Scala Shell
Switch branches/tags
Nothing to show
Latest commit e5ffd88 Jun 24, 2017
Failed to load latest commit information.
src Include class constructor types in dependency graph Sep 2, 2016
build Added build command Sep 27, 2012
sbt Updated SBT to version 0.13.7 and updated dependencies Dec 20, 2014

Scala Diagrams

Scaladiagrams is a command line tool to generate DOT files representing a Scala projects class hierarchy. These DOT files can then be passed to a renderer such as GraphViz to draw the hierarchy.


First, compile and package with ./build

To run Scaladiagrams do the following:

scaladiagrams --source pathToScalaSourcefiles > dotFile

If you have Graphviz installed, you can generate an image like so:

scaladiagrams --source pathToScalaSourcefiles | dot -Tpng > file.png

Large class hierarchies are probably best rendered as an SVG file, just replace the -t target to svg.

Other options

./scaladiagrams --help
	-e, --extension  <arg>    (default = .scala) 
	-l, --linked             only output types that extend other types 
	-p, --parent  <arg>      only output parents of the named class 
	-s, --source  <arg>      location of source files (default = .) 

Most useful of these are --linked and --parent; these both reduce the scope of the diagram to be produced.

Example diagram

Class Diagram