Graph Command

The graph command generates HTML graphs for metrics, trends and data in the wily cache. The wily cache must be built first using the Build Command.


wily graph will take 1 or 2 metrics as the 2nd and 3rd arguments. The first metric will be the Y-axis and the 3rd metric (if provided) will control the size of the bubble.

$ wily graph loc

You can provide a second metric which will be used to control the size of the bubbles on the scatter diagram.

$ wily graph loc complexity

The x-axis will be the historic revisions (typically git commits) on a scale of the revision date. You can change the x-axis to a specific metric. If you do so, the color of the bubble will get darker as the revisions go from 0-n, where n is the last revision.

$ wily graph loc complexity --x-axis sloc

By default, wily graph will create a file, wily-report.html in the current directory and open it using the browser configured in the $BROWSER environment variable (the default on the OS). To save the output to a specific HTML file and not open it, provide the -o flag and the name of the output file.

$ wily report loc -o example.html

Command Line Usage


Graph a specific metric for a given file, if a path is given, all files within path will be graphed.

Some common examples:

Graph all .py files within src/ for the raw.loc metric

$ wily graph src/ raw.loc

Graph against raw.loc and cyclomatic.complexity metrics

$ wily graph src/ raw.loc cyclomatic.complexity

Graph against raw.loc and raw.sloc on the x-axis

$ wily graph src/ raw.loc –x-axis raw.sloc



-o, --output <output>

Output report to specified HTML path, e.g. reports/out.html

-x, --x-axis <x_axis>

Metric to use on x-axis, defaults to history.

-a, --changes, -c, --all

All commits or changes only

-s, --aggregate, -i, --individual

Aggregate if path is directory



Required argument


Required argument(s)