madge vs Rev-dep
madge visualizes module dependencies and finds circular dependencies. rev-dep turns the same analysis into enforceable CI checks and runs faster - but madge's signature feature, the graph image, has no rev-dep equivalent.
At a glance​
| madge | Rev-dep | |
|---|---|---|
| Primary focus | graph visualization + circular deps | dependency hygiene + architecture |
| Runtime | Node | Go - single parallel pass (up to 207x faster) |
| Circular dependencies | yes | yes |
| Graph image (SVG / DOT) | yes | no |
| "Orphans" / "leaves" / "depends" queries | yes | yes (via exploratory commands) |
| Unused exports / dependencies | no | yes |
| Architecture rules | no | yes |
| CI enforcement | manual | non-zero exit codes built in |
Where rev-dep is stronger​
- Enforceable, not just informational.
rev-dep config runandcircularexit non-zero, so they gate CI directly. - Much broader - unused exports, unused/missing dependencies, module boundaries, and more.
- Speed on large graphs.
Where madge may still fit​
madge's main draw is the visual dependency graph (--image, --dot). rev-dep answers the same "what imports what" questions as text through the exploratory toolkit but renders no images. Keep madge if the picture matters.
Which should you choose?​
- Want a rendered dependency graph? madge.
- Want fast, CI-enforceable circular detection plus the rest of a hygiene suite? rev-dep.
Migrating​
See Migrating from madge for the command-to-check mapping.