@asdsadw12312dwd2112xz/dep-cruiser-cli
v1.0.0
Published
Analyze and visualize module import dependencies in JS/TS projects
Maintainers
Readme
dep-cruiser-cli
Analyze and visualize module import dependencies in JS/TS projects.
Install
npm install -g dep-cruiser-cliUsage
# Scan from entry point
dep-cruiser --entry src/index.ts
# Limit depth
dep-cruiser --entry src/index.ts --depth 3
# Exclude patterns
dep-cruiser --entry src/index.ts --exclude "test|spec"
# Find orphan files (not imported by anything)
dep-cruiser --entry src/index.ts --orphans
# JSON output
dep-cruiser --entry src/index.ts --jsonOptions
| Flag | Description |
|------|-------------|
| --entry <file> | Entry point file to start analysis |
| --depth <n> | Limit traversal depth |
| --exclude <pattern> | Regex pattern to exclude files |
| --orphans | Show files not imported by anything |
| --json | Output full dependency graph as JSON |
Output
- ASCII dependency tree with depth-based coloring
- Circular dependencies highlighted in red
- Summary: total files, imports, and circular dependencies
License
MIT
