Skip to main content

dependency-cruiser vs Rev-dep

dependency-cruiser validates dependencies against custom forbidden rules and draws dependency graphs. rev-dep covers the same validation with purpose-built checks and runs faster - but dependency-cruiser is also a graph visualizer, which rev-dep is not.

At a glance​

dependency-cruiserRev-dep
Primary focusdependency rules + visualizationdependency hygiene + architecture
RuntimeNodeGo - single parallel pass (faster)
Circular / orphan detectionyesyes
Path-to-path forbidden rulesyes (generic from/to)yes (boundaries + restricted imports)
Unused / missing dependenciespartialyes
Unused exportsnoyes
Graph visualization (dot/mermaid/HTML)yesno
Config.dependency-cruiser.js (regex rules)rev-dep.config.jsonc (named checks, globs)

Where rev-dep is stronger​

Where dependency-cruiser may still fit​

Its headline feature is visualization - rendering the graph as SVG, mermaid, or HTML. rev-dep answers reachability as text via the exploratory toolkit but produces no images. If you rely on the diagrams, keep dependency-cruiser for that.

Which should you choose?​

  • Need dependency-graph diagrams? dependency-cruiser (optionally alongside rev-dep for the checks).
  • Want fast, named architecture checks plus unused-code/dependency detection in one config? rev-dep.

Migrating​

See Migrating from dependency-cruiser to translate your forbidden rules into rev-dep checks.