https://github.com/createwheel/mini-nrm
Mini npm registry manager
https://github.com/createwheel/mini-nrm
npm nrm registries registry registry-manager
Last synced: 26 days ago
JSON representation
Mini npm registry manager
- Host: GitHub
- URL: https://github.com/createwheel/mini-nrm
- Owner: CreateWheel
- License: mit
- Created: 2022-10-25T07:14:54.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-16T06:49:39.000Z (11 months ago)
- Last Synced: 2025-05-01T05:05:35.306Z (about 1 month ago)
- Topics: npm, nrm, registries, registry, registry-manager
- Language: TypeScript
- Homepage:
- Size: 909 KB
- Stars: 18
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
mini-nrm
Mini npm registry manager
# mini-nrm
Super lightweight npm registry manager
- **No dependencies.**
- [mini-nrm](https://packagephobia.com/result?p=mini-nrm) ~ **21kB** | [nnrm](https://packagephobia.com/result?p=nnrm) ~ **7MB** | [nrm](https://packagephobia.com/result?p=nrm) ~ **15MB**
- Customizing the registry image
- Test response speed details
- TypeScript type declarations included.
![]()
## Install
```bash
npm install -g mini-nrm
```Because it is very slim, you can use `npx` to manage the registry image directly without installing it
```bash
npx mini-nrm --help
```## Usage
> This command does not modify the registry, it just uses the specified registry to install the dependencies
>
> It uses the `taobao` registry to install `output-line` `get-user-ip ` `body-data` `simple-unique`
```diff
-npm install output-line get-user-ip body-data simple-unique -S
+mnrm use taobao output-line get-user-ip body-data simple-unique -S
````mnrm --help`: Show this help
```bash
Usage
$ mnrm [options]
Options
ls, list List all the registries
use [package...] Switch registry or specify registry directly to install npm packages
add [home] Add a custom registry
test [-i, --info] Test the response time of all registries
del, delete, rm, remove Remove a custom registry
h, -h, help, --help Show this help
Examples$ mnrm add npm https://registry.npmjs.org/
$ mnrm use npm
$ mnrm use taobao output-line get-user-ip body-data simple-unique -S
$ mnrm list
* npm --------- https://registry.npmjs.org/
yarn -------- https://registry.yarnpkg.com/
taobao ------ https://registry.npmmirror.com/
tencent ----- https://mirrors.cloud.tencent.com/npm/
npmMirror --- https://skimdb.npmjs.com/registry/$ mnrm test
* npm --------- 153 ms
yarn -------- 175 ms
taobao ------ 519 ms
tencent ----- 121 ms
npmMirror --- 481 ms```
## JavaScript API
```js
import mnrm from 'mini-nrm'console.log(mnrm.list())
// output
// * npm --------- https://registry.npmjs.org/
// yarn -------- https://registry.yarnpkg.com/
// taobao ------ https://registry.npmmirror.com/
// tencent ----- https://mirrors.cloud.tencent.com/npm/
// npmMirror --- https://skimdb.npmjs.com/registry/
// github ------ https://npm.pkg.github.com/
```