or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

docs

configuration.mdindex.mdpackage-inspection.mdpackage-management.mdscript-running.mdstore-management.mdworkspace-management.md
tile.json

tessl/npm-pnpm

Fast, disk space efficient package manager for Node.js with hard links, symlinks, and monorepo support

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
npmpkg:npm/pnpm@10.15.x

To install, run

npx @tessl/cli install tessl/npm-pnpm@10.15.0

index.mddocs/

pnpm

pnpm is a fast, disk space efficient package manager for Node.js that uses hard links and symlinks to share dependencies across projects. It offers up to 2x faster performance than alternatives, strict dependency isolation ensuring packages can only access dependencies explicitly declared in their package.json, deterministic installations with pnpm-lock.yaml lockfiles, and excellent monorepo support with workspace features.

Package Information

  • Package Name: pnpm
  • Package Type: npm
  • Language: TypeScript
  • Installation: npm install -g pnpm or curl -fsSL https://get.pnpm.io/install.sh | sh -

Core Usage

Binary Executables

# Main pnpm executable
pnpm [command] [options]

# Package runner (equivalent to npx)
pnpx [package] [args]

Basic Package Management

# Install all dependencies
pnpm install

# Add new packages
pnpm add lodash
pnpm add -D typescript  # dev dependency
pnpm add -g pm2         # global package

# Remove packages
pnpm remove lodash

# Update packages
pnpm update lodash

Script Running

# Run package scripts
pnpm run dev
pnpm start

# Execute packages without installing
pnpm dlx create-react-app my-app

# Execute in package context
pnpm exec tsc --version

Architecture

pnpm is built around several key architectural components:

  • Content-Addressable Store: Single global store for all packages using hard links and symlinks
  • Plugin Architecture: Modular command system with plugins for different functionality areas
  • Workspace Support: First-class monorepo support with workspace filtering and dependency management
  • Lockfile System: Deterministic pnpm-lock.yaml format ensuring reproducible installations
  • Node.js Version Management: Integrated support for switching Node.js versions per project
  • CLI Framework: Extensible command-line interface with auto-completion and help system

Capabilities

Package Management

Core package management operations including installation, adding/removing dependencies, and updating packages. Provides faster installs through hard linking and strict dependency isolation.

# Install dependencies
pnpm install [options]
pnpm i [options]

# Add packages
pnpm add <pkg>[@version] [options]

# Remove packages  
pnpm remove <pkg> [options]
pnpm rm <pkg> [options]
pnpm uninstall <pkg> [options]

# Update packages
pnpm update [pkg] [options]
pnpm up [pkg] [options]

# Pack and publish packages
pnpm pack [options]
pnpm publish [tarball|folder] [options]

Package Management

Script Running and Execution

Execute package scripts, run packages without installing, and manage development workflows with comprehensive script running capabilities.

# Run package scripts
pnpm run <script> [options]
pnpm run-script <script> [options]

# Execute packages without installing (like npx)
pnpm dlx <pkg> [args]

# Execute commands in package context
pnpm exec <command> [options]

# Create projects from templates
pnpm create <template> [options]

Script Running

Workspace Management

Monorepo and workspace operations with filtering, recursive commands, and cross-package dependency management for complex multi-package projects.

# Recursive commands across workspace
pnpm -r <command> [options]
pnpm --recursive <command> [options]

# Filter workspace packages
pnpm --filter <pattern> <command>
pnpm -F <pattern> <command>

# Deploy workspace packages
pnpm deploy [options]

Workspace Management

Store and Cache Management

Manage the global package store, inspect cached packages, and optimize disk usage with content-addressable storage operations.

# Store operations
pnpm store <command> [options]

# Cache operations  
pnpm cache <command> [options]

# Store inspection
pnpm cat-file <hash> [options]
pnpm cat-index [options]
pnpm find-hash <hash> [options]

# Store server operations
pnpm server <command> [options]

Store Management

Configuration and Environment

Configure pnpm settings, manage Node.js environments, and set up shell integrations for optimal development workflows.

# Configuration management
pnpm config <command> [options]
pnpm get <key> [options]
pnpm set <key> <value> [options]

# Environment management
pnpm env <command> [options]
pnpm setup [options]

# System information
pnpm bin [options]
pnpm root [options]

# Project and system management
pnpm init [options]
pnpm doctor [options]

Configuration

Package Inspection and Analysis

Inspect installed packages, check for outdated dependencies, audit security vulnerabilities, and analyze package relationships.

# List packages
pnpm list [pkg] [options]
pnpm ls [pkg] [options]
pnpm ll [options]

# Check package relationships
pnpm why <pkg> [options]

# Check for updates
pnpm outdated [pkg] [options]

# Security audit
pnpm audit [options]

Package Inspection

Global Options

Options available for all pnpm commands:

--color <always|auto|never>     # Control colored output
--dir <path>                    # Change working directory  
--filter <pattern>              # Filter workspace packages
--filter-prod <pattern>         # Filter production dependencies
--loglevel <level>              # Set logging level (silent, error, warn, info, verbose, silly)
--parseable                     # Machine-readable output
--reporter <type>               # Set reporter type (default, silent, append-only)
--recursive                     # Run recursively in workspace
--workspace-root               # Include workspace root
--help                         # Show help information
--version                      # Show version information

Universal Shorthands

Common shorthand options:

# Single-letter shorthands
-r          # --recursive
-s          # --reporter=silent  
-d          # --loglevel=info
-dd         # --loglevel=verbose
-ddd        # --loglevel=silly
-q          # --loglevel=warn
-h          # --help
-H          # --help (alternative)
-?          # --help (alternative)
-v          # --version
-f          # --force
-g          # --global
-l          # --long
-p          # --parseable
-i          # --interactive
-L          # --latest
-S          # --save
-D          # --save-dev
-P          # --save-prod
-E          # --save-exact
-O          # --save-optional
-C          # --dir
-F          # --filter
-w          # --workspace-root

# Word-form shorthands
silent      # --reporter=silent
verbose     # --loglevel=verbose
quiet       # --loglevel=warn
usage       # --help
local       # --no-global
porcelain   # --parseable
prod        # --production
development # --dev

NPM Compatibility

pnpm automatically passes through certain commands to npm for full compatibility:

# These commands are forwarded to npm
pnpm access
pnpm adduser  
pnpm bugs
pnpm deprecate
pnpm dist-tag
pnpm docs
pnpm edit
pnpm find
pnpm home
pnpm info
pnpm issues
pnpm login
pnpm logout
pnpm owner
pnpm ping
pnpm prefix
pnpm profile
pnpm pkg
pnpm repo
pnpm s           # search alias
pnpm se          # search alias
pnpm search
pnpm set-script  
pnpm show
pnpm star
pnpm stars
pnpm team
pnpm token
pnpm unpublish
pnpm unstar
pnpm v           # version alias
pnpm version
pnpm view
pnpm whoami
pnpm xmas        # Easter egg command