BrewUI README

The project's README from github.com/Homebrew/BrewUI. As one markdown file: README.md.

🧑‍💻 BrewUI

BrewUI user interface

Homebrew's official macOS GUI: making package management approachable for users who prefer graphical interfaces over Terminal, while maintaining complete transparency about underlying Homebrew operations.

💡 Motivation

Enable CLI-averse users to safely discover, install, update and manage Homebrew packages through a native SwiftUI interface that never hides what Homebrew is doing.

📲 Tech

📦 Installation

brew install --cask homebrew-app

Homebrew configuration

Put Homebrew options in brew.env and relaunch BrewUI after changing them. Shell aliases and exported variables do not configure the app. See Homebrew configuration.

🛠️ Development

After cloning:

./scripts/bootstrap

This installs Mint from Brewfile, runs mint bootstrap to build the SwiftFormat and SwiftLint versions pinned in Mintfile, enables repository git hooks and resolves Swift package dependencies for Homebrew.xcodeproj.

After bootstrap, commits automatically run checks on staged Swift files:

  1. mint run swiftformat
  2. mint run swiftlint (with --fix, then strict validation)

The hook also runs BrewUILint over the production tree. If unresolved lint violations remain, the commit is blocked and the hook prints the failures so you can fix and re-commit.

See development setup for signing configuration, conventions and testing for contributor guidance and architecture for system design.

🌍 Translations

Translations are community-sourced and a partial one is welcome: any string without a translation falls back to English. Copy lives in one Localizable.xcstrings catalog per UI target, Homebrew/ for the window, sidebar and menus, and Resources/ in BrewUIComponents and each BrewFeature* package. Edit a catalog in Xcode. See localisation for the reasoning behind the steps below.

Adding a language

  1. Open Homebrew/Localizable.xcstrings, press +, pick the language and translate at least one string there. macOS only lists a language in the per-app picker under Applications in System Settings when the app bundle ships it, so a language that exists only in a package catalog never loads and scripts/localize verify fails. Adding it also records the language in knownRegions in Homebrew.xcodeproj; commit that.
  2. Add the language to each package catalog you want to translate and do as much of it as you like.
  3. Never leave a translation blank. An empty value renders as empty text rather than falling back to English, so delete the entry instead of clearing it. verify fails on a blank.
  4. Run scripts/localize verify, then scripts/localize status to see how far the language has got.

Translating a string

  1. Find the catalog that holds it: grep -rl "Run Again" Homebrew/Localizable.xcstrings Sources/*/Resources/Localizable.xcstrings.
  2. Read the comment before translating. It says where the string appears and what each %@ or %lld stands for.
  3. Keep every format specifier the English has, and number them (%1$@, %2$lld) if your language needs a different order. Nothing checks this for you and a mismatch shows the wrong value at runtime.
  4. English needs only two plural forms, so the code picks between two keys itself (1 package and %lld packages). A language with more categories varies the %lld key by plural (Vary By Plural in Xcode) and translates 1 package as well.
  5. Mark the string as reviewed once you are happy with it. One left in Needs Review still ships, so the state is a note to yourself rather than a gate.
  6. Run scripts/localize verify.

Changing English copy

The key is the English text, so rewording a string makes a new entry rather than editing one.

  1. Change the literal in the Swift source, keeping bundle: #bundle and updating the comment: if the meaning moved.
  2. Run scripts/localize sync, which an Xcode build does for you. It adds the new key and marks the old one "extractionState" : "stale", keeping its translations.
  3. Carry each translation over to the new key where the wording still means the same thing. Where it does not, leave it behind so the string falls back to English until someone translates it again.
  4. Delete the stale entry once its translations have been carried over or discarded. Nothing fails while one lingers, but a catalog full of them buries the entries still worth rescuing.
  5. Commit the .xcstrings changes with the code. CI compares the catalogs against the built sources and fails if they have drifted.

🚧 Status

Stable and under active development.

📄 Licence

AGPL-3.0. If you reuse or adapt the source the AGPL terms apply, including the network-use clause.

BrewUI (Homebrew/BrewUI)

Searching Database…

2.7K ·GitHub
这是做什么的?这是 Homebrew 官方的 macOS 图形界面应用,让你不用终端就能发现、安装、更新和管理软件包,同时清楚展示 Homebrew 在底层到底在做什么。
它是一个独立的 Mac 应用,还是在终端之上套的一层壳?它是一个用 Swift 和 SwiftUI 构建的独立原生 macOS 应用。它替你驱动 Homebrew,但从不掩盖 Homebrew 实际在后台做的事。
我怎么把它装到我的 Mac 上?README 的 Installation 部分介绍了如何获取这个应用。如果要自己从源码构建,先克隆仓库,再运行 Mint 引导脚本——它会安装固定版本的 SwiftFormat 和 SwiftLint,启用 git 钩子,并拉取 Swift 包依赖。
我是不是得先装好 Homebrew,还是这个应用自带包管理器?你需要已装好的 Homebrew 环境——BrewUI 是在它之上工作的,从 brew 命令行工具和 Homebrew JSON API 获取软件包数据。
我的 shell 配置——别名、导出的环境变量——能对这个应用生效吗?不能。Homebrew 的选项只从 brew.env 文件读取,而且修改后必须重启 BrewUI 才会生效;shell 的别名和导出的变量完全不起作用。
它也能配合 Linux 上的 Homebrew 用吗,还是只有 Mac 能用?只有 Mac 能用。它是用 Swift 和 SwiftUI 编写的原生 macOS 应用,所以 Linux 上的 Homebrew 用户还是得继续用终端。
如果我想复用或改编 BrewUI 的代码,许可证有什么要求?它采用 AGPL-3.0 许可证:复用或改编源代码都要遵守 AGPL 条款,包括网络使用条款。
BrewUI 稳定吗,能日常使用吗?可以——README 说明它已经稳定且仍在积极开发中,而且作为 Homebrew 的官方图形界面,它在 GitHub 上已经获得了超过 2600 颗星。
如果 BrewUI 还没有翻译成我的语言怎么办?翻译由社区提供,未完成的部分也欢迎贡献:任何没有翻译的字符串都会回退到英文。你可以在 Xcode 中通过 Localizable.xcstrings 目录添加语言,并用 scripts/localize status 查看进度。
Creator
Homebrew
Size
2.9 MB
Stars
2.7K
Age
7mo
Commits · 90 Days