# antfu-collective/ni

💡 Use the right package manager

Repository: https://github.com/antfu-collective/ni
Canonical: https://ross.abutalabs.com/products/ni
Language: TypeScript
License: MIT
License Family: permissive
Topics: cli, package-manager, npm, yarn, pnpm
Last push: 2026-08-06T02:29:51+00:00

## Health v2 (maintenance only)
Score: 97/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 96, release rhythm 96, longevity 100
- inputs: {"age_days": 2127, "days_push": 28, "days_rel": 28, "gap_med": 15, "n_releases_24m": 28}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 8291, forks 276 (observed 2026-08-28T04:10:20.085493+00:00)

## What it is
ni is a CLI tool that detects the correct JavaScript package manager (npm, yarn, pnpm, bun, deno, etc.) for a project and translates a single unified command into the right one. It provides commands like ni, nr, nx, and nu for installing, running, and upgrading dependencies without memorizing manager-specific syntax.

## Use cases
- run npm install in a yarn project without errors
- install dependencies without knowing which package manager the repo uses
- run scripts with a single command across npm/yarn/pnpm/bun projects
- add dev dependencies with consistent syntax across package managers
- clean-install with frozen lockfile in CI
- manage pnpm workspace catalogs when adding packages

## When to choose
- you switch between JavaScript projects using different package managers
- you want one consistent command set for install/run/upgrade across teams
- you work in monorepos with pnpm or yarn workspaces and catalogs

## When to avoid
- you only ever use a single package manager
- you need fine-grained control over manager-specific flags not covered by ni
- you work outside the JavaScript/Node ecosystem

## Facets
- artifact type: cli-tool
- maturity: active
- function: cli, package-manager, developer-tools
- domain: developer-tools, web-development
- platform: cli, cross-platform
- tags: npm, yarn, pnpm, bun, deno, monorepo, javascript, command-line, nodejs

## Member repositories
- antfu-collective/ni (main) score 97

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:20.085493+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:28:05.773593+00:00, confidence not recorded.
  - readme: https://github.com/antfu-collective/ni (fetched 2026-08-28T04:10:20.085493+00:00, sha 52176c659afa)
- Data as of 2026-08-30T08:39:29.467469+00:00.
