deps-graph-visualizer
v1.0.0
Published
A CLI tool to visualize your project's dependency graph in the terminal
Downloads
13
Maintainers
Readme
📦 Dependency Graph Visualizer
A simple CLI tool to visualize your project's dependency graph directly in the terminal with one command.
Installation
Using NPX (after publishing to npm)
Once published to npm, you can run it directly without installation:
npx deps-graph-visualizerLocal Development / Testing
To test locally, you can:
- Install dependencies:
npm install- Run directly:
node bin/cli.js- Or link it globally for testing:
npm link
deps-graphGlobal Installation
npm install -g deps-graph-visualizerUsage
Navigate to your project directory and run:
npx deps-graph-visualizerOptions
-d, --dev- Include devDependencies in the visualization-p, --path <path>- Path to package.json directory (default: current directory)--depth <number>- Maximum depth to traverse the dependency tree (default: 3)-m, --mode <mode>- Visualization mode:treeorlist(default:tree)
Examples
# Basic usage
npx deps-graph-visualizer
# Include devDependencies
npx deps-graph-visualizer --dev
# Set maximum depth to 2
npx deps-graph-visualizer --depth 2
# Use list mode instead of tree
npx deps-graph-visualizer --mode list
# Visualize dependencies in a specific directory
npx deps-graph-visualizer --path /path/to/projectFeatures
- 🌳 Beautiful tree visualization of dependencies
- 🎨 Color-coded output for better readability
- 🔄 Handles circular dependencies gracefully
- 📊 Shows dependency counts and summary
- ⚡ Fast and lightweight
- 🔍 Supports both dependencies and devDependencies
How It Works
The tool reads your package.json file and recursively traverses the dependency tree, displaying it in a visual tree format in your terminal. It handles circular dependencies and limits the depth to prevent overwhelming output.
License
MIT
