curl -fsSL https://get.pnpm.io/install.sh | sh -Install pnpm via the official standalone script.
Comprehensive pnpm CLI reference for installs, dependency management, scripts, filtering, and inspection.
Install pnpm, initialize projects, and get quick help.
curl -fsSL https://get.pnpm.io/install.sh | sh -Install pnpm via the official standalone script.
Creates the pnpm home directory and updates shell configuration as needed.
pnpm setupCreates the pnpm home directory and updates shell configuration as needed.
pnpm initCreate a package.json interactively.
pnpm helpDisplay top-level CLI help.
pnpm help addDisplay help for a specific subcommand.
pnpm --versionPrint the installed pnpm version.
pnpm exec node --versionCheck the Node runtime in the current environment.
Core package management commands.
pnpm installInstall dependencies from package.json and lockfile.
pnpm install --frozen-lockfileFail if the lockfile would need changes; common in CI.
pnpm install --offlineInstall using only already-fetched packages from the store.
pnpm add lodashAdd a package to dependencies.
pnpm add -D typescriptAdd a package to devDependencies.
pnpm add -O fseventsAdd a package to optionalDependencies.
pnpm add react@18.3.1 --save-exactSave an exact version instead of a range.
pnpm remove lodashRemove a package from dependencies.
pnpm updateUpdate dependencies according to the allowed ranges.
pnpm update react --latestUpdate a package to the latest available version.
pnpm dedupeReduce duplicates in the lockfile when possible.
Generate pnpm-lock.yaml from package-lock.json, npm-shrinkwrap.json, or yarn.lock.
pnpm importGenerate pnpm-lock.yaml from package-lock.json, npm-shrinkwrap.json, or yarn.lock.
Run scripts, binaries, and inspect dependency state.
pnpm run buildRun a script from package.json.
pnpm testRun a script without typing run when there is no command ambiguity.
Run a locally installed binary without adding it to PATH manually.
pnpm exec eslint .Run a locally installed binary without adding it to PATH manually.
pnpm dlx create-vite@latest my-appDownload and run a package without permanently installing it.
pnpm listShow installed packages in a tree structure.
pnpm list --depth 0Show only top-level dependencies.
pnpm why reactShow why a package is installed in the dependency graph.
pnpm outdatedList dependencies with newer versions available.
pnpm auditScan dependencies for known vulnerabilities.
pnpm audit --fixTry to apply non-breaking security updates automatically.
pnpm store pathShow the location of the content-addressable store.
Target specific workspace packages and run recursively.
pnpm -r installRun install recursively across workspace packages.
pnpm -r run buildRun a script recursively in all packages.
pnpm --filter @acme/web testLimit a command to a selected workspace package.
pnpm --filter @acme/ui... buildTarget a package and packages that depend on it.
pnpm --filter ...@acme/api testTarget a package and its dependency chain.
pnpm --filter ./packages/web... lintTarget packages by path selector.
pnpm -r --parallel run devRun a script in parallel across packages.
pnpm -r --stream testStream real-time output from recursive runs.