Smart dependency auditor and graph visualizer for Node.js and Python projects.
- Parses
package.json,requirements.txt, andpyproject.toml - Builds a directed in-memory dependency graph
- Detects cycles (Tarjan's SCC algorithm)
- Finds unused dependencies by scanning source imports
- Detects version conflicts across the graph
- Classifies licenses (permissive / copyleft / unknown)
- Outputs: colored terminal tree, JSON, self-contained HTML report
npm install -g .Or with Docker:
docker build -t depgraph .
docker run --rm -v $(pwd):/project depgraph analyze /project# Analyze a Node.js project and show the terminal tree
depgraph analyze ./my-app
# Find all dependency cycles
depgraph cycles ./my-app
# List unused declared dependencies
depgraph unused ./my-app
# Generate reports
depgraph report ./my-app --format terminal
depgraph report ./my-app --format json -o report.json
depgraph report ./my-app --format html -o report.html
# Show license breakdown
depgraph licenses ./my-appmy-app@1.0.0
├── chalk@^5.3.0 [dep]
├── commander@^12.1.0 [dep]
│ └── ...
└── vitest@^1.0.0 [dev]
{
"schemaVersion": "1.0.0",
"generatedAt": "2025-03-15T10:00:00.000Z",
"graph": { "nodeCount": 42, "edgeCount": 67, "nodes": [...], "edges": [...] },
"analysis": {
"cycles": [],
"unusedDeps": ["moment"],
"conflicts": [],
"licenses": [...]
}
}A self-contained single-file report with a collapsible dependency tree, cycle warnings, and license table. No external CDN dependencies.
npm install
npm run build
npm test| File | Ecosystem |
|---|---|
package.json |
Node.js (deps, devDeps, peerDeps) |
requirements.txt |
Python (PEP 508 constraints) |
pyproject.toml |
Python (PEP 621 + Poetry) |
MIT