pnpm installs JavaScript dependencies quickly by linking files from a content-addressable store, enforcing strict dependency boundaries and deterministic lockfiles. It supports monorepos, workspace tooling, and optional Node.js runtime management.
Overview
pnpm is a package manager for Node.js projects that stores each file once on disk and hard-links copies into per-project node_modules trees. That design reduces duplicate downloads and speeds installs, especially when many projects share versions of the same packages.
Published benchmarks report faster installs than npm and Yarn Classic, with parallel resolve, fetch, and link stages. A strict layout exposes only dependencies declared in package.json at the top level, which limits accidental imports of transitive packages. Monorepo features include workspace protocols, filtering commands, shared catalog version ranges, and unified lockfiles.
Security-oriented defaults can block arbitrary postinstall scripts unless approved, delay freshly published versions, and restrict exotic transitive sources. Users can patch third-party packages locally, pin Node.js versions per project, and compare feature parity with npm in published docs.
pnpm runs on Windows, Linux, and macOS and is used in large production monorepos. An experimental Rust rewrite of the CLI exists apart from the main JavaScript implementation.
Key features
- Content-addressable global store
- Strict node_modules dependency visibility
- pnpm-lock.yaml deterministic lockfile
- First-class monorepo workspaces
- Shared catalog version definitions
- Approved build script execution
- Dependency patching on install
- Built-in Node.js version management
Use cases
- Large JavaScript monorepos
- CI installs with warm caches
- Saving disk across many clones
- Controlling transitive install scripts
- Pinning Node per repository