@rizumu/nai
v26.10.1
Published
Interactive CLI for installing dependencies with catalog support
Readme
@rizumu/nai
npm add, interactive ✨
An interactive CLI that makes installing dependencies easy — with first-class catalog support.
📦 Install
npm i -g @rizumu/nai🚀 Usage
# Interactive mode — prompts for everything
nai
# Pass package names directly
nai react vue@^3.5 lodash
# Install as devDependencies
nai vitest -D
# Install as peerDependencies
nai react --peer
# Specify a catalog
nai zod -C prodRun nai --help for all available options.
💡 Why nai?
Installing dependencies in modern projects is getting painful:
- Which package manager?
npm,pnpm,yarn,bun? - Remember the exact package name — no typos allowed
-Dor not?--save-peer?- Monorepo? Which workspace package? (
-F,-w, ...) - Catalogs? Manually edit
pnpm-workspace.yamlevery time...
Too many flags. Too many files to touch. Too many things to remember.
nai solves this with a beautiful interactive UI that guides you through each step:
- 🔍 Auto-detect your package manager
- 📦 Resolve versions — reuse existing catalog entries or fetch latest from npm
- 🗂️ Pick a catalog — or skip, or create a new one
- 📁 Select workspace packages in monorepo
- 🏷️ Choose dep type —
dependencies/devDependencies/peerDependencies - ✅ Review & confirm — colorful summary before any file is changed
- 🚀 Install — writes config files and runs install for you
🗂️ What is a Catalog?
Catalogs let you define dependency versions in one central place (e.g. pnpm-workspace.yaml) and reference them in package.json with catalog:name. This keeps versions consistent across a monorepo.
# pnpm-workspace.yaml
catalogs:
prod:
react: ^19.0.0
vue: ^3.5.0// package.json
{
"dependencies": {
"react": "catalog:prod"
}
}nai manages this for you — no manual file editing needed.
🛠️ Supported Package Managers
| Package Manager | Catalog Support | Status |
| --------------- | ------------------------ | ------------------------- |
| pnpm | ✅ pnpm-workspace.yaml | ✅ Supported |
| yarn | ✅ .yarnrc.yml | ✅ Supported |
| bun | ✅ package.json | ✅ Supported |
| vlt | ✅ vlt.json | ✅ Supported |
| npm | ❌ | ✅ Supported (no catalog) |
