NPM Basics

Essential NPM commands

Version and Help

npm -v # show NPM version
npm --version # show NPM version (full)
npm help # get help
npm command -h # help for specific command

Initialize Project

npm init # create package.json interactively
npm init -y # create with default values
npm init --yes # create with default values

Configuration

npm config list # show config settings
npm config get key # get config value
npm config set key value # set config value