brew-tui 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +141 -51
- package/build/index.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,67 +1,72 @@
|
|
|
1
1
|
# Brew-TUI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Manage Homebrew visually from your terminal and macOS menu bar.**
|
|
4
4
|
|
|
5
|
-
](https://www.npmjs.com/package/brew-tui)
|
|
6
|
+
[](https://nodejs.org/)
|
|
7
|
+
[](LICENSE)
|
|
8
|
+
[](https://github.com/MoLinesGitHub/homebrew-tap)
|
|
9
|
+
[]()
|
|
8
10
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
- **Dashboard** -- overview of installed packages, outdated counts, services, and system info
|
|
12
|
-
- **Installed** -- browse and filter formulae and casks with version info and status badges
|
|
13
|
-
- **Search** -- find and install packages directly from the TUI
|
|
14
|
-
- **Outdated** -- see available upgrades with version comparison arrows, upgrade individually or all at once
|
|
15
|
-
- **Services** -- start, stop, and restart Homebrew services
|
|
16
|
-
- **Doctor** -- run `brew doctor` and see warnings at a glance
|
|
17
|
-
- **Package Info** -- detailed view with dependencies, caveats, and quick install/uninstall
|
|
11
|
+
> Two tools, one workflow: **Brew-TUI** is a keyboard-driven terminal UI, and **BrewBar** is a native macOS menu bar companion. Both call `brew` directly — no middleware, no daemons.
|
|
18
12
|
|
|
19
|
-
|
|
13
|
+
**Website:** [molinesdesigns.com/brewtui](https://molinesdesigns.com/brewtui/)
|
|
20
14
|
|
|
21
|
-
|
|
22
|
-
- **Smart Cleanup** -- find orphaned packages and reclaim disk space
|
|
23
|
-
- **Action History** -- track every install, uninstall, and upgrade
|
|
24
|
-
- **Security Audit** -- scan packages against the OSV vulnerability database
|
|
15
|
+
---
|
|
25
16
|
|
|
26
17
|
## Install
|
|
27
18
|
|
|
28
19
|
```bash
|
|
29
|
-
# npm
|
|
20
|
+
# npm (recommended)
|
|
30
21
|
npm install -g brew-tui
|
|
31
|
-
pnpm add -g brew-tui
|
|
32
|
-
yarn global add brew-tui
|
|
33
|
-
bun add -g brew-tui
|
|
34
22
|
|
|
35
23
|
# Homebrew
|
|
36
24
|
brew tap MoLinesGitHub/tap
|
|
37
25
|
brew install brew-tui
|
|
38
26
|
|
|
39
|
-
#
|
|
27
|
+
# Run without installing
|
|
40
28
|
npx brew-tui
|
|
41
29
|
```
|
|
42
30
|
|
|
43
|
-
|
|
31
|
+
**Requirements:** Node.js >= 22, Homebrew, macOS
|
|
44
32
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Features
|
|
36
|
+
|
|
37
|
+
| Feature | Description |
|
|
38
|
+
|---------|-------------|
|
|
39
|
+
| **Dashboard** | Overview of installed packages, outdated counts, services, and system info |
|
|
40
|
+
| **Installed** | Browse and filter formulae and casks with version info and status badges |
|
|
41
|
+
| **Search** | Find and install packages directly from the TUI |
|
|
42
|
+
| **Outdated** | Version comparison arrows, upgrade individually or all at once |
|
|
43
|
+
| **Services** | Start, stop, and restart Homebrew services |
|
|
44
|
+
| **Doctor** | Run `brew doctor` and see warnings at a glance |
|
|
45
|
+
| **Package Info** | Detailed view with dependencies, caveats, and quick actions |
|
|
46
|
+
|
|
47
|
+
### Pro Features
|
|
48
|
+
|
|
49
|
+
| Feature | Description |
|
|
50
|
+
|---------|-------------|
|
|
51
|
+
| **Profiles** | Export and import your Homebrew setup across machines |
|
|
52
|
+
| **Smart Cleanup** | Find orphaned packages and reclaim disk space |
|
|
53
|
+
| **Action History** | Track every install, uninstall, and upgrade |
|
|
54
|
+
| **Security Audit** | Scan packages against the [OSV](https://osv.dev) vulnerability database |
|
|
55
|
+
| **BrewBar** | Native macOS menu bar app with notifications and one-click upgrades |
|
|
52
56
|
|
|
53
|
-
|
|
57
|
+
---
|
|
54
58
|
|
|
55
|
-
|
|
59
|
+
## Usage
|
|
56
60
|
|
|
57
61
|
```bash
|
|
58
|
-
brew-tui
|
|
59
|
-
brew-tui
|
|
60
|
-
brew-tui
|
|
62
|
+
brew-tui # Launch the TUI
|
|
63
|
+
brew-tui status # Show license status
|
|
64
|
+
brew-tui activate <key> # Activate Pro license
|
|
65
|
+
brew-tui revalidate # Revalidate Pro license
|
|
66
|
+
brew-tui deactivate # Deactivate license on this machine
|
|
67
|
+
brew-tui delete-account # Remove all local data (~/.brew-tui/)
|
|
61
68
|
```
|
|
62
69
|
|
|
63
|
-
If BrewBar or `brew-tui status` reports that your Pro license needs refreshing, run `brew-tui revalidate` before retrying.
|
|
64
|
-
|
|
65
70
|
### Keyboard Navigation
|
|
66
71
|
|
|
67
72
|
| Key | Action |
|
|
@@ -75,19 +80,39 @@ If BrewBar or `brew-tui status` reports that your Pro license needs refreshing,
|
|
|
75
80
|
| `L` | Toggle language (en/es) |
|
|
76
81
|
| `q` | Quit |
|
|
77
82
|
|
|
78
|
-
|
|
83
|
+
### Language
|
|
79
84
|
|
|
80
|
-
Brew-TUI supports English and Spanish
|
|
85
|
+
Brew-TUI supports **English** and **Spanish**. Language is detected from your system locale (`LANG`), or you can:
|
|
81
86
|
|
|
82
87
|
- Pass `--lang=es` or `--lang=en` as a CLI flag
|
|
83
|
-
- Press `L` inside the TUI to toggle
|
|
88
|
+
- Press `L` inside the TUI to toggle
|
|
89
|
+
|
|
90
|
+
---
|
|
84
91
|
|
|
85
|
-
## BrewBar
|
|
92
|
+
## BrewBar (Pro)
|
|
93
|
+
|
|
94
|
+
BrewBar is a native macOS menu bar companion app (Swift 6 / SwiftUI) that:
|
|
95
|
+
|
|
96
|
+
- Shows a badge with outdated package count
|
|
97
|
+
- Sends push notifications when updates are available
|
|
98
|
+
- Lets you upgrade packages without opening a terminal
|
|
99
|
+
- Displays Homebrew service status
|
|
100
|
+
- Configurable check interval (1h / 4h / 8h)
|
|
101
|
+
- Supports Launch at Login
|
|
102
|
+
|
|
103
|
+
### Install BrewBar
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
# Via Brew-TUI CLI (Pro license required)
|
|
107
|
+
brew-tui install-brewbar
|
|
108
|
+
brew-tui install-brewbar --force # Reinstall / update
|
|
109
|
+
brew-tui uninstall-brewbar # Remove
|
|
86
110
|
|
|
87
|
-
|
|
88
|
-
|
|
111
|
+
# Via Homebrew Cask
|
|
112
|
+
brew install --cask MoLinesGitHub/tap/brewbar
|
|
113
|
+
```
|
|
89
114
|
|
|
90
|
-
|
|
115
|
+
### Build from Source
|
|
91
116
|
|
|
92
117
|
```bash
|
|
93
118
|
cd menubar
|
|
@@ -95,14 +120,79 @@ tuist generate
|
|
|
95
120
|
xcodebuild -workspace BrewBar.xcworkspace -scheme BrewBar build
|
|
96
121
|
```
|
|
97
122
|
|
|
98
|
-
|
|
123
|
+
Requires [Tuist](https://tuist.io), Xcode, and macOS 14+.
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Architecture
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
Views (React/Ink) --> Stores (Zustand) --> brew-api --> Parsers --> brew CLI (spawn)
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
| Layer | Tech | Role |
|
|
134
|
+
|-------|------|------|
|
|
135
|
+
| **UI** | React 18 + Ink 5 | Terminal rendering via ANSI escape codes |
|
|
136
|
+
| **State** | Zustand 5 | Global stores with per-key loading/error maps |
|
|
137
|
+
| **API** | brew-api.ts | Typed wrapper over `brew` CLI with input validation |
|
|
138
|
+
| **Parsers** | json-parser / text-parser | Parse `brew info --json`, `brew search`, `brew doctor` |
|
|
139
|
+
| **CLI** | brew-cli.ts | `execBrew()` (30s timeout) and `streamBrew()` (async generator, 5min idle timeout) |
|
|
140
|
+
|
|
141
|
+
- ESM-only, TypeScript strict mode, built with [tsup](https://github.com/egoist/tsup)
|
|
142
|
+
- All streaming operations (install, upgrade) use AsyncGenerators yielding lines in real time
|
|
143
|
+
- Package names validated via regex before passing to `spawn` (no shell injection)
|
|
144
|
+
- 99 tests across 10 suites (Vitest)
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## Security
|
|
149
|
+
|
|
150
|
+
- License data encrypted with AES-256-GCM, machine-bound via UUID
|
|
151
|
+
- SHA-256 verification on BrewBar binary downloads
|
|
152
|
+
- Bundle integrity check at startup (fail-closed)
|
|
153
|
+
- Runtime validation of all external API responses (Polar, OSV)
|
|
154
|
+
- Rate limiting on license activation (5 attempts / 15min lockout)
|
|
155
|
+
- No secrets in logs, no PII transmitted without consent
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## Project Structure
|
|
160
|
+
|
|
161
|
+
```
|
|
162
|
+
src/
|
|
163
|
+
views/ # 12 React/Ink views
|
|
164
|
+
stores/ # Zustand stores (brew, navigation, license, modal)
|
|
165
|
+
components/ # Shared UI (StatusBadge, ResultBanner, SelectableRow, ...)
|
|
166
|
+
hooks/ # useKeyboard, useBrewStream, useDebounce
|
|
167
|
+
lib/
|
|
168
|
+
license/ # Polar API, AES encryption, anti-tamper, canary
|
|
169
|
+
security/ # OSV vulnerability scanning
|
|
170
|
+
profiles/ # Profile export/import (Pro)
|
|
171
|
+
cleanup/ # Orphan detection (Pro)
|
|
172
|
+
history/ # Action logging (Pro)
|
|
173
|
+
parsers/ # JSON and text parsers for brew output
|
|
174
|
+
i18n/ # English + Spanish translations
|
|
175
|
+
utils/ # Colors, spacing, logger, formatting
|
|
176
|
+
menubar/ # BrewBar (Swift 6 / SwiftUI / Tuist)
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## Contributing
|
|
99
182
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
-
|
|
183
|
+
```bash
|
|
184
|
+
git clone https://github.com/MoLinesGitHub/Brew-TUI.git
|
|
185
|
+
cd Brew-TUI
|
|
186
|
+
npm install
|
|
187
|
+
npm run dev # Run with tsx (requires interactive TTY)
|
|
188
|
+
npm run typecheck # tsc --noEmit
|
|
189
|
+
npm run test # vitest (99 tests)
|
|
190
|
+
npm run lint # eslint
|
|
191
|
+
npm run build # Production bundle via tsup
|
|
192
|
+
```
|
|
103
193
|
|
|
104
|
-
|
|
194
|
+
---
|
|
105
195
|
|
|
106
196
|
## License
|
|
107
197
|
|
|
108
|
-
[MIT](LICENSE) -- MoLines Designs
|
|
198
|
+
[MIT](LICENSE) -- [MoLines Designs](https://molinesdesigns.com)
|
package/build/index.js
CHANGED
|
@@ -4113,7 +4113,7 @@ function AccountView() {
|
|
|
4113
4113
|
/* @__PURE__ */ jsx30(Box28, { marginTop: 2, children: /* @__PURE__ */ jsxs29(Text29, { color: COLORS.textSecondary, children: [
|
|
4114
4114
|
status === "pro" ? `d:${t("hint_deactivate")}` : "",
|
|
4115
4115
|
" ",
|
|
4116
|
-
t("app_version", { version: "0.3.
|
|
4116
|
+
t("app_version", { version: "0.3.1" })
|
|
4117
4117
|
] }) })
|
|
4118
4118
|
] });
|
|
4119
4119
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "brew-tui",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Brew-TUI — Visual TUI for Homebrew package management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
],
|
|
42
42
|
"license": "MIT",
|
|
43
43
|
"engines": {
|
|
44
|
-
"node": ">=
|
|
44
|
+
"node": ">=22"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@inkjs/ui": "^2.0.0",
|