Overview
Therev-dep config run command processes your .rev-dep.config.json(c) file and executes all enabled checks in a single, optimized pass. This is the recommended way to perform project checks as itβs significantly faster than running individual commands separately.
Syntax
How It Works
The command:- Auto-discovers config file in the current working directory
- Builds a single comprehensive dependency tree for all rules
- Executes all enabled checks in parallel within each rule
- Reports results with detailed issue listings
- Exits with code 1 if any check fails
Flags
Core Options
Working directory to run the command from
Automatically fix all fixable issues. Works for:
- Import conventions (when autofix is enabled)
- Unused exports (when autofix is enabled)
- Orphan files (when autofix is enabled)
List all detected issues instead of limiting output to first 5 issues per check
Subset of rules to run. Provide comma-separated list of rule paths to execute only specific rules from your config
Resolution Options
List of conditions for package.json imports resolution (e.g., node, imports, default)
Enable resolution of imports from monorepo workspace packages. Pass without value to follow all packages, or specify package names to follow only selected ones
Path Configuration
Path to package.json file
Path to tsconfig.json file
Output Options
Show warnings and verbose output for debugging
Display help information for the run command
Available Checks
The command executes the following checks based on your configuration:- circular-imports: Detects circular dependencies between modules
- orphan-files: Finds files not reachable from any entry point
- module-boundaries: Enforces architecture boundaries between modules
- import-conventions: Enforces import style conventions (relative vs absolute)
- unused-node-modules: Detects dependencies declared but never used
- missing-node-modules: Detects imports missing from package.json
- unresolved-imports: Finds imports that cannot be resolved
- unused-exports: Detects exports that are never imported
- restricted-dev-dependencies-usage: Finds dev dependencies used in production code
- restricted-imports: Blocks importing denied files/modules from selected entry points
Examples
Run all configured checks
List all issues without truncation
Fix all fixable issues automatically
Run specific rules only
Run with monorepo package resolution
Run specific monorepo packages only
Run from specific directory
Enable verbose output for debugging
Output Format
The command provides detailed output for each rule:Issue Listing
By default, only the first 5 issues per check are displayed. Use--list-all-issues to see everything:
Autofix Summary
When using--fix, the command shows a summary of applied fixes:
Performance Benefits
The config-based approach provides significant performance advantages:- Single Dependency Tree Build: Builds one comprehensive dependency tree for all rules
- Parallel Rule Execution: Processes multiple rules simultaneously
- Parallel Check Execution: Runs all enabled checks within each rule in parallel
- Optimized File Discovery: Discovers files once and reuses across all checks
Rev-dep can audit a 500k+ LoC project in around 500ms, making it 10x-200x faster than alternatives.
Exit Codes
- 0: All checks passed successfully
- 1: One or more checks failed with issues
Warnings
The command may display warnings for:- No files found: Check if the rule path is correct
- Missing package.json: Some features may not work without package.json in the rule path
- Unfixable issues: Inter-domain relative imports that cannot be automatically fixed
- Import conventions with package.json imports: Support not yet implemented
CI Integration
Add to your CI pipeline to enforce code quality:Related Commands
- rev-dep config init - Initialize a new config file
