What is Rev-dep?
Rev-dep is a high-speed static analysis tool designed to enforce architecture integrity and dependency hygiene across large-scale JavaScript and TypeScript projects. Think of Rev-dep as a high-speed linter for your dependency graph. As codebases scale, maintaining a mental map of dependencies becomes impossible. Rev-dep consolidates fragmented, sequential checks from multiple slow tools into a single, high-performance engine.Rev-dep can audit a 500k+ LoC project in approximately 500ms, offering 10x-200x faster execution than alternatives.
Why Rev-dep?
Rev-dep moves beyond passive scanning to active enforcement, answering (and failing CI for) the hard questions:Architecture Integrity
Is my ‘Domain A’ illegally importing from ‘Domain B’?
Dead Code & Bloat
Are these files unreachable, or are these node_modules unused?
Refactoring Safety
Which entry points actually use this utility, and are there circular chains?
Workspace Hygiene
Are my imports consistent and are all dependencies declared?
Key Capabilities
Built for Speed and CI Efficiency
Implemented in Go to eliminate the performance tax of Node-based analysis. By processing files in parallel, Rev-dep significantly reduces CI costs and developer wait-states.First-class Monorepo Support
Designed for modern workspaces (pnpm, yarn, npm). Rev-dep natively resolves package.json exports/imports maps, TypeScript aliases, and traces dependencies across package boundaries.
Config-Based Codebase Governance
Move beyond passive scanning. Use the configuration engine to enforce Module Boundaries and Import Conventions. Execute a full suite of hygiene checks in a single, parallelized pass that serves as a high-speed gatekeeper for your CI. Available checks:moduleBoundaries- Enforce architecture boundaries between modulesimportConventions- Enforce import style conventions (offers autofix)unusedExportsDetection- Detect exports that are never used (offers autofix)orphanFilesDetection- Detect dead/orphan files (offers autofix)unusedNodeModulesDetection- Detect dependencies declared but not usedmissingNodeModulesDetection- Detect imports missing from package.jsonunresolvedImportsDetection- Detect unresolved import requestscircularImportsDetection- Detect circular importsdevDepsUsageOnProdDetection- Detect dev dependencies used in production coderestrictedImportsDetection- Block importing denied files/modules from selected entry points
Exploratory Toolkit
CLI toolkit that helps debug issues with dependencies between files. Understand transitive relations between files and fix issues:entry-points- Discover project entry pointsfiles- List dependency tree files for a given entry pointresolve- Trace dependency paths between filesimported-by- List direct importers of a filecircular- List circular dependency chainsnode-modules- Inspect used, unused, missing, and installed node moduleslines-of-code- Count effective LOClist-cwd-files- List all source code files in CWD
How It Works
Rev-dep performs static analysis by:- Building a comprehensive dependency graph of your entire codebase
- Resolving all imports including TypeScript aliases, package.json exports, and monorepo references
- Running multiple checks in parallel across the dependency graph
- Reporting violations with precise file locations and actionable insights
- Offering autofix for many common issues
The configuration approach builds one comprehensive dependency tree for all rules and processes multiple checks simultaneously, making it significantly faster than running individual commands sequentially.
Use Cases
Rev-dep serves as a high-speed gatekeeper for your CI, ensuring your dependency graph remains lean and your architecture stays intact as you iterate:- Pre-commit hooks - Catch issues before they reach CI
- CI/CD pipelines - Fast validation without slowing down builds
- Monorepo management - Maintain boundaries between packages
- Code cleanup - Identify and remove dead code systematically
- Refactoring - Understand impact before making changes
- Architecture enforcement - Prevent unwanted dependencies between layers
Next Steps
Installation
Get started with Rev-dep in your project
Quick Start
Run your first checks in minutes
