made-in-common/ni
💡 Use the right package manager
Featured achievements
The project's latest awards
#1 Repository of the week
#1 Repository of the week
#2 Repository of the week
🧰 ni keeps package manager commands straight
Wrong package manager?
nifixes that.
ni is a TypeScript command-line tool from the Antfu collective that runs the right install, run, execute, or upgrade command for the package manager your project uses. It supports npm, yarn, pnpm, bun, deno, nub, and aube, and is aimed at developers tired of typing npm i in a yarn project or guessing which flag goes with which manager.
✨ Highlights
- Smart install: runs
npm install,yarn install,pnpm install, and other install commands automatically. - Named install:
ni vitemaps tonpm i vite,yarn add vite,pnpm add vite, and similar commands. - Dev flag:
ni @types/node -Dmaps to the right-Dcommand for each manager. - Frozen lockfile:
ni --frozenmaps tonpm ci,yarn install --frozen-lockfile,pnpm install --frozen-lockfile, and related commands. - Run scripts:
nr dev --port=3000maps to the correct run command for the detected package manager. - Execute packages:
nlx vitestmaps tonpx,yarn dlx,pnpm dlx,bunx, and other execution commands.
💡 Why it matters
ni saves context switching and typo-prone manual command translation. Instead of checking whether a project uses npm, Yarn, pnpm, Bun, Deno, or another manager, the tool detects the setup and runs the expected command.
That matters most in mixed environments: monorepos, workspaces, and teams that use more than one package manager. The README shows support for installs, named packages, -D flags, production installs, frozen lockfiles, scripts, interactive package selection, upgrades, shell completions, and catalogs.
#OpenSource #CLI #PackageManager #JavaScript #TiniX
Similar Projects
Discover other similar projects and AI models.
The 1.x line is frozen - features and bugfixes now happen on https://github.com/yarnpkg/berry
The React Native Community CLI — Command line tools to help you build React Native apps
Subset of Lerna in a much smaller & more modular project. Help manage and publish multiple packages in a monorepo/workspace structure
Audit NPM, Yarn, PNPM, and Bun dependencies in continuous integration environments, preventing integration if vulnerabilities are found at or above a configurable threshold while ignoring allowlisted advisories
Reverse engineer anything with agents, from app behavior down to native binaries.