Skip to main content

Overview

The pm pls command lists all workspace packages in your monorepo as a formatted tree structure, making it easy to see the organization of your project.

Syntax

This command has no options or arguments. It simply displays all workspace packages.

Examples

List All Packages

Output

View Package Structure

Output

How It Works

From src/commands/pls.ts:8-16:
The command:
  1. Detects the package manager
  2. Lists all workspace packages from the lockfile directory
  3. Formats them into a tree structure using formatWorkspaceTree
  4. Displays the formatted output

Tree Format

The output shows:
  • Directory structure - Nested folders with proper tree characters (├──, └──, )
  • Package names - Displayed in quotes after the directory name
  • Relative paths - Shows where each package lives in your monorepo

Use Cases

Quick Overview

See all packages in your monorepo at a glance:

Before Installation

Check package names before using pm i -F:

Documentation

Generate a visual representation of your monorepo structure:

Onboarding

Help new team members understand the project layout:

Monorepo Detection

The command works with:
  • pnpm workspaces - Reads from pnpm-workspace.yaml
  • Bun workspaces - Reads from package.json workspaces field
  • npm workspaces - Reads from package.json workspaces field
If run in a non-monorepo project, pm pls will show an empty tree or no packages.
  • pm cd - Navigate to a workspace package
  • pm install - Install with workspace filtering
  • pm ls - List installed dependencies