# pnpm — card for AI agents

Fast, disk space efficient package manager for Node.js projects.

Category: Dev workflow and config · npm package `pnpm` · latest version 12.16.1 (checked 2026-11-01)
Install: `npm install pnpm`
License: MIT (permissive)

In your own product (generator, app, hosted service): **yes**. Permissive license: ship it inside your own product, closed or open source, and keep its license and copyright notice.

## Agent Skills for it
- pnpm from antfu/skills: `npx skills add antfu/skills --skill pnpm`

## Numbers (AgentGid data)
- Gid Score: 75.5 (#194 of all tools, 16 of 299 in its category)
- Used in 8 public projects set up for AI coding agents (0.1%)
- Downloads last week: 358,011,586 (as of 2026-11-24), +55.8% over 4 weeks
- GitHub stars: 37,156 (as of 2026-11-24)
- Last push: 2026-11-24

## Often used with
Vitest 76.7%, Vite 73.3%, cross-env 51.7%, Husky 51.7%, viem 46.7%, concurrently 45.0%

## Links
- AgentGid page: https://agentgid.com/tools/pnpm/
- Homepage: https://pnpm.io
- Repository: https://github.com/pnpm/pnpm


## pnpm: install JavaScript packages faster, with less disk

pnpm is a free package manager for JavaScript projects, used in place of npm to install the packages a project needs. It keeps one copy of each package version on your disk and links it into every project, so repeat installs are quick. By default it does not run the install scripts of the packages you add until you approve them.

### Where to use it
- Install a project's packages quickly: Your AI assistant sets up a new web app and adds its packages; a second project with the same packages gets them from disk without downloading again.
- Several apps in one code folder: A website, an admin panel and a shared UI kit live in one shared code folder and use each other's code without publishing it first.
- Stop surprise install scripts: A package you add tries to run its own setup program during install; pnpm stops and asks you to approve it first.
- One version of React for every app: In a project with several apps, you set a shared package version in one place and update it with one line.
- Fix a bug inside a package you use: A package has a small bug and the fix is not released yet; you keep your own fix applied on every install.
- Many quick prototypes on one laptop: An AI assistant creates a new app folder for every idea you try; they all share one store, so the disk does not fill with copies. (idea, not from the official pages)

### How to start
- Install pnpm on your computer. The standalone script needs no Node.js; on Windows the docs suggest the npm route.

```
curl -fsSL https://get.pnpm.io/install.sh | sh -
```

- Or install it with npm, which needs Node.js 18 or newer.

```
npm install -g pnpm@latest
```

- In a project, use pnpm add and pnpm install where you used npm install. A project that had npm's lockfile should run pnpm import first.

```
pnpm add sax
```


### License
Free to use, also at work and in paid products, under the MIT license. Keep its copyright and license notice if you ship pnpm itself with your product.

### Good to know
- Version 12 is a new build of pnpm written in Rust. It runs on its own, without Node.js, when installed by the standalone script.
- New package versions are held back for one day by default, to avoid freshly published bad releases.
- Code can only load packages listed in its own package list. Projects that relied on npm's flat folder may break until the missing package is added.
- pnpm ignores npm's lockfile. Run pnpm import first to keep the versions npm had picked.
- Packages can ship skills for AI coding agents. pnpm 12 links them into folders like .claude/skills only after you approve them.

Checked 2026-11-11 against: https://pnpm.io/, https://pnpm.io/installation, https://pnpm.io/motivation, https://pnpm.io/supply-chain-security, https://pnpm.io/limitations, https://pnpm.io/workspaces, https://pnpm.io/cli/add, https://pnpm.io/cli/approve-builds, https://pnpm.io/pnpm-cli, https://pnpm.io/settings/build, https://pnpm.io/settings/dependency-resolution, https://pnpm.io/settings/other, https://pnpm.io/symlinked-node-modules-structure, https://pnpm.io/feature-comparison, https://pnpm.io/blog, https://pnpm.io/blog/whats-different-in-pnpm-12, https://github.com/pnpm/pnpm/blob/main/README.md, https://github.com/pnpm/pnpm/blob/main/LICENSE, https://registry.npmjs.org/pnpm/latest

### Mistakes to avoid
- Don't: pnpm add some-package@latest right after a release, then retrying or deleting the lockfile when the new version is not found → Do: Wait for the one-day delay, or list that package under minimumReleaseAgeExclude; do not turn the delay off for everything (pnpm will not install versions younger than minimumReleaseAge, 1440 minutes by default, including in transitive packages.)
- Don't: Setting dangerouslyAllowAllBuilds true to get past ERR_PNPM_IGNORED_BUILDS → Do: Approve only the packages that need it, e.g. pnpm approve-builds esbuild, or allowBuilds in pnpm-workspace.yaml (Install scripts are the usual way compromised packages run code, and strictDepBuilds fails the install on purpose.)
- Don't: Importing a package in your code that is not in package.json because it worked with npm → Do: pnpm add the package you import, or set nodeLinker to hoisted for old tools that need a flat folder (Only declared packages are linked at the top of node_modules; in our run debug's own package ms stayed inside .pnpm.)
- Don't: Deleting package-lock.json and running pnpm install on an existing npm project → Do: Run pnpm import first, check the new pnpm-lock.yaml, then delete package-lock.json (pnpm does not read npm's lockfile and would pick versions again from scratch.)
- Don't: CI scripts with pnpm install --frozen-lockfile false or pnpm install --resolution-only after moving to pnpm 12 → Do: Use pnpm install --no-frozen-lockfile, and pnpm peers check instead of --resolution-only (pnpm 12 rejects both forms that pnpm 11 accepted.)

### Questions
- Do I need Node.js to use pnpm 12? No, not for pnpm itself when installed with the standalone script. Your project may still need Node.js to run.
- Why did install fail with ERR_PNPM_IGNORED_BUILDS? A package wants to run a build script that nobody approved. Approve it with pnpm approve-builds or allowBuilds.
- Why does pnpm not install a version released an hour ago? The minimumReleaseAge setting waits 1440 minutes (one day) by default. Set it to 0 in pnpm-workspace.yaml to opt out.
- My tools break with the linked node_modules folder. What can I do? Set nodeLinker to hoisted, which builds a flat folder like npm does.
- Is there a shorter command? Yes. pn is short for pnpm, and pnx is short for pnpm dlx, which runs a package without adding it.

---
AgentGid's catalog is curated: every entry was checked against the maker's official pages (registry, repository, license and pricing pages) on the date shown; a license value shows the quote it stands on wherever AgentGid has one. Usage numbers come from AgentGid's own scan of public repositories set up for AI coding agents. Claims by makers are reported, not tested by AgentGid.
