npm_ex exposes npm-like workflows as Mix tasks.

Install and update

TaskPurpose
mix npm.initcreate package.json
mix npm.installinstall dependencies from package.json
mix npm.install packageadd a package and install
mix npm.install --frozenfail if npm.lock is stale
mix npm.ciCI alias for frozen install
mix npm.getfetch and link from npm.lock without re-resolving
mix npm.updateupdate all packages within configured ranges
mix npm.update packageupdate one package
mix npm.remove packageremove a package
mix npm.pruneremove extraneous packages
mix npm.rebuildclean and reinstall from lockfile

Inspect dependency state

TaskPurpose
mix npm.list / mix npm.lslist installed packages
mix npm.treeshow dependency tree
mix npm.why packageexplain why a package is installed
mix npm.outdatedshow newer package versions
mix npm.dedupere-resolve to minimize duplicates
mix npm.deprecationsshow deprecated packages
mix npm.licenseslist dependency licenses
mix npm.fundshow package funding info
mix npm.statsshow dependency statistics
mix npm.sizeestimate installed package sizes

Run package code

TaskPurpose
mix npm.run scriptrun a script from package.json
mix npm.exec binaryexecute a binary from node_modules/.bin

Registry and package information

TaskPurpose
mix npm.info package / mix npm.view packageshow package metadata
mix npm.search querysearch the registry
mix npm.publishpublish package to registry
mix npm.tokenmanage registry auth tokens

Verification and security

TaskPurpose
mix npm.verify / mix npm.checkverify node_modules matches npm.lock
mix npm.auditnpm registry vulnerability audit
mix npm.audit --osvonline OSV malicious-package audit
mix npm.audit --compromisedoffline malicious-package DB audit
mix npm.doctordiagnose setup problems

Cache and config

TaskPurpose
mix npm.cache statusshow cache status
mix npm.cache cleanclean global cache
mix npm.configshow effective configuration
mix npm.setmodify configuration
mix npm.completionshell completion helpers

Run any task with invalid arguments to see its usage string. Full task moduledocs are available in the API reference.