# antfu-collective/ni

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/antfu-collective-ni).**

8,255 stars · 272 forks · TypeScript · MIT

## Links

- GitHub: https://github.com/antfu-collective/ni
- awesome-repositories: https://awesome-repositories.com/repository/antfu-collective-ni.md

## Topics

`cli` `npm` `package-manager` `pnpm` `yarn`

## Description

ni is a Node.js tooling utility and package manager wrapper that serves as a cross-manager command runner. It identifies the active package manager in a project via lockfiles or configuration and executes the corresponding installation or script commands.

The tool abstracts dependency management by proxying generic commands to the specific syntax of the detected manager. It can automatically install missing global package manager binaries when required dependencies are not found on the system.

The utility provides capabilities for monorepo workspace administration, including synchronizing workspace catalogs and updating package references. It also supports executing commands within specific subdirectories by changing the working directory before spawning processes.

## Tags

### Development Tools & Productivity

- [Cross-Manager Command Execution](https://awesome-repositories.com/f/development-tools-productivity/command-line-package-managers/cross-manager-command-execution.md) — Identifies the active package manager via lock-files or project configuration to run the correct installation or script command. ([source](https://github.com/antfu-collective/ni#readme))
- [Package Manager Command Bridges](https://awesome-repositories.com/f/development-tools-productivity/command-runners/package-manager-command-bridges.md) — Acts as a bridge that allows running standard package commands regardless of whether the project uses npm, yarn, or pnpm.
- [Lockfile Detection](https://awesome-repositories.com/f/development-tools-productivity/dependency-managers/installation-resolution-utilities/project-lockfile-management/lockfile-detection.md) — Identifies the active package manager by scanning for specific lockfiles in the project root.
- [Node.js Development Utilities](https://awesome-repositories.com/f/development-tools-productivity/node-js-development-utilities.md) — Provides a developer tool for automating dependency management and package manager installation in Node.js environments.
- [Package Dependency Management](https://awesome-repositories.com/f/development-tools-productivity/package-dependency-management.md) — Automates the setup of development environments by ensuring the correct package manager is installed and active.
- [Package Manager Script Proxies](https://awesome-repositories.com/f/development-tools-productivity/package-manager-script-proxies.md) — Proxies generic installation and script calls to the specific syntax of the detected package manager.
- [Package Manager Wrappers](https://awesome-repositories.com/f/development-tools-productivity/package-manager-wrappers.md) — Detects the active package manager and executes the corresponding install or script commands through a unified interface.
- [Project Workflow Tools](https://awesome-repositories.com/f/development-tools-productivity/project-workflow-tools.md) — Handles different package manager requirements automatically when switching between multiple projects.
- [Package Manager Abstractions](https://awesome-repositories.com/f/development-tools-productivity/software-package-repositories/system-package-managers/package-manager-abstractions.md) — Provides an abstraction for running installation or script commands without needing the specific package manager syntax.
- [Automatic Binary Provisioning](https://awesome-repositories.com/f/development-tools-productivity/application-installers/global-installation-managers/automatic-binary-provisioning.md) — Provides automatic installation of missing global package manager binaries when required dependencies are not found.
- [Monorepo Dependency Managers](https://awesome-repositories.com/f/development-tools-productivity/monorepo-dependency-managers.md) — Manages shared dependency catalogs and runs scripts across different subdirectories within a large project structure.
- [Automatic Package Manager Bootstrapping](https://awesome-repositories.com/f/development-tools-productivity/package-manager-installations/automatic-package-manager-bootstrapping.md) — Detects and installs missing global package managers required to execute specific commands. ([source](https://github.com/antfu-collective/ni#readme))
- [Workspace Managers](https://awesome-repositories.com/f/development-tools-productivity/package-managers/dependency/workspace-managers.md) — Manages shared dependency catalogs and coordinates package references across monorepo workspaces. ([source](https://github.com/antfu-collective/ni#readme))
- [Workspace Dependency Synchronizers](https://awesome-repositories.com/f/development-tools-productivity/workspace-management/project-workspaces/workspace-compilation/workspace-dependency-resolution/workspace-dependency-synchronizers.md) — Updates central dependency catalogs and writes version references into local package files for compatible managers.
