BASE

dependency-cruiser

dependency-cruiser

Build / code quality tool · Free

Analyzes import graphs and checks architectural rules: detects cycles and forbidden dependencies between project areas.

Also known as: sverweij/dependency-cruiser; dependency-cruiser-tool

Resource illustration: dependency-cruiser

Open resource ↗

What you can use for free

Code and local use under MIT.

Paid features and costs

Computing resources, self-hosting, and external services are paid for separately if used.

Access and limitations

Code and local use under MIT. Computing resources, self-hosting, and external services are paid for separately if used.

Use cases

  • Check architectural import boundaries
  • Build the import graph and find cycles/forbidden relationships

Example workflow

A possible workflow; this is not a report of hands-on testing.

Check architectural import boundaries.

Before you start

  • A repository, package manifests, and configuration.
  • A compatible runtime and the target build command.

Steps

  1. Describe allowed dependencies between project modules.
  2. Build the import graph and find cycles/forbidden relationships.
  3. Add the workflow to scripts or CI with a clear report.

Check your result

  • A clean copy of the project reproduces the result.
  • Errors produce a nonzero exit code and clear diagnostics.

Choosing dependency-cruiser

Check architectural import boundaries

Choose this when

  • Check architectural import boundaries
  • Build the import graph and find cycles/forbidden relationships

Requirements

  • Graphviz is needed only for the chosen DOT → SVG route, not for every dependency-cruiser check.

Things to consider

  • Costs and limits of free use: Computing resources, self-hosting, and external services are paid for separately if used.
  • Terms of use: MIT for the code; dependencies have separate licenses.

Frequently asked questions

What can you use for free in dependency-cruiser?

Code and local use under MIT.

What additional costs might arise with dependency-cruiser?

Computing resources, self-hosting, and external services are paid for separately if used.

What terms of use matter for dependency-cruiser?

MIT for the code; dependencies have separate licenses.

How do you get started with dependency-cruiser?

Describe allowed dependencies between project modules. Build the import graph and find cycles/forbidden relationships. Add the workflow to scripts or CI with a clear report.

Do you need Graphviz to check dependencies in CI?

Graphviz is not required for text/JSON reports or rule checking. Converting a DOT graph into SVG uses the separate dot utility. Initialization suggests rules for cycles, orphan modules, and missing package.json dependencies; configuration lets you define your own import boundaries.

License

MIT for the code; dependencies have separate licenses.

MIT — permissive license

You can use, modify, distribute, and sell the code, including in a closed-source commercial product. When sharing copies or substantial portions of the code, retain the license text and copyright notice. You do not need to open-source your entire project; the author provides no warranties.

License terms

Technologies and topics

  • dependency-cruiser
  • build
  • Development

Sources

Other resources