ni CLI

The CLI selects a project’s package manager and forwards short install and run commands to reduce confusion in agent workflows.

  • 8,318 ★ on the repository
  • Last commit
  • MIT
CLI

Extended access

Why this level

  • The delegated manager changes dependencies and runs package scripts; ni may also update workspace catalogs.
All reasons and checks

antfu-collective/ni

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add cli/ni

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • The delegated manager changes dependencies and runs package scripts; ni may also update workspace catalogs.

This is third-party code. Review the repository files before installing.

What it does

An agent calls `ni` in npm, pnpm or Yarn repositories, and the tool reads project settings before invoking the matching package manager. Companion commands run scripts, perform clean installs and remove packages. Dependencies still belong to the project. Workspace catalogs are named sets of shared versions, not directories. For example, ni can write `catalog:prod` into `package.json` and update the prod set in `pnpm-workspace.yaml`. Installation may therefore change shared configuration used by several packages.

Who it is for. Developers working across JavaScript projects who want agents to use the intended package manager.

Good fit when

  • An agent switches between projects with different lockfiles.
  • A user wants to preview the selected manager command.
  • A project script should be chosen from an interactive list.
  • Several packages in a pnpm workspace share versions through a named catalog in `pnpm-workspace.yaml`.

Not a fit when

  • You expect an independent package-management implementation.
  • The project uses an unsupported manager-detection format.
  • Dependency installation scripts and commands are not authorized.

Example request

Detect this project’s package manager and first show the command ni would use to add the dependency without installing it.

Limitations

ni invokes the installed package manager with its normal lifecycle scripts and user permissions. Without a recognized project file, it uses `.nirc` defaultAgent or prompts for a choice. Global installs use globalAgent regardless of the current project. Catalog mode can update shared workspace versions; before committing, inspect changes to package.json and the file defining the relevant version set.

How to disable. Stop using ni commands and invoke the project manager directly. Installing or removing ni does not revert dependency or lockfile changes.

FAQ

How do I preview the command?

Add `?`, as in `ni vite ?`.

What does `nr` do without arguments?

It opens an interactive project-script selector.

How is the manager selected?

Detection uses files such as `pnpm-lock.yaml`, `yarn.lock` and `package-lock.json`, plus `packageManager` in `package.json`. Inspect these first if the choice is wrong.

Does global installation follow the current project?

No. ni uses the separate `globalAgent` setting in `.nirc`, independently of the current repository files.

Can I run in another directory?

Yes. Use the `-C` option.

Discussion

No questions or reviews yet.

CLI tools

APM

APM (Agent Package Manager)

Editors’ pick

A package manager for AI agent context: skills, prompts and MCP servers install with one command across supported agents

CLIExtended access4.3KRepository stars

skills-npm links agent skills shipped in your dependencies in node_modules and listed in the skills field of package.json

CLIExtended access578Repository stars

Renovate CLI brings dependency updates across ecosystems into pull requests governed by the team’s rules and schedule.

CLIExtended access23KRepository stars

The version manager selects runtimes from project settings so agents run tools in an agreed development environment.

CLIExtended access25.6KRepository stars

The CLI locates large dependency directories for selected removal, with JSON output an agent can use to plan cleanup.

CLIExtended access9.5KRepository stars

A package manager for AI agents that installs rules, skills and prompts and converts them for Cursor, Claude Code and others.

CLIExtended access124Repository stars

README in short

Configuration uses .nirc and environment variables. Companion commands cover running scripts, removal and deduplication.

README badge

Report a problem

Foxx AIni
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.