npm helpOpen npm help.
Core npm CLI, package inspection, package.json editing, and daily workflow commands.
Core package and registry commands.
npm helpOpen npm help.
npm --versionPrint the current npm version.
npm initRun the interactive package initializer.
npm init -yCreate package.json using defaults.
npm installInstall project dependencies.
npm ciInstall exactly from package-lock.json for CI.
npm exec -- <command>Run a binary from local dependencies or a temp package.
npx <command>Run a package executable without adding it to scripts.
Inspect installed packages and registry info.
npm lsShow installed dependency tree.
npm outdatedList packages with newer available versions.
npm view <package>Show metadata from the registry.
npm view <package> versionShow the current published version.
npm explain <package>Show why a package exists in the dependency tree.
npm query ".workspace"Query dependency tree nodes using selectors.
npm fundDisplay funding URLs for dependencies.
npm docs <package>Open a package documentation page.
Inspect and edit package metadata from the CLI.
npm pkg get scriptsRead a field from package.json.
npm pkg set scripts.build="tsc -p ."Write a field to package.json.
npm pkg delete scripts.testRemove a field from package.json.
npm prefixPrint the nearest package root path.
npm rootPrint the local node_modules directory.
Common commands used in app development.
npm run buildRun the build script from package.json.
npm testRun the test script.
npm run lintRun a lint script.
npm startRun the start script.
npm restartRun stop then start lifecycle commands if present.
npm run envShow environment variables available to scripts.