Better PM
Better PM is a command-line tool that makes working with package managers easier, especially in monorepo environments. It automatically detects whether your project uses pnpm, bun, or npm, and provides intelligent defaults that prevent common mistakes.The Problem
Working with package managers in monorepos can be frustrating:- Wrong package manager: You need to remember which package manager each project uses
- Accidental full installs: Running
pnpm installat the monorepo root installs everything, which can take minutes - Complex filter syntax: Installing a single package requires memorizing filter flags like
pnpm install --filter "@myapp/web..." - Navigation difficulty: Jumping between workspace packages means manually typing full paths
The Solution
Better PM solves these problems with three core features:1. Package Manager Agnostic
You don’t need to remember whether your project uses pnpm, bun, or npm. Just typepm and it automatically detects the right package manager based on your lockfile.
2. Scoped Installs by Default
When you runpm i from inside a workspace package, it automatically installs only that package and its dependencies — not the entire monorepo.
pm i shows a safety warning with your workspace packages listed, so you can make an informed decision.
3. Easy Workspace Navigation
List all packages in your monorepo:Who Should Use This
Monorepo Teams
Teams working with pnpm workspaces, bun workspaces, or npm workspaces will benefit from automatic scoped installs and easy navigation.
Multi-Project Developers
Developers who switch between projects using different package managers no longer need to remember which command to use.
CI/CD Pipelines
The
--sure flag makes monorepo root installs explicit, preventing accidental full installs in automation scripts.Open Source Maintainers
Contributors to your project can use
pm commands without needing to know your package manager preference.Key Features
- Auto-detection: Identifies pnpm, bun, or npm based on lockfiles
- Monorepo-aware: Automatically filters installs when inside workspace packages
- Safety warnings: Confirms before installing all packages at monorepo root
- Paste-friendly:
pm add "npm install -D something"extracts the package and flags automatically - Shell integration:
pm cdactually changes directory with shell wrapper - Fast completions: Native binary provides ~60ms shell completion (Homebrew install)
- Proxy commands:
pm run,pm why,pm x, and more pass through to underlying package manager