{"repo":"antfu-collective/ni","free":true,"listed":false,"github":"https://github.com/antfu-collective/ni","clone":"git clone https://github.com/antfu-collective/ni.git","description":"💡 Use the right package manager","language":"TypeScript","stars":8283,"topics":["cli","package-manager","npm","yarn","pnpm"],"license":"MIT","category":"cli-tools","readme_excerpt":"ni npm i in a yarn project, again? F\\ \\ k! ni - use the right package manager npm i -g @antfu/ni npm · yarn · pnpm · bun · deno · aube ni - install catalogs support Since v29.0.0 When working in a pnpm workspace with catalogs configured in pnpm-workspace.yaml , a Yarn Berry workspace with catalogs in .yarnrc.yml , or a Bun workspace with catalogs in package.json , ni automatically enters catalog mode . Instead of adding packages with pinned versions, it writes catalog: references into package.json and updates the workspace catalog. For Bun, catalogs live in the root package.json instead, either nested under workspaces or at the top level: When only a default catalog ( catalog: top-level) is used, new packages are added directly without prompting. When only named catalogs exist, the default catalog is never offered. Flags like -D are respected — the catalog ref is written to the correct package.json section: Use -w / --workspace to target the workspace root package.json : To disable catalog mode, set catalog=false in /.nirc or NI CATALOG=false environment variable. nr - run shell completion scripts nlx - download & execute Pass --local to prefer an already-installed local binary over downloading it (equivalent to pnpm exec / yarn exec ). npm , bun and aube already resolve local binaries first, so this flag mainly matters for pnpm and yarn : nup - upgrade nun - uninstall nci - clean install nd - dedupe dependencies na - agent alias Global Flags Config Automatic installation You","default_branch":null,"files":null,"tree":[],"storefront":"/r/antfu-collective","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/antfu-collective/ni/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}