Command Palette

Search for a command to run...

Components
PreviousNext

Pnpm Aliases

How to install pnpm, create shell aliases, and upgrade dependencies efficiently.

Install & Upgrade pnpm

Install pnpm globally using npm:

npm i -g pnpm

Upgrade to the latest version:

npm i -g pnpm@latest

Add Shell Alias

Open your shell profile file:

code ~/.zprofile  # or code ~/.bash_profile

Add the following line:

alias pn=pnpm

Reload it:

source ~/.zprofile  # or source ~/.bash_profile

Now you can use pn instead of pnpm:

pn -v  # Check pnpm version

Upgrade Project Dependencies

Interactively upgrade all dependencies to the latest version:

pnpm up -i -L

This shows a list of packages that can be upgraded and lets you select which ones to update.