Easily see the dependency graph of your npm project!
npm install -g easy-dep-graphRun the following command on the folder where you package.json is:
npx easy-dep-graphDisplay a comprehensive view of all peer dependencies required by your project's packages. This includes:
- Package names and required versions
- Which packages require each peer dependency
- Automatic conflict detection when multiple incompatible versions are required
- Installation status (showing which peer dependencies are already installed)
- One-click installation for missing peer dependencies
Command: --peer-dependencies
Example:
npx easy-dep-graph --peer-dependenciesA list of packages to show on the graph separated by ','. (By default it shows all packages)
Command: --packages <packages names>
Example:
npx easy-dep-graph --packages open,mustache,fastifyThis option will only show on graph the packages that depend on the submited package.
Command: --package-dependents <package name>
Example:
npx easy-dep-graph --package-dependents is-dockerThe port number to be used when serving the dependency graph. (Default is 8080)
Command: --port <port number>
Example:
npx easy-dep-graph --port 8000Flag to not open the browser after the depedency graph is done.
Command: --no-open
Example:
npx easy-dep-graph --no-openFlag to skip applying the force-directed layout algorithm to the dependency graph. When this flag is used, the graph will display nodes in their initial random positions without automatic layout optimization. This can be useful for very large graphs where the layout calculation might take too long, or when you want to manually arrange nodes.
Command: --no-force-layout
Example:
npx easy-dep-graph --no-force-layoutScan your project's node_modules for known malicious, compromised, or typosquatted npm packages. This combines:
- A built-in database of known malicious packages (compromised versions of axios, ua-parser-js, event-stream, colors, faker, node-ipc, and many typosquats)
- Live vulnerability data from
npm audit
Results are displayed in the terminal as a severity-sorted summary and as an interactive HTML report in the browser.
Command: --security-scan
Example:
npx easy-dep-graph --security-scanCombine with other flags:
npx easy-dep-graph --security-scan --port 3000 --no-openVersion 1.2:
- Added
--security-scanflag to detect known malicious, compromised, and typosquatted npm packages - Built-in database of 40+ known compromised packages versions including axios, ua-parser-js, event-stream, coa, rc, colors, faker, node-ipc, and many typosquats
- Integration with
npm auditfor live vulnerability data - Terminal summary with color-coded severity levels
- Interactive HTML security report served in browser
Version 1.1:
- Added
--peer-dependenciesflag to display all peer dependencies in your project - Interactive peer dependency viewer with one-click installation
- Automatic version conflict detection for peer dependencies
- Replaced vis-network with sigma.js for dependency view
Version 1.0:
- published library
No FAQs for now. (⌐■_■)