24 releases

0.3.5 May 11, 2023
0.3.4 Apr 17, 2023
0.3.2 Mar 29, 2023
0.2.3 Mar 12, 2023
0.1.4 Oct 29, 2022

#801 in Development tools

Download history 1/week @ 2024-06-29 22/week @ 2024-07-06 14/week @ 2024-07-27 101/week @ 2024-09-21

101 downloads per month

MIT license

91KB
749 lines

ri

A rust version ni.

ni - 💡 Use the right package manager


cargo install rni

npm · yarn · pnpm · bun


ri - install

ri

# npm install
# yarn install
# pnpm install
# bun install

ri

ri vite

# npm i vite
# yarn add vite
# pnpm add vite
# bun add vite
ri -f

# npm ci
# yarn install --frozen-lockfile
# pnpm i --frozen-lockfile
# bun install --no-save

ri r - run

ri r dev

# npm run dev
# yarn run dev
# pnpm run dev
# bun run dev

Specially, you can use ri rd to run scripts <agent> run dev

ri r

# interactively select the script to run
# supports https://www.npmjs.com/package/npm-scripts-info convention

ri r

ri un - uninstall

ri un webpack

# npm uninstall webpack
# yarn remove webpack
# pnpm remove webpack
# bun remove webpack

Other useful commands

clean your workspace

  • use ri rm to remove node_modules/**
  • use ri rl to remove lockfile of current agent, like yarn.lock / pnpm-lock.yaml / package-lock.json / bun.lockb

clone a repo

you don't need to paste the url, just press enter

  • step 1: copy the repo url
  • step 2: ri cl

full command: ri cl <url>

git push

  • ri ps - git push

git pull

  • ri pl - git pull

git log

  • ri log
git log --graph --oneline --decorate

get package info

  • ri info - get package info of current directory

Open the browser to the package's repository

  • ri repo - open the browser to the package's repository

How?

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

Before it runs, it will detect your yarn.lock / pnpm-lock.yaml / package-lock.json / bun.lockb to know current package manager (or packageManager field in your packages.json if specified), and runs the corresponding commands.

License

MIT License © 2022-Present JiatLn

Dependencies

~6–15MB
~212K SLoC