npm is a package manager for JavaScript development in the Node.js runtime.

Some commands (assume prefixed with npm):

  • install/i: install a package.
    • --save/-S: adds as a dependency to the project; if someone runs npm install in the project directory, the package will be installed.
    • --save-dev/-D: used for tools/libraries that aren’t required for the application to run in production.
    • --global/-g: installs globally on the machine. Like pip packages, this isn’t recommended because it can clutter up the system.
  • uninstall: to uninstall a package.
  • ls: list all installed packages in the project.
  • update: updates all installed packages.

See also