DEV Community

Toivo Ilmast
Toivo Ilmast

Posted on

I built a CLI that shows how your TypeScript project architecture changed between Git revisions

Most dependency tools show the current state of the architecture.

During code review I was often interested in a different question:

  1. What actually changed?
  2. Did this change introduce new dependencies between parts of the system?
  3. Did someone start importing internal implementation details?
  4. Did the architecture slowly become more coupled over time?

I wanted these changes to become more visible.

So I built dep health analyzer. It is an open source CLI for JavaScript and TypeScript projects.

The tool builds dependency graphs from your project and compares them between Git revisions.

You can compare the current state with the previous commit, the main branch, a tag, or a specific commit.

It can highlight new structural relationships such as:

  • cross boundary dependencies
  • deep internal imports
  • sibling dependencies
  • circular dependencies

For regression analysis it creates a temporary Git worktree, analyzes both versions of the project, compares the dependency graphs, and generates findings.

It also generates an HTML report with a summary of the changes, a simple risk assessment, review recommendations, and a detailed list of findings.

The goal is not to enforce architecture rules or tell developers that something is wrong.

The tool does not know the architecture of your project.

It only tries to highlight signals that may be worth reviewing.

The final decision always belongs to developers.

I built this tool because I noticed that architecture rarely changes in one big step.

It usually changes slowly.

Small changes often look harmless during code review.

Over time they can become difficult to understand.

I wanted these changes to become easier to notice.

GitHub:

https://github.com/ToivoIlmast/dep-health-analyzer

npm:

https://www.npmjs.com/package/dep-health-analyzer

I would be happy to hear your feedback.

Would something like this be useful in your projects?

Top comments (0)