Favicon of pnpm

pnpm

pnpm is a fast, disk-efficient package manager for JavaScript and Node.js that links dependencies from a shared content-addressable store.

Open Source Alternative to:
pnpm website screenshot
pnpm GitHub repository preview

pnpm is a package manager for JavaScript and Node.js projects, built as a drop-in alternative to npm and Yarn. It's aimed at developers and teams who deal with large dependency trees, monorepos, or CI pipelines where install speed and disk usage matter. Instead of copying package files into every project's node_modules, pnpm keeps a single content-addressable store on disk and links files from there, cutting down on duplication and speeding up installs.

The project has been used in production since 2016 and is reported to run in Microsoft's Rush monorepos with hundreds of projects and daily PRs. It supports Windows, Linux, and macOS, and ships a CLI written in JavaScript with an experimental Rust port (pacquet) in progress.

Key features

  • Content-addressable storage: all package files live in one place on disk; installs link to them instead of duplicating files, so multiple projects sharing a dependency don't multiply disk usage.
  • Speed: benchmarks show installs up to 2x faster than npm and Yarn classic on projects with large dependency trees.
  • Strict dependency resolution: a package can only import what's declared in its own package.json, which catches phantom dependencies that work by accident under npm's flat node_modules.
  • Deterministic installs: a pnpm-lock.yaml lockfile pins exact dependency versions across machines and CI.
  • Monorepo support: built-in workspace features for managing multiple packages in one repository.
  • Node.js version management: pnpm can also manage Node.js runtime versions, removing the need for a separate tool like nvm in some workflows.
  • Cross-platform: works the same way on Windows, Linux, and macOS.
  • Familiar CLI: commands mirror npm's, so switching over doesn't require relearning a whole workflow.

Ideal use cases

pnpm fits well in monorepos with many internal packages, where duplicated node_modules across workspaces would otherwise eat disk space and slow CI. It also helps in any setup where install time in CI is a bottleneck, since linked files from the shared store install faster than copying files fresh each time.

Teams that want to catch accidental

Share:

Stars
35.9K
Forks
1.6K
Last commit
17 hours ago
Repository age
10 years
License
MIT
Self-hosted
No
Activity score
83/100
View Repository
Ad
Favicon

 

  
 

Similar to pnpm

Favicon

 

  
 
Favicon

 

  
 
Favicon