Build Command

The build command will iterate through each revision in the chosen archiver and run analytics on the target code base.

By default, wily build <target> will assume the directory is a git repository and will scan back through 50 revisions.



Building a basic cache

The most basic example takes the path to the source code and compiles a cache with the complexity of the last 50 commits

$ wily build src/

You can specify multiple source directories by simply adding additional paths to the command

$ wily build src/ test/

You can override the maximum number of commits recursed by using the -n or --max-revisions flags

$ wily build src/ test/ -n 100

By default, wily will compile the cyclomatic complexity, maintainability and raw metrics. If you only want a subset of those, you can specify with comma-separate --operator or -o flag

$ wily build src/ test/ -n 100 -o raw,maintainability

Changing the default path

All of the wily commands support a --path flag to set the home path (defaults to the current working directory).

Updating the index

To update the wily cache with any recent commits, simply re-run the wily build command and it will

Dirty repositories

If you run wily build with any uncommitted files, wily will give an error to protect those files being lost, stash or commit them first.

$ wily build src/
Failed to setup archiver: 'Dirty repository, make sure you commit/stash files first'

Command Line Usage


Build the wily cache.



-n, --max-revisions <max_revisions>

The maximum number of historical commits to archive

-o, --operators <operators>

List of operators, separated by commas

-a, --archiver <archiver>

Archiver to use, defaults to git if git repo, else filesystem



Optional argument(s)