Ni package manager
antfu/ni: π‘ Use the right package manager
π₯
Never
npm iin ayarnproject again!
Commands
ni - install
ni vite
# npm i vite
# yarn add vite
# pnpm add vite
# bun add viteTo install a package with ni, run ==ni vite== (example: vite).
nr - run
nr dev --port=3000
# npm run dev -- --port=3000
# yarn run dev --port=3000
# pnpm run dev --port=3000
# bun run dev --port=3000To run a command with ni, run ==nr dev== (example: dev).
nlx - download & execute
nlx vitest
# npx vitest
# yarn dlx vitest
# pnpm dlx vitest
# bunx vitestnu - upgrade
nu
# npm upgrade
# yarn upgrade (Yarn 1)
# yarn up (Yarn Berry)
# pnpm update
# bun updateTo upgrade a package with ni, run ==nu vite== (example: vite).
nun - uninstall
nun webpack
# npm uninstall webpack
# yarn remove webpack
# pnpm remove webpack
# bun remove webpackTo install a package with ni, run ==nun vite== (example: vite).
nci - clean install
nci
# npm ci
# yarn install --frozen-lockfile
# pnpm install --frozen-lockfile
# bun install --no-saveif the corresponding node manager is not present, this command will install it globally along the way.
na - agent alias
na
# npm
# yarn
# pnpm
# bunna run foo
# npm run foo
# yarn run foo
# pnpm run foo
# bun run fooGlobal Flags
# ? | Print the command execution depends on the agent
ni vite ?
# -C | Change directory before running the command
ni -C packages/foo vite
nr -C playground dev
# -v, --version | Show version number
ni -v
# -h, --help | Show help
ni -h