Skip to main content

Requirements

Rev-dep requires Node.js 18 or higher. Check your Node version:
node --version
If you need to upgrade Node.js, visit nodejs.org or use a version manager like nvm.
Installing Rev-dep as a dev dependency allows you to:
  • Set up project-specific check scripts
  • Share configuration across your team
  • Version lock the tool with your project
  • Run checks in CI/CD pipelines
Local installation is the recommended approach for project-based governance and CI integration.
npm install -D rev-dep
After installation, you can run Rev-dep using npx:
npx rev-dep --help

Quick Start After Local Install

Create a configuration file to get started quickly:
npx rev-dep config init
1

Initialize configuration

The config init command creates a rev-dep.config.json file with sensible defaults:
  • In monorepo root: Creates a root rule and a rule for each workspace package
  • In single package: Creates a single rule with path: "." for the current directory
2

Add to package.json scripts

Add Rev-dep commands to your package.json for easy execution:
package.json
{
  "scripts": {
    "check:deps": "rev-dep config run",
    "check:circular": "rev-dep circular",
    "check:unused": "rev-dep node-modules unused"
  }
}
3

Run your first check

Execute the checks defined in your configuration:
npm run check:deps

Global Installation

Installing Rev-dep globally provides a CLI tool available anywhere on your system. This is useful for:
  • Ad-hoc analysis across different projects
  • Exploratory commands without project setup
  • Quick dependency investigations
npm install -g rev-dep
After global installation, run Rev-dep directly:
rev-dep --help
Global installation is great for exploration, but local installation is recommended for project governance and CI integration to ensure version consistency.

Verification

Verify your installation by checking the version:
rev-dep --version
Or run a simple command to test functionality:
rev-dep entry-points
This will discover all entry points in your current directory.

Platform-Specific Notes

Linux

Rev-dep includes platform-specific binaries for Linux x64. Installation should work out of the box on most distributions.

macOS

Rev-dep includes platform-specific binaries for macOS (both Intel and Apple Silicon). On first run, you may need to grant permission in System Preferences if macOS blocks the binary.

Windows

Rev-dep includes platform-specific binaries for Windows x64. Windows Defender or antivirus software may scan the binary on first run.

TypeScript Projects

Rev-dep automatically detects and uses your tsconfig.json for path alias resolution. No additional configuration needed! The tool looks for tsconfig.json in:
  1. Current working directory
  2. Parent directories (walking up the tree)
You can also specify a custom path:
rev-dep circular --tsconfig-json ./custom/tsconfig.json

Monorepo Projects

Rev-dep has first-class support for monorepos. It automatically detects:
  • pnpm workspaces via pnpm-workspace.yaml
  • npm/Yarn workspaces via package.json workspaces field
No additional setup required! Just install and run.
Use the --follow-monorepo-packages flag with CLI commands to enable cross-package dependency resolution, or set followMonorepoPackages: true in your config.

Next Steps

Now that you’ve installed Rev-dep, learn how to use it:

Quick Start

Run your first checks and explore CLI commands

Configuration

Set up advanced config-based governance

Build docs developers (and LLMs) love