pnpm.plugin.zsh

January 24, 2023 ยท View on GitHub

Oh My Zsh aliases for common pnpm commands

Installation

  1. Clone the repository
git clone --depth=1 https://github.com/mat2ja/pnpm.plugin.zsh.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/pnpm
  1. Include it in your ~/.zshrc:
plugins=(... pnpm)

Aliases

AliasCommandDescription
ppnpmThe pnpm command
papnpm addInstall a package in dependencies (package.json)
padpnpm add --save-devInstall a package in devDependencies (package.json)
pappnpm add --save-peerInstall a package in peerDependencies (package.json)
paopnpm add --save-optionalInstall a package in optionalDependencies (package.json)
paepnpm add --save-exactInstall a package with an exact version (package.json)
prmpnpm removeRemove package from node_modules and package.json
pinpnpm installInstall dependencies specified in package.json
pinhpnpm install --shamefully-hoistInstall dependencies with a flat node_modules structure
plspnpm listList installed packages and their dependencies
popnpm outdatedCheck for outdated packages
pupnpm updateUpdate dependencies
puipnpm update --interactiveUpdate dependencies interactively
puilpnpm update --interactive --latestUpdate all dependencies interactively, ignoring ranges specified in package.json
pgapnpm add --globalInstall a package globally
pgrmpnpm remove --globalRemove a global package
pgupnpm update --globalUpdate packages globally
pglspnpm list --globalList global packages
prpnpm runRun a script defined in package.json
prunpnpm runRun a script defined in package.json
pexpnpm execExecute a shell command in scope of a project
pdxpnpm dlxFetch a package from the registry without installing, hotload it and run it
pdpnpm devRun the dev script defined in package.json
pdopnpm dev --openRun the dev script defined in package.json and open browser on startup
pbpnpm buildRun the build script defined in package.json
pstpnpm startRun the start script defined in package.json
psvpnpm serveRun the serve script defined in package.json
pprpnpm previewRun the preview script defined in package.json
ptpnpm testRun the test script defined in package.json
plnpnpm lintRun the lint script defined in package.json
pfmpnpm formatRun the format script defined in package.json
pipnpm initCreate a package.json file
ppubpnpm publishPublish a package to the registry
pcpnpm createCreate a project from a create-* or @foo/create-* starter kit
pnukerm -rf node_modules/ pnpm-lock.yamlDelete node_modules and pnpm-lock.yml
pnrcecho shamefully-hoist=true > .npmrcCreate npm configuration file with shamefully-hoist=true