Sign up: Designing Enterprise UI Directly on Production Code

What are best AI tools? Take the State of AI survey

Builder.io
Builder.io
Contact sales

Sign up: Designing Enterprise UI Directly on Production Code

What are best AI tools? Take the State of AI survey

Builder.io
Builder.io
< Back to blog

Web development

Say Goodbye to Package Manager Chaos with ni

February 22, 2023

Written By Vishwas Gopinath

Have you ever found yourself working on multiple projects that use different package managers and accidentally run the wrong one in the wrong project?

This can create a mess of conflicting lock files and dependencies, causing wasted time. Fortunately, there is a solution to this problem: ni.

ni is an uncomplicated yet powerful tool that lets you run the right package manager for any project without having to remember which one it uses. This blog post explains how to use ni and its various commands.

Installing NI

To install ni, run the following command in your terminal:

The -g flag installs it globally so you can use it across all of your projects.

Using NI

ni has several commands that make it easier to use the correct package manager in your project. Below, we cover the list of most common commands in detail.

ni to install packages

The ni command installs packages using the correct package manager for your project. To use it, just run the command followed by the package name.

This command installs React using the correct package manager (npm, yarn, pnpm, or bun).

Use -D for dev dependencies:

Use --frozen to avoid writing to lockfiles:

nr to run scripts

The nr command runs scripts in your project using the correct package manager. To use it, run the command followed by the script name and any options.

This command runs the start script using the correct package manager.

This also has one handy benefit — you do not need -- to separate args for your script:

You can also just run nr to interactively choose which script to run:

nix to execute packages

The nix command executes packages using the correct package manager for your project. To use it, run the command followed by the package name.

This command executes Jest using the correct package manager.

nu to upgrade packages

The nu command updates outdated packages using the correct package manager for your project. To use it, run the command followed by any options.

This command updates all packages to their latest versions using the correct package manager.

nun to uninstall packages

The nun command uninstalls packages using the correct package manager for your project. To use it, run the command followed by the package name.

This command uninstall React using the correct package manager.

Change directory with -C

You can also use ni to change a directory and run commands in the new directory.

This command changes the directory to packages/foo and install React using the correct package manager.

Conclusion

By using ni, you can save yourself a lot of time and avoid the frustration of dealing with conflicting lock files and dependencies. So if you haven't already, give ni a try — you won't regret it!

Share

Twitter
LinkedIn
Facebook

Generate high quality code that uses your components & design tokens.

Try it nowGet a demo

Continue Reading
AI8 MIN
Subagents: When and How to Use Them
WRITTEN BY Alice Moore
February 3, 2026
AI9 MIN
Best LLMs for coding in 2026
WRITTEN BY Matt Abrams
January 28, 2026
AI8 MIN
Lovable Alternatives for 2026
WRITTEN BY Alice Moore
January 27, 2026

Product

Visual CMS

Theme Studio for Shopify

Sign up

Login

Featured Integrations

React

Angular

Next.js

Gatsby

Resources

User Guides

Developer Docs

Forum

Blog

Github

Get In Touch

Chat With Us

Twitter

Linkedin

Careers

© 2020 Builder.io, Inc.

Security

Privacy Policy

Terms of Service

Get the latest from Builder.io

By submitting, you agree to our Privacy Policy

  • Fusion

  • Publish

  • Product Updates

  • Design to Code

  • Headless CMS

    Multi-Brand CMS

  • Landing Pages

  • Web Apps

  • Prototypes

  • Marketing Sites

  • Headless Commerce

  • Documentation

  • Fusion Docs

  • Publish Docs

  • Figma AI to Production Code

  • AI Prototyping for Product Managers

  • Figma to Storybook

  • Figma to App Converter

  • Blog

  • Webinars

  • Guides

  • Case Studies

  • Community Forum

  • Partners

  • Affiliate Program

  • CMS Integrations

  • CMS Blueprints

  • Glossary

  • Figma to Code Guide

  • Headless CMS Guide

  • Headless Commerce Guide

  • Composable DXP Guide

  • About

  • News

  • Careers

  • Contact Sales

Security

Privacy Policy

SaaS Terms

Trust Center

Cookie Preferences

YouTube icon
Github icon
Blsky Icon
Twitter "X" icon
LinkedIn icon
Feed Icon