Overview
Thepm 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
Fromsrc/commands/pls.ts:8-16:
- Detects the package manager
- Lists all workspace packages from the lockfile directory
- Formats them into a tree structure using
formatWorkspaceTree - 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 usingpm 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.jsonworkspaces field - npm workspaces - Reads from
package.jsonworkspaces field
If run in a non-monorepo project,
pm pls will show an empty tree or no packages.Related Commands
- pm cd - Navigate to a workspace package
- pm install - Install with workspace filtering
- pm ls - List installed dependencies