1.2.5 • Published 4 years ago

homebrew-brm v1.2.5

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

BRM (Homebrew Registry Manager)

NPM

license npm npm

brm can help you easy and fast switch between different Homebrew registries, now include: official, tsinghua, aliyun, ustc.

npm.io

Install

$ 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 information

Commands:
  ls               List all the registries
  current          Show current registry and URL
  use <registry>   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 <space> to select, <a> to toggle all, <i> 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 <Enter> 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
1.2.5

4 years ago

1.2.4

4 years ago

1.2.3

4 years ago

1.2.2

4 years ago

1.2.0

4 years ago

1.2.1

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago