Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vincent0700/homebrew-brm
📦 Homebrew registry manager for macOS, fast switch between different registries: official, tsinghua, aliyun, ustc
https://github.com/vincent0700/homebrew-brm
homebrew manager registry
Last synced: about 1 month ago
JSON representation
📦 Homebrew registry manager for macOS, fast switch between different registries: official, tsinghua, aliyun, ustc
- Host: GitHub
- URL: https://github.com/vincent0700/homebrew-brm
- Owner: Vincent0700
- License: mit
- Created: 2020-01-27T12:40:34.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T18:12:55.000Z (almost 2 years ago)
- Last Synced: 2024-11-10T23:37:38.661Z (about 1 month ago)
- Topics: homebrew, manager, registry
- Language: JavaScript
- Homepage:
- Size: 1.6 MB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# BRM (Homebrew Registry Manager)
[![NPM](https://nodei.co/npm/homebrew-brm.png?downloads=true&downloadRank=true)](https://www.npmjs.com/package/homebrew-brm)
[![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/vincent0700/homebrew-brm/blob/master/LICENSE)
[![npm](https://img.shields.io/npm/v/homebrew-brm.svg)](https://www.npmjs.com/package/homebrew-brm)
[![npm](https://img.shields.io/npm/dm/homebrew-brm.svg)](https://www.npmjs.com/package/homebrew-brm)brm can help you easy and fast switch between different Homebrew registries, now include: official, tsinghua, aliyun, ustc.
![](./assets/demo.gif)
## Install
```bash
$ npm install -g homebrew-brm
```Or
```
$ yarn global add homebrew-brm
```## Usage
```
$ brm -h
Usage: brm [options] [command]Homebrew registry manager for macOS
Options:
-V, --version output the version number
-h, --help output usage informationCommands:
ls List all the registries
current Show current registry and URL
use Change homebrew registry
test [registry] Show response time for specific or all registries
```## Example
### List all the registries
```
$ brm ls
┌──────────┬──────────────────┬──────────────────┬──────────────────┬──────────────────┐
│ │ brew │ homebrew/core │ homebrew/cask │ homebrew/bottles │
├──────────┼──────────────────┼──────────────────┼──────────────────┼──────────────────┤
│ official │ ✔ │ ✔ │ ✔ │ ✔ │
├──────────┼──────────────────┼──────────────────┼──────────────────┼──────────────────┤
│ tsinghua │ ✔ │ ✔ │ Use │ ✔ │
├──────────┼──────────────────┼──────────────────┼──────────────────┼──────────────────┤
│ aliyun │ Use │ Use │ ✘ │ Use │
├──────────┼──────────────────┼──────────────────┼──────────────────┼──────────────────┤
│ ustc │ ✔ │ ✔ │ ✔ │ ✔ │
└──────────┴──────────────────┴──────────────────┴──────────────────┴──────────────────┘
```### Change homebrew registry
```
$ brm use ustc
? Select registry (Press to select, to toggle all, to invert selection)
❯◉ brew
◉ homebrew/core
◉ homebrew/cask
◉ homebrew/bottles
``````
$ brm use ustc
? Select registry brew, homebrew/core, homebrew/bottles
[BRM] Set brew registry to https://mirrors.ustc.edu.cn/brew.git
[BRM] Set homebrew/core registry to https://mirrors.ustc.edu.cn/homebrew-core.git
[BRM] Set homebrew/cask registry to https://mirrors.ustc.edu.cn/homebrew-cask.git
[BRM] Set homebrew/bottles registry to https://mirrors.ustc.edu.cn/homebrew-bottles
[BRM] Executing brew cleanup
[BRM] Executing brew update
Already up-to-date.
[BRM] Done.
```### Show current registry and URL
```
$ brm current
┌──────────────────┬──────────┬─────────────────────────────────────────────────────────────────────┐
│ brew │ aliyun │ https://mirrors.aliyun.com/homebrew/brew.git │
├──────────────────┼──────────┼─────────────────────────────────────────────────────────────────────┤
│ homebrew/core │ aliyun │ https://mirrors.aliyun.com/homebrew/homebrew-core.git │
├──────────────────┼──────────┼─────────────────────────────────────────────────────────────────────┤
│ homebrew/cask │ tsinghua │ https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask.git │
├──────────────────┼──────────┼─────────────────────────────────────────────────────────────────────┤
│ homebrew/bottles │ aliyun │ https://mirrors.aliyun.com/homebrew/homebrew-bottles │
└──────────────────┴──────────┴─────────────────────────────────────────────────────────────────────┘
```### Auto install dependencies
```
$ brm
[BRM][WARN] Missing dependency - Homebrew
? Press to install Homebrew? Yes
```### Test mirror speed
```
$ brm test aliyun
[BRM] Testing speed of aliyun...
aliyun ------------------------ 10 ms
``````
$ brm test
[BRM] Testing speed of official, tsinghua, aliyun, ustc...
aliyun ------------------------ 18 ms
tsinghua ---------------------- 33 ms
ustc -------------------------- 45 ms
official ---------------------- timeout
```