npm cheat sheet cover

npm CLI Cheat Sheet

Lucas Holmquist


This cheat sheet will introduce developers to npm,  the package manager that comes with Node.js. After reading this cheat sheet, the readers will have a better understanding of how to:

  • Create new Node.js applications.
  • Install third-party Node.js modules.
  • Publish your own modules.
  • Run npm life cycle scripts.
  • Audit your Node.js application for security vulnerabilities.


-v, --version: Prints the current version of npm you are using

-h, --help: Quick help on the specified command

-l: Displays full usage info

npx [command]: Runs an arbitrary command from an npm module (either one installed locally, or fetched remotely)