// ZSH-BETTER-NPM-COMPLETION — CACHE-AWARE INSTALL + DEP-AWARE UNINSTALL

zsh plugin · cache-aware completion for npm install · dep-aware completion for npm uninstall · falls back to default npm completion

GitHub Issues
// Color scheme

>_ZSH-BETTER-NPM-COMPLETION

Better completion for npm. npm install <TAB> recommends from npm cache. npm uninstall <TAB> recommends from dependencies / devDependencies. npm run <TAB> shows the script body. Falls back to the default npm completion when none of the above applies.

Install

# Zinit
zinit ice lucid nocompile
zinit load MenkeTechnologies/zsh-better-npm-completion

# Oh My Zsh
git clone https://github.com/MenkeTechnologies/zsh-better-npm-completion \
    "$HOME/.oh-my-zsh/custom/plugins/zsh-better-npm-completion"
# then: plugins+=(zsh-better-npm-completion)

# Antigen
antigen bundle MenkeTechnologies/zsh-better-npm-completion

# Manual
git clone https://github.com/MenkeTechnologies/zsh-better-npm-completion ~/.zsh-better-npm-completion
source ~/.zsh-better-npm-completion/zsh-better-npm-completion.plugin.zsh

Usage

install from cachenpm install <TAB>
uninstall from package.jsonnpm uninstall <TAB>
run a script (shows body)npm run <TAB>
everything elsefalls through to default npm completion

No configuration. Source the plugin, restart zsh, hit TAB.

Sibling plugins

Part of the MenkeTechnologies zsh plugin family — the MenkeTechnologiesMeta umbrella: