Skip to content
Eunice is based on the premise that unidirectional dependencies can be beneficial to structure and modularity in software. It's approach includes indirect dependencies as well as direct.
Branch: master
Clone or download
Graham Dyson
Latest commit b3285c5 Sep 15, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
repositories repositories script updated to match those under user name and not or… Aug 25, 2019
.gitattributes configured Git to use line feeds for end of lines Jan 1, 2019
.travis.yml dogfooding is now only run from javascript repository Aug 23, 2019 harness urls Eunice changed to lowercase Aug 30, 2019


Eunice is based on the premise that unidirectional dependencies can be beneficial to structure and modularity in software. Eunice's approach isn't limited to direct dependencies, but includes indirect dependencies as well.

With Eunice you can define an intended structure/architecture, it can then show you dependencies that don't match, and then you can further refine the definition or update your code to match it.

try it out:

on Eunice 🐶🥫¹

on some JavaScript

in a directory of JavaScript (Flow, JSX and TypeScript supported) NPM

npx eunice

The following file types are outputted:

  • HTML - interactive render, where the scope can be set to sub-items (e.g. sub-directories, files, functions etc), and dependencies can be listed (eunice.html)
  • SVG - render scoped to the root directory (eunice.svg)
  • YAML - dependency and structure of the source code (eunice.yaml)

For more information see processing and options.

¹ dogfooding

Gitter chat

Structure / architecture


Fundamental to Eunice is the act of defining stacks. When it's intended that an item is to be dependent upon another, the first item is placed above the second item in a stack. When items are intended to be independent of each other, they can be placed at the same level in a stack.

In some programming languages there are implied stacks, such as the order of functions in a file, or the order of files in a project.

Scopes / groups

Stacks can be defined in Eunice with different sized scopes and across boundaries, from individual functions, classes and files; to multiple, large codebases in different languages, frameworks and runtimes.

Eunice supports nested groups of items, each group can have its own stack. When Eunice measures whether dependencies match the intended structure, the results for nested groups are summarized (see renderer repository).

Programming languages often include ways of grouping code, such as the directories in a file system, namespaces, classes or nested functions. Groups such as these can be inferred and automatically represented in Eunice. Multiple repositories and packages can also be represented as groups and analyzed as a whole.

Dependency Count Arrows

Instead of rendering dependencies as lines between items each dependency is counted into the following categories:

  • matches stack (green down arrow)
  • does not match stack (red up arrow)
  • is not independent (red horizontal arrow)

Dependency counts appear for both sides of the dependency, the dependent item and the item depended upon. When there are multiple counts a summary of all counts is rendered at the bottom.

scenario svg scenario svg scenario svg
upper depends
upon lower
lower depends
upon upper
independent first depends
upon second
(not stacked)

Dependencies within an item are also summarized and rendered inside the item box, below the identifer text.

scenario svg scenario svg scenario svg
parent depends
upon item
item depends
upon parent
first item
depends upon
second item
(not stacked)

Items and sub-item can also be opened. Opening an item will show its contents and breadcrumb links for where it is in the hierarchy.

root > grandparent

You can’t perform that action at this time.