Skip to content

npmgraph/npmgraph-cli

Repository files navigation

npmgraph-cli

Command-line interface for launching the npmgraph web site to show module dependency graphs.

Please note that the npmgraph-cli does not render dependency graphs directly. It's simply a convenience (albeit a pretty powerful one) for opening npmgraph.js.org URLs in accordance with the npmgraph URL API.

Getting Started

To install:

npm install --global npmgraph-cli

To see command help:

npmgraph -h

Examples

Command Shows dependencies...
npmgraph express ... for the express package
npmgraph --hide express ... with the inspector minimized
npmgraph --color=bus --deps=devDependencies express ... colorized by # of maintainers, including devDependencies
npmgraph minimatch cross-env rimraf ... for multiple NPM packages
npmgraph -f ./my-project/package.json ... for a local package.json file
npmgraph -f my-project/package.json my-project/packages/*/package.json ... for multiple local files (useful when local packages depend on one another)
npmgraph https://github.com/npmgraph/npmgraph/blob/main/package.json ... for a web-hosted package.json URL

Note

Web-hosted URLs must be CORS accessible.