Cheat Sheet

npm CLI Cheat Sheet

By Lucas Holmquist
April 20, 2021

npm cheat sheet cover

This cheat sheet will introduce developers to npm, which is 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.

Cheat Sheet Excerpt

-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)

Want to see more? Get the full cheat sheet.

Comments