npm install -g nrm
$ nrm ls
* npm ---------- https://registry.npmjs.org/
yarn --------- https://registry.yarnpkg.com/
tencent ------ https://mirrors.cloud.tencent.com/npm/
cnpm --------- https://r.cnpmjs.org/
taobao ------- https://registry.npmmirror.com/
npmMirror ---- https://skimdb.npmjs.com/registry/
切换源
nrm use yarn
删除源
nrm del yarn
添加私有的源
nrm add <registry> <url> // nrm add myPrivate xxxx
另外也推荐antfu写的一个依赖管理工具@antfu/ni
主要是根据yarn.lock / pnpm-lock.yaml / package-lock.json / bun.lockb或者packageManager来匹配当前的包管理工具