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

@heroor/npmm

v0.2.0

Published

An npm / pnpm / yarn / bun command alias. Run `n <args>` or `npmm <args>`, and npmm will detect the package manager for the current project, then forward all arguments to that command.

Readme

npmm

An npm / pnpm / yarn / bun command alias. Run n <args> or npmm <args>, and npmm will detect the package manager for the current project, then forward all arguments to that command.

Features

  • Supports npm, pnpm, yarn, and bun
  • Provides both n and npmm command aliases
  • Prefers the packageManager field in package.json
  • Falls back to lockfile detection when packageManager is not set
  • Searches upward from the current directory, which works well in monorepo subdirectories
  • Prompts for a package manager when multiple lockfiles are found

Installation

npm install -g @heroor/npmm

You can also install it globally with your preferred package manager:

pnpm add -g @heroor/npmm
yarn global add @heroor/npmm
bun install --global @heroor/npmm

The n command name may conflict with other tools. If you already have another n command installed, use npmm instead.

Usage

Replace your package manager command with n inside a project:

n install
n run dev
n run build
n add react
n remove lodash

You can also use the full command name:

npmm install
npmm run dev

npmm prints the command it is about to run, for example:

pnpm install

Then it starts the detected package manager and forwards the original arguments.

Package Manager Detection

npmm starts from the current working directory and walks up parent directories until it finds the nearest package.json or supported lockfile.

Detection priority:

  1. If package.json has a packageManager field, npmm uses that manager.
  2. If lockfiles point to exactly one package manager, npmm uses that manager.
  3. If lockfiles point to multiple package managers in an interactive terminal, npmm prompts you to choose one.
  4. If no project signal is found, npmm defaults to npm.

Supported lockfiles:

| Package manager | Lockfile | | --------------- | ------------------- | | npm | package-lock.json | | pnpm | pnpm-lock.yaml | | yarn | yarn.lock | | bun | bun.lock, bun.lockb |

For stable CI and script usage, declare the package manager in package.json:

{
  "packageManager": "[email protected]"
}

Non-Interactive Environments

If a project has lockfiles for multiple package managers and no packageManager field, npmm fails in non-interactive environments. Add packageManager to package.json to make CI, pre-commit hooks, and scripts deterministic.

Bun Support

Bun is supported as a package manager when a project declares packageManager: "bun@...", has bun.lock, or has the legacy bun.lockb lockfile.

npmm forwards commands to bun without translating arguments. Command and flag compatibility follows Bun's CLI behavior, so n run dev becomes bun run dev and runs through Bun.

Development

pnpm install
pnpm test
pnpm run dev
pnpm run typecheck
pnpm run build

Source files live in src/, and build output is written to dist/. The prepack script runs the build before publishing.

License

MIT