Seven command-line tools that provide a unified interface across all package managers. Each command automatically detects the appropriate package manager and executes the equivalent command.
Install packages with automatic package manager detection.
// Command: ni [packages...] [flags]
// Flags: -D (dev), -P (production), -g (global), -i (interactive), --frozen, --frozen-if-presentUsage Examples:
# Install all dependencies
ni
# Install specific packages
ni vite react
ni @types/node -D
# Production install
ni -P
# Global install
ni -g typescript
# Interactive install with search
ni -i
# Frozen install (equivalent to npm ci)
ni --frozenPackage Manager Equivalents:
ni # npm install | yarn install | pnpm install | bun install
ni vite # npm i vite | yarn add vite | pnpm add vite | bun add vite
ni @types/node -D # npm i @types/node -D | yarn add @types/node -D | pnpm add -D @types/node | bun add -d @types/node
ni -P # npm i --omit=dev | yarn install --production | pnpm i --production | bun install --production
ni -g eslint # npm i -g eslint | yarn global add eslint | pnpm add -g eslint | bun add -g eslint
ni --frozen # npm ci | yarn install --frozen-lockfile | pnpm install --frozen-lockfile | bun install --frozen-lockfileRun package.json scripts with automatic package manager detection.
// Command: nr [script] [args...] [flags]
// Flags: --if-present, --completion, -Usage Examples:
# Interactive script selection
nr
# Run specific script
nr dev
nr build --production
# Run last command
nr -
# Add completion script
nr --completion >> ~/.bashrc
# Run with --if-present flag
nr test --if-presentPackage Manager Equivalents:
nr dev # npm run dev | yarn run dev | pnpm run dev | bun run dev
nr build --prod # npm run build -- --prod | yarn run build --prod | pnpm run build --prod | bun run build --prodDownload and execute packages without installing them.
// Command: nlx <package> [args...]Usage Examples:
# Execute package
nlx create-react-app my-app
nlx vitest
nlx @storybook/cli initPackage Manager Equivalents:
nlx vitest # npx vitest | yarn dlx vitest | pnpm dlx vitest | bunx vitestUpgrade dependencies to their latest versions.
// Command: nup [packages...] [flags]
// Flags: -i (interactive)Usage Examples:
# Upgrade all dependencies
nup
# Upgrade specific packages
nup react vue
# Interactive upgrade
nup -iPackage Manager Equivalents:
nup # npm upgrade | yarn upgrade | pnpm update | bun update
nup -i # (not available for npm & bun) | yarn upgrade-interactive | pnpm update -iRemove packages from project dependencies.
// Command: nun [packages...] [flags]
// Flags: -g (global), -m (multiple selection)Usage Examples:
# Interactive dependency removal
nun
# Remove specific packages
nun webpack lodash
# Multiple selection mode
nun -m
# Global removal
nun -g typescriptPackage Manager Equivalents:
nun webpack # npm uninstall webpack | yarn remove webpack | pnpm remove webpack | bun remove webpack
nun -g eslint # npm uninstall -g eslint | yarn global remove eslint | pnpm remove -g eslint | bun remove -g eslintPerform a clean install using lockfiles.
// Command: nci [flags]
// Auto-installs package manager if missingUsage Examples:
# Clean install
nciPackage Manager Equivalents:
nci # npm ci | yarn install --frozen-lockfile | pnpm install --frozen-lockfile | bun install --frozen-lockfileDirect access to the detected package manager.
// Command: na [command] [args...]Usage Examples:
# Show detected agent
na
# Run agent command directly
na run build
na info react
na config listPackage Manager Equivalents:
na # npm | yarn | pnpm | bun (shows detected agent)
na run foo # npm run foo | yarn run foo | pnpm run foo | bun run fooAll commands support these global flags:
// Global flags available across all commands
interface GlobalFlags {
'?': boolean; // Print command without executing
'-C': string; // Change directory before running
'-v' | '--version': boolean; // Show version information
'-h' | '--help': boolean; // Show help information
}Usage Examples:
# Show what command would be executed
ni vite ?
# Change directory before running
ni -C packages/frontend vite
nr -C playground dev
# Show version info
ni -v
# Show help
ni -hInteractive package installation with NPM registry search:
Interactive script runner with package.json integration:
Interactive dependency removal:
When a package manager is detected but not installed, ni can automatically install it:
# Controlled by NI_AUTO_INSTALL environment variable
export NI_AUTO_INSTALL=true
# Or prompted interactively in non-CI environmentsAutomatic Volta wrapper detection when available:
# If volta is installed, commands are wrapped automatically
volta run npm install # instead of direct npm install