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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@rnm/pm

v0.5.2

Published

Unified Package Manager for Node.js

Downloads

719

Readme

📦 PM

PRs Welcome

A unified package manager for Node.js that supports npm, yarn, and pnpm. This human-friendly Corepack wrapper lets you forget about npm, yarn, and pnpm — just use the pm command for everything.

Highlights

  • 📦 All-in-One: Supports npm, yarn, and pnpm without extra installations.
  • 🎯 Auto Detect: Automatically detects the correct package manager.
  • ⬇️ Auto Fallback: Automatically falls back to npm if no package manager is detected.
  • 🔀 Version Management: Automatically switches to the proper version of the detected package manager.
  • ⚡️ Zero Configuration: No configuration required. Just install globally and start using it.
  • 🌍 Global Safety: Does not modify or override existing global package managers.
  • 🪶 Lightweight: Tiny codebase (< 300 lines).

Installation

npm install -g @rnm/pm

Usage

Inside Projects

When inside a project directory, pm and px are aliases for npm/yarn/pnpm and npx/yarnpkg/pnpx respectively. The choice depends on the project's configuration. Falls back to npm and npx if no specific package manager is detected.

Configure packageManager or devEngines.packageManager in package.json:

{
  "packageManager": "[email protected]",
  "devEngines": {
    "packageManager": {
      "name": "pnpm",
      "version": "10.0.0"
    }
  }
}

Commands work exactly like the underlying package manager:

# pm = smart alias for npm/yarn/pnpm
pm install    # → npm/yarn/pnpm install
pm run build  # → npm/yarn/pnpm run build
pm --help     # → npm/yarn/pnpm --help
pm --version  # → npm/yarn/pnpm --version

# px = smart alias for npx/yarnpkg/pnpx
px create-react-app my-app --template typescript  # → npx/yarnpkg/pnpx create-react-app my-app --template typescript
px tsx --watch src/index.ts                       # → npx/yarnpkg/pnpx tsx --watch src/index.ts

Outside Projects

When outside project directories, pm and px are aliases for npm and npx. These are typically used for global operations.

# pm = alias for npm
pm install -g typescript@latest  # → npm install -g typescript@latest
pm list -g --depth=0             # → npm list -g --depth=0

# px = alias for npx
px create-react-app my-app --template next  # → npx create-react-app my-app --template next
px degit user/repo my-app                   # → npx degit user/repo my-app

Advanced Usage

The pm-cli command provides additional utilities for advanced use cases.

Enable Shim Commands

Use pm-cli enable-shim to create symbolic links that replace the native package manager commands with @rnm/pm equivalents:

# Enable shims for all package managers (npm, yarn, pnpm, npx, yarnpkg, pnpx)
pm-cli enable-shim

# Enable shims for specific package managers only
pm-cli enable-shim npm yarn
pm-cli enable-shim pnpm

This command creates symbolic links in your global installation directory, so when you run npm, yarn, or pnpm, they will automatically use the @rnm/pm detection logic.

⚠️ Warning: This will override your existing global package manager commands. Use with caution and ensure you understand the implications.

Differences from Corepack

  1. Field Detection: @rnm/pm detects packageManager, devEngines, and engines fields in package.json, while Corepack only supports packageManager and devEngines.
  2. Version Range Support: @rnm/pm supports version ranges (e.g., ^10.0.0) in packageManager and devEngines.packageManager.version fields, while Corepack only accepts specific versions.
  3. Lock File Detection: @rnm/pm automatically detects lock files (package-lock.json, yarn.lock, pnpm-lock.yaml) to determine the package manager, while Corepack does not.
  4. Environment Variables: @rnm/pm ignores COREPACK_* environment variables for non-configurable behavior, while Corepack respects them.
  5. Configuration Files: @rnm/pm ignores .corepack.env files, while Corepack reads them for configuration.
  6. Registry Configuration: @rnm/pm uses npm config get registry for package installation, while Corepack uses the COREPACK_NPM_REGISTRY environment variable.
  7. Transparency Features: @rnm/pm does not provide transparency features, unlike Corepack. See Corepack's config.json for details.

Migration from Corepack

  1. Install @rnm/pm globally using npm install -g @rnm/pm.
  2. Replace npm, yarn, and pnpm with pm in your projects.

Show your support

Give a ⭐️ if this project helped you!

License

MIT