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

@mwpryer/pm

v0.3.1

Published

Unified CLI for npm/pnpm/bun

Readme

pm

Unified CLI for npm, pnpm, and bun.

npm version

Why

Every package manager has its own CLI with different commands, flags, and quirks. Switching between projects means remembering which incantation to use.

pm detects your project's package manager and translates a single set of commands automatically, so you only need to learn one CLI.

Install

npm i -g @mwpryer/pm

Commands

| Command | Description | | ------- | ----------------------------------- | | ni | Install dependencies / add packages | | nr | Run scripts | | nun | Uninstall packages | | nci | Clean install (frozen lockfile) | | nup | Upgrade packages | | ndd | Deduplicate dependencies | | nlx | Execute packages | | na | Agent passthrough |

ni - install

| Usage | npm | pnpm | bun | | -------------- | ------------------ | -------------------------- | ------------------------------- | | ni | npm i | pnpm i | bun install | | ni zod | npm i zod | pnpm add zod | bun add zod | | ni -D vitest | npm i -D vitest | pnpm add -D vitest | bun add -d vitest | | ni -g tsx | npm i -g tsx | pnpm add -g tsx | bun add -g tsx | | ni --frozen | npm ci | pnpm i --frozen-lockfile | bun install --frozen-lockfile | | ni -P | npm i --omit=dev | pnpm i --production | bun install --production | | ni zod -w ui | npm i zod -w ui | pnpm add zod --filter ui | bun add zod --cwd packages/ui |

nr - run

| Usage | npm | pnpm | bun | | -------------------- | ----------------------------------------- | ---------------------------- | ---------------------------- | | nr | npm run start | pnpm run start | bun run start | | nr dev | npm run dev | pnpm run dev | bun run dev | | nr dev --port 3000 | npm run dev -- --port 3000 | pnpm run dev --port 3000 | bun run dev --port 3000 | | nr - | Rerun last script | Rerun last script | Rerun last script | | nr build -w ui | npm run -w ui build | pnpm --filter ui run build | bun run --filter ui build | | nr build -r | npm run --workspaces --if-present build | pnpm -r run build | bun run --workspaces build |

-w <pkg> targets a single workspace package and -r runs across all of them. Both work from any directory in the monorepo.

nun - uninstall

| Usage | npm | pnpm | bun | | --------------- | ------------------------- | ----------------------------- | ---------------------------------- | | nun zod | npm uninstall zod | pnpm remove zod | bun remove zod | | nun -g tsx | npm uninstall -g tsx | pnpm remove --global tsx | bun remove -g tsx | | nun zod -w ui | npm uninstall zod -w ui | pnpm remove zod --filter ui | bun remove zod --cwd packages/ui |

nci - clean install

Runs a frozen install if a lockfile exists, otherwise falls back to a regular install.

| Usage | npm | pnpm | bun | | ------------------- | -------- | -------------------------- | ------------------------------- | | nci (lockfile) | npm ci | pnpm i --frozen-lockfile | bun install --frozen-lockfile | | nci (no lockfile) | npm i | pnpm i | bun install |

nup - upgrade

| Usage | npm | pnpm | bun | | --------- | ---------------- | ----------------- | ---------------- | | nup | npm update | pnpm update | bun update | | nup zod | npm update zod | pnpm update zod | bun update zod | | nup -i | N/A | pnpm update -i | bun update -i |

ndd - dedupe

| Usage | npm | pnpm | bun | | -------- | ---------------------- | --------------------- | --- | | ndd | npm dedupe | pnpm dedupe | N/A | | ndd -c | npm dedupe --dry-run | pnpm dedupe --check | N/A |

nlx - execute

| Usage | npm | pnpm | bun | | ------------ | ------------ | ----------------- | -------------- | | nlx vitest | npx vitest | pnpm dlx vitest | bun x vitest |

na - agent

Passes arguments directly to the detected package manager.

| Usage | npm | pnpm | bun | | --------------- | ---------------- | ----------------- | ---------------- | | na info react | npm info react | pnpm info react | bun info react |

Detection

pm detects the package manager in the following order:

  1. Lockfiles: bun.lock or bun.lockb, pnpm-lock.yaml or pnpm-workspace.yaml, package-lock.json
  2. The packageManager field in package.json
  3. The defaultAgent setting from the config file

Configuration

Config file: ~/.pmrc.json

{
  "defaultAgent": "npm",
  "globalAgent": "npm"
}

| Option | Description | Default | | -------------- | ------------------------------- | ------- | | defaultAgent | Fallback when no PM is detected | npm | | globalAgent | PM used for -g operations | npm |

Environment variables

| Variable | Description | | ------------------ | ------------------------ | | PM_DEFAULT_AGENT | Overrides defaultAgent | | PM_GLOBAL_AGENT | Overrides globalAgent | | PM_CONFIG_FILE | Custom config file path |

Environment variables take priority over the config file.

Other features

pm has a few extras:

  • append ? to any command to print it without running it, for example ni zod ?
  • pass -C <dir> to run the command in another directory, for example ni -C packages/core
  • run nr - to rerun the last script

Credits

Inspired by @antfu/ni.

Licence

MIT