npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

get-pnpm

v0.0.3

Published

Installs pnpm as a standalone executable

Readme

get-pnpm

Installs pnpm as a standalone executable

Installs pnpm the same way the standalone install script does — a self-contained executable in PNPM_HOME, on your PATH, with no dependency on Node.js afterwards — for people who would rather not pipe a script into a shell.

Usage

npx get-pnpm

Install a specific version, major, or dist-tag:

npx get-pnpm 12         # the latest release of pnpm 12
npx get-pnpm next-12    # the pnpm 12 prerelease lane
npx get-pnpm 11.20.0    # an exact version

Then open a new terminal, or source the file the installer names in its output.

How it works

  1. Resolves the requested version against the pnpm dist-tags.
  2. Downloads the executable for your platform from the npm registry.
  3. Checks npm's signature over the package's checksum, then the download against that checksum.
  4. Runs pnpm setup, which installs the executable globally and adds PNPM_HOME to your PATH.

Step 3 is what makes step 2 worth trusting. The registry publishes both the tarball and its checksum, so a checksum taken from it proves nothing on its own; npm also signs <name>@<version>:<integrity> with a key that this package pins, and a download that fails either check is refused rather than installed.

The download goes to the registry npm is configured with (npm_config_registry), not to GitHub — including the tarball itself, so a registry that proxies npm and hands back an npmjs.org URL does not send the download off the mirror. The command does not support registries that require authentication; downloadPnpmExecutable takes request headers for one.

Environment variables

| Variable | Description | | --- | --- | | PNPM_VERSION | Version to install when no argument is given. | | PNPM_HOME | Directory to install pnpm into. | | npm_config_registry | Registry to download pnpm from. |

Using it from a program

installPnpm does what the command does: download, verify, then hand over to pnpm setup, which installs globally and edits your PATH. A caller that manages its own directory — a CI action, say — wants downloadPnpm instead, which verifies and places the executable and nothing else:

import { downloadPnpm } from 'get-pnpm'

const { version, binPath } = await downloadPnpm({
  versionSpec: 'next-12',
  registry: 'https://registry.npmjs.org/',
  dest: '/opt/pnpm',
})

A caller that already knows the exact version, and already has everything else pnpm ships with, wants downloadPnpmExecutable: it places the executable at a path you name and touches nothing else. No dist-tags are resolved, so no packument is fetched, and the dist/ tree that travels beside the executable is left to the caller. Corepack is the case it exists for — it unpacks the pnpm package itself but installs none of its dependencies, so the executable has to arrive separately.

import { downloadPnpmExecutable } from 'get-pnpm'

await downloadPnpmExecutable({
  version: '12.0.0',
  registry: 'https://registry.npmjs.org/',
  destPath: '/opt/pnpm/pnpm',
  headers: { authorization: 'Bearer …' }, // optional; never sent off the registry
})

It verifies exactly what the other two do, and reads the archive in-process rather than shelling out to tar, so it works where no tar is on the PATH. Placement is atomic and tolerates losing a race with a concurrent call.

Pass keys to trust a signing key other than the pinned npm one, or verifySignature: false to download from a registry that carries no npm signatures at all — a private mirror that re-published the package. The checksum is still enforced either way; what is lost is the assurance that it came from somewhere other than the host that served the bytes.

Development

pnpm install
pnpm test     # builds, then runs the tests against the build output

The published package runs on Node.js 22.13 and newer. The test runner needs 22.18 or newer, which is where Node runs TypeScript without a flag.

Other ways to install pnpm

See pnpm.io/installation. The shell and PowerShell installers in this repository do the same job for machines without Node.js, and pin the same npm signing key.