Skip to main content

Overview

The pm ls command lists installed dependencies in your project. It’s a passthrough to your package manager’s native ls command, with automatic handling of package manager differences.

Syntax

Arguments

string[]
Additional arguments to pass to the underlying package manager’s ls command

Examples

List All Dependencies

Output (pnpm)

List Specific Package

Output

List with Depth

Output

List Dev Dependencies

Output

List Production Dependencies

Output

Package Manager Differences

Better PM handles differences between package managers automatically:
From src/commands/ls.ts:14-17:
Bun requires bun pm ls instead of just bun ls, which Better PM handles automatically.

Common Use Cases

Check Dependency Version

Verify Installation

List Top-Level Dependencies

Find Dependency Issues

List Global Packages

Output Format

The output shows:
  • Package name and version at the root level
  • Dependency tree with proper nesting
  • Versions for each installed package
  • Missing or invalid dependencies (marked with WARN or ERR)

Supported Arguments

Common arguments that work across package managers:
Use --json for programmatic parsing of dependency information.
  • pm pls - List workspace packages (monorepo)
  • pm why - Explain why a package is installed
  • pm install - Install dependencies