Alternative `ni` written in zsh: npm/yarn/pnpm/bun/deno with the same command
Shell
197
92 commits
updated Sep 3, 2026
ni written in zshni - use the right package manager
You can run npm/yarn/pnpm/bun/deno/vite-plus/aube with same command!
zinit load azu/ni.zsh
antigen bundle azu/ni.zsh@main
[plugins.ni]
github = "azu/ni.zsh"
curl https://raw.githubusercontent.com/azu/ni.zsh/main/ni.zsh > ni.zsh
source ni.zsh
command not found: compdefni.zsh requires compdef command.
If you got command not found: compdef error, you need to enable compinit in your .zshrc.
# .zshrc
# load compdef
autoload -Uz compinit && compinit
# load ni.zsh
source /path/to/ni.zsh
Vite+ is detected when package.json has vite-plus in devDependencies or dependencies.
This detection runs before the packageManager field, so Vite+ projects that delegate to pnpm/npm/Yarn/Bun still use vp.
aube is detected when package.json has "packageManager": "aube@<version>" or aube-lock.yaml exists.
aube can also read and write other lockfiles (pnpm-lock.yaml, package-lock.json, etc.) in place, but those projects are detected as the original package manager.
autoload -Uz compinit && compinitnpm + ni upgrade-interactiveni -- install current package.json
ni ci -- install with frozen lockfile (equivalent to npm ci)
ni add <pkg> -- add package
ni remove <pkg> -- remove package
ni run <script> -- run scripts
ni test -- run test script
ni upgrade [<pkg>] -- upgrade packages
ni upgrade-interactive -- upgrade package interactively
ni exec <command> -- execute command
ni dlx <pkg> -- download package and execute command
| ni | npm | yarn | yarn-berry | pnpm | bun | deno | vite-plus | aube |
|---|---|---|---|---|---|---|---|---|
ni | npm install | yarn install | yarn install | pnpm install | bun install | deno install | vp install | aube install |
ni ci | npm ci | yarn install --frozen-lockfile | yarn install --immutable | pnpm install --frozen-lockfile | bun install --frozen-lockfile | deno install --frozen | vp install --frozen-lockfile | aube ci |
ni add <pkg> | npm install | yarn add | yarn add | pnpm add | bun add | deno add --npm | vp add | aube add |
ni remove <pkg> | npm uninstall | yarn remove | yarn remove | pnpm remove | bun remove | deno uninstall | vp remove | aube remove |
ni run <script> | npm run | yarn run | yarn run | pnpm run | bun run | deno run | vp run | aube run |
ni test | npm run test | yarn run test | yarn run test | pnpm run test | bun run test | deno run test | vp run test | aube run test |
ni upgrade | npm upgrade | yarn upgrade | yarn up | pnpm update | bun update | deno outdated --update | vp update | aube update |
ni upgrade-interactive | npm-check^1 | yarn up --interactive "*" | yarn upgrade-interactive | pnpm update -i | ○ | deno outdated --update --interactive | vp update --interactive | ○ |
ni exec <command> | npm exec --no | yarn <command> | yarn exec | pnpm exec | bunx | ○ | vp exec | aube exec |
ni dlx <pkg> | npx | npx | yarn dlx | pnpm dlx | bunx | deno x | vp dlx | aube dlx |
Notes
ni add --dev <pkg>ni run: ni run dev --port 8080ni upgrade <pkg>ni <TAB>
You can integrate Socket Firewall to detect supply chain attacks.
https://github.com/user-attachments/assets/b3b6fc24-ec80-4bd3-a699-7562d503f7b1
Socket Firewall provides proactive protection against malicious packages by scanning all package installations and executions in real-time.
Setup:
Install Socket Firewall globally:
npm i -g sfw
Enable Socket Firewall in ni.zsh:
export NI_USE_SOCKET_FIREWALL=1
(Optional) Specify custom sfw binary path:
export NI_SOCKET_FIREWALL_BIN=/path/to/sfw
If not set, uses sfw command from PATH.
Protected commands:
When Socket Firewall is enabled, the following commands are automatically protected:
ni add / ni - Package installationni exec / ni dlx - Package execution (npx, bunx)MIT © azu
Shell
98.7%
TypeScript
1.3%
Alternative `ni` written in zsh: npm/yarn/pnpm/bun/deno with the same command
Shell
197
92 commits
updated Sep 3, 2026
ni written in zshni - use the right package manager
You can run npm/yarn/pnpm/bun/deno/vite-plus/aube with same command!
zinit load azu/ni.zsh
antigen bundle azu/ni.zsh@main
[plugins.ni]
github = "azu/ni.zsh"
curl https://raw.githubusercontent.com/azu/ni.zsh/main/ni.zsh > ni.zsh
source ni.zsh
command not found: compdefni.zsh requires compdef command.
If you got command not found: compdef error, you need to enable compinit in your .zshrc.
# .zshrc
# load compdef
autoload -Uz compinit && compinit
# load ni.zsh
source /path/to/ni.zsh
Vite+ is detected when package.json has vite-plus in devDependencies or dependencies.
This detection runs before the packageManager field, so Vite+ projects that delegate to pnpm/npm/Yarn/Bun still use vp.
aube is detected when package.json has "packageManager": "aube@<version>" or aube-lock.yaml exists.
aube can also read and write other lockfiles (pnpm-lock.yaml, package-lock.json, etc.) in place, but those projects are detected as the original package manager.
autoload -Uz compinit && compinitnpm + ni upgrade-interactiveni -- install current package.json
ni ci -- install with frozen lockfile (equivalent to npm ci)
ni add <pkg> -- add package
ni remove <pkg> -- remove package
ni run <script> -- run scripts
ni test -- run test script
ni upgrade [<pkg>] -- upgrade packages
ni upgrade-interactive -- upgrade package interactively
ni exec <command> -- execute command
ni dlx <pkg> -- download package and execute command
| ni | npm | yarn | yarn-berry | pnpm | bun | deno | vite-plus | aube |
|---|---|---|---|---|---|---|---|---|
ni | npm install | yarn install | yarn install | pnpm install | bun install | deno install | vp install | aube install |
ni ci | npm ci | yarn install --frozen-lockfile | yarn install --immutable | pnpm install --frozen-lockfile | bun install --frozen-lockfile | deno install --frozen | vp install --frozen-lockfile | aube ci |
ni add <pkg> | npm install | yarn add | yarn add | pnpm add | bun add | deno add --npm | vp add | aube add |
ni remove <pkg> | npm uninstall | yarn remove | yarn remove | pnpm remove | bun remove | deno uninstall | vp remove | aube remove |
ni run <script> | npm run | yarn run | yarn run | pnpm run | bun run | deno run | vp run | aube run |
ni test | npm run test | yarn run test | yarn run test | pnpm run test | bun run test | deno run test | vp run test | aube run test |
ni upgrade | npm upgrade | yarn upgrade | yarn up | pnpm update | bun update | deno outdated --update | vp update | aube update |
ni upgrade-interactive | npm-check^1 | yarn up --interactive "*" | yarn upgrade-interactive | pnpm update -i | ○ | deno outdated --update --interactive | vp update --interactive | ○ |
ni exec <command> | npm exec --no | yarn <command> | yarn exec | pnpm exec | bunx | ○ | vp exec | aube exec |
ni dlx <pkg> | npx | npx | yarn dlx | pnpm dlx | bunx | deno x | vp dlx | aube dlx |
Notes
ni add --dev <pkg>ni run: ni run dev --port 8080ni upgrade <pkg>ni <TAB>
You can integrate Socket Firewall to detect supply chain attacks.
https://github.com/user-attachments/assets/b3b6fc24-ec80-4bd3-a699-7562d503f7b1
Socket Firewall provides proactive protection against malicious packages by scanning all package installations and executions in real-time.
Setup:
Install Socket Firewall globally:
npm i -g sfw
Enable Socket Firewall in ni.zsh:
export NI_USE_SOCKET_FIREWALL=1
(Optional) Specify custom sfw binary path:
export NI_SOCKET_FIREWALL_BIN=/path/to/sfw
If not set, uses sfw command from PATH.
Protected commands:
When Socket Firewall is enabled, the following commands are automatically protected:
ni add / ni - Package installationni exec / ni dlx - Package execution (npx, bunx)MIT © azu
Shell
98.7%
TypeScript
1.3%