Reference

Cheat Sheet

The commands you keep forgetting, with a one-line description and a real example you can copy - 384 across 26 tools. Pick a tool in the sidebar, or search across all of them.

npm / pnpm / yarn

Install, run, and publish Node packages - npm, with pnpm and yarn equivalents.
CommandWhat it doesExample
npm initCreate a package.json.npm init -y
npm installInstall everything listed in package.json.npm install
npm install <pkg>Add a runtime dependency.npm install express
npm install -DAdd a dev-only dependency.npm install -D vitest
npm install -gInstall a package globally.npm install -g pnpm
npm uninstallRemove a dependency.npm uninstall lodash
npm runRun a script defined in package.json.npm run build
npm testRun the test script.npm test
npxRun a package without installing it first.npx create-vite@latest myapp
npm ciClean, reproducible install from the lockfile.npm ci
npm updateUpdate dependencies within their version ranges.npm update
npm outdatedList dependencies that have newer versions.npm outdated
npm lsShow the installed dependency tree.npm ls --depth=0
npm versionBump the version and create a git tag.npm version patch
npm publishPublish the package to the registry.npm publish --access public
pnpmFaster, disk-efficient npm alternative.pnpm add express
yarnAnother popular package manager.yarn add express