Skip to main content
Version: 3.x

knip vs Rev-dep

knip is a Node-based tool that finds unused files, exports, and dependencies. rev-dep covers that same core in Go and adds architecture checks - but knip reports at a finer granularity in a few areas. Here's how they line up.

At a glance​

knipRev-dep
Primary focusunused files / exports / dependenciesdependency hygiene + architecture
RuntimeNodeGo - single parallel pass (up to 20x faster)
Unused files / exports / depsyesyes
Member / namespace / duplicate-levelyesno
Circular importsyes (opt-in --cycles; value imports only)yes (type imports included unless ignoreTypeImports)
Boundaries, restricted imports, conventionsnoyes
Graph visualizationnono
Configknip.json / knip.tsone rev-dep.config.jsonc
Monorepoyesyes (per-workspace rules)

Where rev-dep is stronger​

  • Speed on large codebases - one Go pass instead of Node analysis.
  • Cycles including type-only imports. knip's opt-in --cycles always ignores type-only import edges, with no flag to include them. rev-dep's circular check includes them by default and can exclude them with ignoreTypeImports.
  • Architecture governance knip doesn't do: module boundaries, restricted imports, import conventions, and dev-deps in production.
  • One tool for unused code and structure, instead of pairing knip with a boundaries linter.

Where knip may still fit​

knip reports things rev-dep does not: unused class/enum members, namespace-level exports, duplicate exports, unused catalog entries, and missing/optional binaries. If you depend on that granularity, knip remains valuable.

Which should you choose?​

  • Want the finest-grained unused-code report and knip's plugin ecosystem? knip.
  • Want speed, architecture enforcement, and one config that replaces several tools? rev-dep.

Migrating​

Decided to switch? The Migrating from knip guide maps every knip option to its rev-dep equivalent.