Skip to main content

Overview

The pm install (or pm i) command installs dependencies with intelligent monorepo awareness. It automatically scopes installation to the current package when you’re inside a workspace package, and provides safety warnings when running at the monorepo root.

Syntax

pm i [options]
pm install [options]

Options

-y, --sure
boolean
default:"false"
Skip confirmation prompt when installing all packages from monorepo root
-F, --filter
string[]
Filter installation to specific workspace package(s). Can be specified multiple times.

Behavior

From Workspace Package Directory

When running pm i from inside a workspace package, Better PM automatically filters the installation to only that package and its dependencies:
cd apps/web
pm i
This prevents accidentally installing all packages in your monorepo when you only need one.

From Monorepo Root

When running pm i from the monorepo root, Better PM shows a warning and lists all workspace packages:
pm i
In non-interactive environments (like CI with CLAUDECODE=1), the command will not prompt for confirmation and will display the usage instructions instead.

Examples

Install Current Package

# From inside a workspace package
pm i

Install Specific Package(s)

# Install a single package
pm i -F @myapp/web

# Install multiple packages
pm i -F @myapp/web -F @myapp/api

Install All Packages

# From monorepo root with confirmation
pm i -y

# Or use --sure
pm i --sure

Install with Filters

# Install package and its dependents
pm i -F @myapp/core...

# Install package and its dependencies
pm i -F ...@myapp/web
  • pm add - Add new dependencies
  • pm pls - List workspace packages
  • pm cd - Navigate to workspace packages