All skills

Use when managing Node.js dependencies with pnpm - provides workspace setup, catalogs, CLI commands, overrides, and CI configuration

  • 5 files
  • 16.4 KB
  • MIT
  • Updated 8 months ago
  • GitHub

Use this Skill: https://skilld.dev/gh/onmax/claude-config/pnpm

This session only. Nothing lands on disk.

referencescli.md

≈878 tokens on demand. Your agent reads this file only when SKILL.md points to it.

CLI Commands

Installation

pnpm install              # Install all deps
pnpm i                    # Alias

pnpm install --frozen-lockfile  # CI mode - fail if lockfile outdated
pnpm install --prefer-offline   # Use cache when available
pnpm install --prod             # Production only
pnpm install --no-optional      # Skip optional deps
pnpm install --ignore-scripts   # Skip lifecycle scripts

Adding Dependencies

pnpm add <pkg>            # Production dep
pnpm add -D <pkg>         # Dev dep
pnpm add -O <pkg>         # Optional dep
pnpm add -g <pkg>         # Global

pnpm add <pkg>@<version>  # Specific version
pnpm add <pkg>@next       # Tag
pnpm add <pkg>@^1.0.0     # Range

Removing Dependencies

pnpm remove <pkg>
pnpm rm <pkg>
pnpm uninstall <pkg>
pnpm un <pkg>

Updating Dependencies

pnpm update               # Update all
pnpm up <pkg>             # Update specific

pnpm up --latest          # Ignore semver
pnpm up -L                # Alias

pnpm up --interactive     # Interactive mode
pnpm up -i                # Alias

Running Scripts

pnpm run <script>         # Run script
pnpm <script>             # Shorthand

pnpm run build -- --watch # Pass args
pnpm run --if-present build  # No error if missing

Executing Binaries

pnpm exec <cmd>           # Run local binary
pnpm exec eslint .        # Example

pnpm dlx <pkg>            # Like npx, no install
pnpm dlx create-vite my-app

Workspace Commands

pnpm -r run <script>      # Run in all packages
pnpm --recursive run <script>

pnpm -r --parallel run build    # Parallel
pnpm -r --stream run dev        # Stream output
pnpm -r --workspace-concurrency=1 run build  # Sequential

Filtering

# By package name
pnpm --filter <name> <cmd>
pnpm -F <name> <cmd>
pnpm --filter "@scope/pkg" build

# By directory
pnpm --filter "./packages/core" test

# Glob patterns
pnpm --filter "@myorg/*" lint
pnpm --filter "!@myorg/internal-*" publish

# Dependencies of package
pnpm --filter "...@scope/app" build

# Dependents of package
pnpm --filter "@scope/core..." test

# Changed since git ref
pnpm --filter "...[origin/main]" build
pnpm --filter "[HEAD~5]" lint

Link Packages

pnpm link --global        # Make global
pnpm link -g

pnpm link --global <pkg>  # Use linked package

Patching

pnpm patch <pkg>@<version>     # Create temp dir for editing
pnpm patch-commit <path>       # Save patch
pnpm patch-remove <pkg>        # Remove patch

Store Management

pnpm store path           # Show location
pnpm store prune          # Remove unused
pnpm store status         # Check integrity
pnpm store add <pkg>      # Add without installing

Information Commands

pnpm list                 # List installed
pnpm ls --depth=0         # Top-level only
pnpm ls --json            # JSON output

pnpm why <pkg>            # Why installed
pnpm outdated             # Show outdated
pnpm audit                # Security check

Other Commands

pnpm import               # Import from npm/yarn lockfile
pnpm rebuild              # Rebuild native modules
pnpm pack                 # Create tarball
pnpm publish              # Publish to registry
pnpm publish -r --no-git-checks  # CI publish

Environment

# Using Corepack (recommended)
corepack enable
corepack prepare pnpm@latest --activate

# package.json
{
  "packageManager": "pnpm@9.0.0"
}

Source: SKILL.md on GitHub

No third-party reports yet.

Signed by skilld at 6a37106. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 8 hours ago.

Activeupdated 8 months ago

README badge

README badge for onmax/claude-config/pnpm