Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jiatln/ri
A rust version ni but not only ni.
https://github.com/jiatln/ri
cli ni ri rni rust
Last synced: 20 days ago
JSON representation
A rust version ni but not only ni.
- Host: GitHub
- URL: https://github.com/jiatln/ri
- Owner: JiatLn
- License: mit
- Created: 2022-10-26T08:53:44.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-11T06:06:41.000Z (over 1 year ago)
- Last Synced: 2024-10-14T01:27:53.503Z (about 1 month ago)
- Topics: cli, ni, ri, rni, rust
- Language: Rust
- Homepage:
- Size: 285 KB
- Stars: 11
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ri
A rust version ni.> [ni](https://github.com/antfu/ni) - 💡 Use the right package manager
cargo install rni
### `ri` - install
```bash
ri# npm install
# yarn install
# pnpm install
# bun install
```
```bash
ri vite# npm i vite
# yarn add vite
# pnpm add vite
# bun add vite
``````bash
ri -f# npm ci
# yarn install --frozen-lockfile
# pnpm i --frozen-lockfile
# bun install --no-save
```### `ri r` - run
```bash
ri r dev# npm run dev
# yarn run dev
# pnpm run dev
# bun run dev
```Specially, you can use `ri rd` to run scripts ` run dev`
```bash
ri r# interactively select the script to run
# supports https://www.npmjs.com/package/npm-scripts-info convention
```
### `ri un` - uninstall
```bash
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 `
### git push
- `ri ps` - git push
### git pull
- `ri pl` - git pull
### git log
- `ri log`
```bash
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](https://github.com/JiatLn/ri/blob/main/src/agents.rs).
## License
[MIT](./LICENSE) License © 2022-Present [JiatLn](https://github.com/JiatLn)