All Projects → antfu → Ni

antfu / Ni

Licence: mit
💡 Use the right package manager

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Ni

Npminstall
Make `npm install` fast and easy.
Stars: ✭ 374 (+108.94%)
Mutual labels:  npm, package-manager, yarn
Np
A better `npm publish`
Stars: ✭ 6,401 (+3475.98%)
Mutual labels:  cli, npm, yarn
Awesome Npm
Awesome npm resources and tips
Stars: ✭ 3,894 (+2075.42%)
Mutual labels:  npm, package-manager, yarn
Tiny Package Manager
Learn how npm or Yarn v1 works.
Stars: ✭ 125 (-30.17%)
Mutual labels:  npm, package-manager, yarn
Emma Cli
📦 Terminal assistant to find and install node packages.
Stars: ✭ 1,201 (+570.95%)
Mutual labels:  cli, npm, yarn
Website
Yarn package manager website
Stars: ✭ 374 (+108.94%)
Mutual labels:  npm, package-manager, yarn
Tbify
使用淘宝镜像运行命令: tbify [nvm|npm|npx|yarn|pnpm|...]
Stars: ✭ 153 (-14.53%)
Mutual labels:  npm, package-manager, yarn
Syncpack
Manage multiple package.json files, such as in Lerna Monorepos and Yarn/Pnpm Workspaces
Stars: ✭ 356 (+98.88%)
Mutual labels:  cli, npm, yarn
Typac
install npm packages along with corresponding typings
Stars: ✭ 29 (-83.8%)
Mutual labels:  cli, npm, yarn
Yarpm
CLI tool to run npm scripts with either npm or yarn, depending on how it was started
Stars: ✭ 13 (-92.74%)
Mutual labels:  cli, npm, yarn
Npx
execute npm package binaries (moved)
Stars: ✭ 2,634 (+1371.51%)
Mutual labels:  cli, npm, package-manager
Bolt
⚡️ Super-powered JavaScript project management
Stars: ✭ 2,134 (+1092.18%)
Mutual labels:  npm, package-manager, yarn
Benchmarks Of Javascript Package Managers
Benchmarks of JavaScript Package Managers
Stars: ✭ 388 (+116.76%)
Mutual labels:  npm, package-manager, yarn
Install Self Peers
Stars: ✭ 26 (-85.47%)
Mutual labels:  cli, npm, yarn
Yarn
The 1.x line is frozen - features and bugfixes now happen on https://github.com/yarnpkg/berry
Stars: ✭ 40,325 (+22427.93%)
Mutual labels:  npm, package-manager, yarn
Script Progress
Estimate script execution time
Stars: ✭ 175 (-2.23%)
Mutual labels:  cli, npm, yarn
Vscode Deploy Reloaded
Recoded version of Visual Studio Code extension 'vs-deploy', which provides commands to deploy files to one or more destinations.
Stars: ✭ 129 (-27.93%)
Mutual labels:  npm, yarn
Ohshitgit
⁉️Oh shit! A cli tool to help you unfuck your git mistakes
Stars: ✭ 135 (-24.58%)
Mutual labels:  cli, npm
Yerna
A Lerna-like tool for managing Javascript monorepos using Yarn
Stars: ✭ 140 (-21.79%)
Mutual labels:  npm, yarn
Pnpm
Fast, disk space efficient package manager -- 快速的,节省磁盘空间的包管理工具
Stars: ✭ 14,219 (+7843.58%)
Mutual labels:  npm, package-manager

ni

npm i in a yarn project, again? F**k!

ni - use the right package manager


npm i -g @antfu/ni

ni

npm · yarn · pnpm


ni - install

ni

# npm install
# yarn install
# pnpm install
ni axios

# npm i axios
# yarn add axios
# pnpm i axios
ni @types/node -D

# npm i @types/node -D
# yarn add @types/node -D
# pnpm i @types/node -D
ni --frozen

# npm ci
# yarn install --frozen-lockfile
# pnpm install --frozen-lockfile
ni -g iroiro

# npm i -g iroiro
# yarn global add iroiro
# pnpm i -g iroiro

# this uses default agent, regardless your current working directory

nr - run

nr dev --port=3000

# npm run dev -- --port=3000
# yarn run dev --port=3000
# pnpm run dev -- --port=3000
nr

# interactively select the script to run

nu - upgrade

nu

# npm upgrade
# yarn upgrade
# pnpm upgrade
nu -i

# (not available for npm)
# yarn upgrade-interactive
# pnpm upgrade -i

nci - clean install

nci

# npm ci
# yarn install --frozen-lockfile
# pnpm install --frozen-lockfile

if the corresponding node manager is not present, this command will install it globally along the way.


Config

; ~/.nirc

; fallback when no lock found
defaultAgent=npm # default "prompt"

; for global installs
globalAgent=npm

How?

ni assumes that you work with lockfiles (and you should)

Before it runs, it will detect your yarn.lock / pnpm-lock.yaml / package-lock.json to know current package manager, and runs the corresponding commands.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].