npm-workspace-cli
v1.0.0
Published
Manage and inspect npm/pnpm/yarn workspaces with beautiful output
Maintainers
Readme
npm-workspace-cli
Manage and inspect npm/pnpm/yarn workspaces with beautiful output.
Install
npm install -g npm-workspace-cliUsage
# List all workspace packages
npm-workspace-cli list
npm-workspace-cli list --tree
npm-workspace-cli list --json
# Show dependency graph between workspaces
npm-workspace-cli graph
npm-workspace-cli graph --json
# Check workspace consistency
npm-workspace-cli check
npm-workspace-cli check --jsonOptions
| Option | Description |
|--------|-------------|
| -d, --dir <path> | Root directory of the workspace (default: .) |
| --json | Output as JSON |
| --tree | Show as tree view (list command only) |
Commands
list
Lists all workspace packages with name, version, private status, and path. Shows cross-workspace dependencies.
graph
Displays the dependency graph between workspace packages. Detects and reports circular dependencies.
check
Verifies workspace consistency:
- Missing package names or versions
- Inconsistent versions of shared dependencies across workspaces
- Workspace dependencies using fixed versions instead of workspace protocol
Workspace Detection
Automatically detects workspace configuration from:
pnpm-workspace.yaml(pnpm)package.jsonworkspacesfield (npm/yarn)
Lock file detection determines the package manager: pnpm-lock.yaml → pnpm, yarn.lock → yarn, otherwise npm.
License
MIT
