npm/pnpm/yarn
Install, update, and manage JavaScript packages. npm, pnpm, and yarn commands for dependency management.
68 commands
Browse by Topic
Getting Started
Quick setup and installation
Install
Package installation
Packages
Package management
Scripts
Scripts & execution
Workspaces
Monorepo workspaces
Publish
Publishing packages
Config
Configuration
pnpm
pnpm-specific features
Yarn
Yarn-specific features
Initialize package.json
Create a package.json with default values
Install dependencies
Install all dependencies from package.json
Check npm version
Display installed npm version
Install all dependencies
Install all dependencies from package.json.
Add package
Install and add package to dependencies.
Add dev dependency
Install as devDependency.
Install exact version
Install specific version without range prefix.
Install globally
Install package globally.
CI clean install
Clean install from lockfile (faster, stricter for CI).
Production only
Install only production dependencies.
pnpm add
Add package with pnpm.
pnpm frozen lockfile
Install without updating pnpm-lock.yaml.
yarn add
Add package with yarn.
yarn frozen lockfile
Install without updating yarn.lock.
Update package
Update package to latest allowed version.
Check outdated
Show packages with newer versions available.
Security audit
Scan for security vulnerabilities.
Fix vulnerabilities
Auto-fix security vulnerabilities.
List dependencies
List top-level installed packages.
Why is package installed
Show dependency chain for a package.
Prune unused
Remove packages not in package.json.
Deduplicate
Reduce duplication in dependency tree.
View package info
Show package registry information.
View all versions
List all published versions.
pnpm store prune
Remove orphaned packages from pnpm store.
yarn why
Explain why package is installed (shows chain).
Run script
Run script defined in package.json.
Run start
Run start script (shorthand).
Run test
Run test script (shorthand).
List scripts
Show all available scripts.
Execute package
Execute command from local or remote package.
npx specific version
Execute specific version of package.
pnpm dlx
Download and execute (pnpm's npx).
yarn dlx
Download and execute (yarn's npx, remote only).
Run scripts in parallel
Run matching scripts in parallel.
Run in workspace
Run script in specific workspace.
Run in all workspaces
Run script in all workspaces.
Install in workspace
Add package to specific workspace.
pnpm filter
Run command in filtered workspace(s).
pnpm filter with deps
Run in workspace and its dependencies.
pnpm recursive
Run command recursively in all workspaces.
yarn workspace
Run command in specific yarn workspace.
yarn workspaces foreach
Run in all workspaces in parallel.
List workspaces
List all yarn workspaces.
Publish package
Publish package to registry.
Publish public scoped
Publish scoped package as public.
Publish with tag
Publish with specific tag (beta, next, etc.).
Create tarball
Create tarball without publishing (for testing).
Bump version
Bump patch version (1.0.0 -> 1.0.1).
Bump minor version
Bump minor version (1.0.0 -> 1.1.0).
Bump major version
Bump major version (1.0.0 -> 2.0.0).
Deprecate package
Mark package version as deprecated.
Unpublish version
Remove specific version (discouraged).
Get config value
Show specific config value.
Set config value
Set config value.
List all config
Show all config values.
Edit config
Open config in editor.
Login to registry
Authenticate with npm registry.
Clear cache
Force clear npm cache.
Verify cache
Verify cache contents.
pnpm store path
Show content-addressable store location.
pnpm patch
Extract package to temp directory for patching.
pnpm patch commit
Create and register patch from modifications.
pnpm import
Generate pnpm-lock.yaml from other lockfiles.
yarn upgrade interactive
Interactive upgrade interface.
yarn PnP SDK
Generate editor SDKs for Plug'n'Play.
yarn constraints
Validate workspace dependency constraints.
yarn autoclean
Clean unnecessary files from dependencies.
Discussion
Loading comments...