> ## Documentation Index
> Fetch the complete documentation index at: https://better-pm.fdarian.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> A smarter CLI for package manager operations in monorepos

# Better PM

A CLI tool that makes package manager operations smarter and easier, especially in monorepos.

## Why Better PM?

Better PM eliminates the friction of working with multiple package managers and complex monorepo structures. No more remembering which package manager your project uses, no more accidental full-monorepo installs, and no more manual navigation between workspace packages.

<CardGroup cols={2}>
  <Card title="Package Manager Agnostic" icon="boxes-stacked">
    Works seamlessly with pnpm, bun, and npm — automatically detects which one your project uses
  </Card>

  <Card title="Monorepo-Aware" icon="diagram-project">
    Automatically scopes installs to the current package, preventing accidental full-monorepo installs
  </Card>

  <Card title="Smart Navigation" icon="compass">
    Jump to any workspace package from anywhere with shell integration
  </Card>

  <Card title="Paste-Friendly" icon="paste">
    Copy commands from READMEs and paste directly — automatically extracts packages and flags
  </Card>
</CardGroup>

## Quick Start

Get up and running in under a minute:

<Steps>
  <Step title="Install Better PM">
    <CodeGroup>
      ```bash Homebrew (Recommended) theme={null}
      brew install fdarian/tap/better-pm
      ```

      ```bash npm theme={null}
      npm install -g better-pm
      ```
    </CodeGroup>
  </Step>

  <Step title="Activate Shell Integration">
    Add to your shell configuration:

    ```bash .zshrc theme={null}
    eval "$(pm activate zsh)"
    ```
  </Step>

  <Step title="Start Using">
    ```bash theme={null}
    pm i                    # Install dependencies
    pm add react           # Add packages
    pm cd @myapp/web       # Navigate to packages
    ```
  </Step>
</Steps>

## Key Features

<CardGroup cols={2}>
  <Card title="Monorepo-Aware Install" icon="download" href="/concepts/monorepo-aware-install">
    Automatic scoping to current package with safety warnings at root
  </Card>

  <Card title="Workspace Navigation" icon="folder-tree" href="/concepts/workspace-navigation">
    List and navigate workspace packages with autocomplete
  </Card>

  <Card title="Command Reference" icon="terminal" href="/commands/install">
    Full documentation of all available commands
  </Card>

  <Card title="Setup Guide" icon="rocket" href="/installation">
    Installation and configuration instructions
  </Card>
</CardGroup>

## Example Workflow

Here's how Better PM simplifies your daily workflow:

```bash theme={null}
# Navigate to a workspace package
pm cd @myapp/web

# Install only this package's dependencies
pm i

# Add a new dependency (works with any package manager)
pm add lodash

# Add dev dependency by pasting from a README
pm add "npm install -D @types/node"

# Jump back to root
pm cd

# List all workspace packages
pm pls
```

## Supported Package Managers

* **pnpm** — Full support with workspace filtering
* **bun** — Full support with workspace operations
* **npm** — Full support with workspace commands

Better PM automatically detects your package manager by looking for lock files and workspace configuration.
