Zsh aliases for common pnpm commands.
- Clone the repository:
git clone --depth=1 https://github.com/leizhenpeng/zsh-plugin-pnpm.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/pnpm - Include it in your
~/.zshrc:plugins=(... pnpm)
Add script bellow to your ~/.zshrc
zinit light ntnyq/omz-plugin-pnpmPRs are welcome!
| Alias | Command | Description |
|---|---|---|
| p | pnpm |
The pnpm command |
| pex | pnpm exec |
Execute a shell command in scope of a project |
| pdx | pnpm dlx |
Fetch a package without installing, hotload and run it's command |
| pa | pnpm add |
Install a package in dependencies (package.json) |
| pad | pnpm add --save-dev |
Install a package in devDependencies (package.json) |
| prm | pnpm remove |
Remove installed packages |
| pls | pnpm list |
List installed packages |
| pap | pnpm add --save-peer |
Install a package in peerDependencies (package.json) |
| pga | pnpm add --global |
Install packages globally on your operating system |
| pgls | pnpm list --global |
List global installed packages |
| pgrm | pnpm remove --global |
Remove global installed packages from your OS |
| pgu | pnpm update --global |
Upgrade packages installed globally to their latest version |
| pi | pnpm init |
Interactively creates or updates a package.json file |
| pin | pnpm install |
Install dependencies defined in package.json |
| prun | pnpm run |
Run a defined package script |
| pst | pnpm start |
Run the start script defined in package.json |
| pln | pnpm run lint |
Run the lint script defined in package.json |
| pdocs | pnpm run docs |
Run the docs script defined in package.json |
| pb | pnpm run build |
Run the build script defined in package.json |
| pd | pnpm run dev |
Run the dev script defined in package.json |
| psv | pnpm run serve |
Run the serve script defined in package.json |
| pt | pnpm test |
Run the test script defined in package.json |
| ptc | pnpm test --coverage |
Run the test script defined in package.json with coverage |
| pu | pnpm update |
Update packages to their latest version based on the specified range |
| puil | pnpm update --interactive --latest |
Prompt for which outdated packages to upgrade to the latest available version |
| pc | pnpm create |
Create a project from a create-* start kit |
| ppub | pnpm publish |
Publish a package to the registry |
| pf | pnpm -r --filter |
Use filter in monorepo root directory |
| pre | pnpm run preview |
Run the preview script defined in package.json |
| pr | pnpm run release |
Run the release script defined in package.json |
- New aliase
pw*for workspace action
- New aliases
pfforpnpm -r --filter
- Removed aliases
punforpnpm uninstall. Useprminstead.pxforpnpx. It's deprecated. Usepexandpdxinstead.puiforpnpm update --interactive. Usepuandpuilinstead.pdocforpnpm run doc. Maybe rename your scripts todocsand usepdocsinstead.psvforpnpm server.phforpnpm help.poutforpnpm outdated.pauforpnpm audit.pwhyforpnpm why.
- Changed aliases
pupforpnpm updatehas been renamed topu.psforpnpm run servehas been renamed topsv. See issue #6
- New aliases
pexforpnpm exec.pdxforpnpm dlx.