- Go 64.6%
- EJS 23.7%
- JavaScript 4.9%
- Shell 3.9%
- Makefile 2.6%
- Other 0.3%
* refactor(services): split brew.go into focused modules Reorganize the services package for better maintainability: - brew.go: Interface and struct definitions - data.go: Data loading, caching, and tap package management - cache.go: Low-level cache I/O helpers - packages.go: Package retrieval (GetFormulae, GetPackages) - operations.go: Package operations (install, update, remove) - parser.go: Brewfile parsing - brewfile.go: Brewfile-specific app logic (extracted from app.go) This reduces the largest file from 1124 to 322 lines and improves separation of concerns across the codebase. * refactor(services): introduce DataProvider pattern for data loading Extract data loading logic into a dedicated DataProvider service that handles all data retrieval operations (formulae, casks, analytics, cache). BrewService now delegates to DataProvider via interface for better testability and separation of concerns. Also centralizes cache file name constants in dataprovider.go for maintainability. * refactor(services): centralize data in DataProvider and improve naming consistency Move all data-related fields and retrieval methods from BrewService to DataProvider, making BrewService focused solely on brew operations. Rename formula fields (all, installed, remote, analytics) to be consistent with cask naming convention (allFormulae, installedFormulae, etc.). Remove redundant data.go and packages.go files. * refactor(services): consolidate code and fix shared dependencies - IOService now receives BrewService as parameter instead of creating new instance - Move API URL constants from brew.go to dataprovider.go (now private) - Move getCacheDir to cache.go where it belongs - Remove unused GetPrefixPath from BrewService interface - Consolidate Brewfile parsing into brewfile.go as standalone function - Delete parser.go (logic merged into brewfile.go) * fix(brewfile): prevent duplicate packages in list after refresh Add duplicate detection checks in loadBrewfilePackages to ensure each package appears only once in the Brewfile package list, even when refreshing after install/remove operations. * refactor(services): extract search methods to dedicated file Move search(), setResults(), and forceRefreshResults() from app.go to search.go for better code organization and separation of concerns. * refactor(services): remove dead code and unify helpers Remove unused methods and fields: - GetFormulae(), IsPackageInstalled() from DataProvider - InstallAllPackages(), RemoveAllPackages() from BrewService - allFormulae, allCasks fields from DataProvider Unify GetInstalledCaskNames and GetInstalledFormulaNames with a common getInstalledNames helper to reduce code duplication. * docs(brewfile): add package documentation with execution sequence Document Brewfile mode functionality including parsing, tap installation, and package loading. Add execution sequence diagram and note that methods are only active in Brewfile mode (bbrew -f <file>). * refactor(services): move fetchFromAPI to dataprovider Move HTTP fetch function from cache.go to dataprovider.go where it belongs semantically. cache.go now contains only cache I/O operations. * refactor(dataprovider): improve method naming consistency Rename Load* methods to Get* with forceRefresh parameter for clarity: - LoadInstalledFormulae → GetInstalledFormulae - LoadRemoteFormulae → GetRemoteFormulae - LoadTapPackages → GetTapPackages (and similar) Rename Get* methods that execute commands to Fetch* for accuracy: - GetInstalledCaskNames → FetchInstalledCaskNames - GetInstalledFormulaNames → FetchInstalledFormulaNames Replace forceDownload parameter with forceRefresh throughout. * refactor(input): rename io.go to input.go and simplify code Rename IOService/IOAction to InputService/InputAction for semantic correctness (io in Go refers to file I/O, not keyboard input). Simplify handleFilterEvent with helper methods: isFilterActive(), setFilterActive(), updateFilterUI() reducing ~30 lines of repetitive code. Extract handleBatchPackageOperation() helper for InstallAll/RemoveAll operations, reducing ~90 lines of duplicate code with a configurable batchOperation struct. * refactor(filters): replace 4 booleans with FilterType enum Replace showOnlyInstalled, showOnlyOutdated, showOnlyLeaves, showOnlyCasks with a single activeFilter field of type FilterType. Add FilterNone constant for no active filter state. Simplify handleFilterEvent to simple toggle logic. Extract applyFilter method with clean switch statement. Remove redundant isFilterActive and setFilterActive helpers. * refactor(brew): merge operations.go into brew.go Consolidate all BrewService methods into a single file. Add section comments to organize code into logical groups: - Core info (GetBrewVersion) - Package operations (Update/Install/Remove) - Tap support (InstallTap/IsTapInstalled) - Internal helpers (executeCommand) * fix(dataprovider): suppress gosec G107 false positive The URL passed to http.Get comes from internal constants (Homebrew API URLs), not from user input. |
||
|---|---|---|
| .github/workflows | ||
| cmd/bbrew | ||
| docs | ||
| examples | ||
| internal | ||
| site | ||
| .env | ||
| .gitignore | ||
| .golangci.yaml | ||
| .goreleaser.yaml | ||
| build.js | ||
| Containerfile | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| Makefile | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
Bold Brew (bbrew)
A modern Terminal UI for managing Homebrew packages and casks
🌟 Official Homebrew TUI for Project Bluefin
Bold Brew is the official Terminal UI for managing Homebrew in Project Bluefin and Aurora, next-generation Linux desktops that serve tens of thousands of users worldwide.
"This application features full package management for homebrew in a nice nerdy interface"
— Bluefin Documentation
✨ Features
- 🚀 Modern TUI Interface - Clean and responsive terminal user interface
- 📦 Complete Package Management - Manage both Homebrew formulae and casks
- 📋 Brewfile Mode - Curated package collections from Brewfiles (perfect for themed installers)
- 🔍 Advanced Search - Fast fuzzy search across all packages
- 🎯 Smart Filters - Filter by installed, outdated, leaves, or casks
- 📊 Analytics Integration - See popular packages based on 90-day download stats
- 🔄 Real-time Updates - Live feedback during package operations
- ⌨️ Keyboard Shortcuts - Intuitive keybindings for all operations
- 🎨 Type Indicators - Visual distinction between formulae [F] and casks [C]
- 🗂️ XDG Compliance - Follows XDG Base Directory Specification for cache storage
- 🔒 Security Scanning - Automated vulnerability and security checks
🛠️ Installation
Via Homebrew
brew install Valkyrie00/homebrew-bbrew/bbrew
Manually
Download the latest version from the releases page
📖 Quick Start
Standard Mode
Launch the application to browse all Homebrew packages:
bbrew
Brewfile Mode (New!)
Launch with a curated Brewfile to show only specific packages:
bbrew -f /path/to/Brewfile
In Brewfile mode, you can:
- View only packages from the Brewfile
- Pick and choose what to install individually
- Use all standard features (search, filters, etc.)
Perfect for creating themed collections like IDE choosers, dev tools, AI tools, K8s tools, etc.
See the examples/ directory for ready-to-use Brewfiles.
Keyboard Shortcuts
Navigation & Search
/- Search packages (fuzzy search)↑/↓orj/k- Navigate package listEnter- View package detailsEsc- Clear search / Close modals
Filters
F- Filter installed packagesO- Filter outdated packagesL- Filter leaves (explicitly installed, no dependencies)C- Filter casks only
Package Operations
I- Install selected packageU- Update selected packageR- Remove selected packageCtrl+U- Update all outdated packages
Other
Ctrl+R- Refresh package databaseQ- Quit application
📋 What's New in v2.0.0
🎉 Major Features
- Homebrew Casks Support - Full support for managing GUI applications and binaries
- Leaves Filter - Show only explicitly installed packages (excluding dependencies)
- XDG Base Directory Support - Cache follows platform standards (
~/.cache/bbrewon Linux,~/Library/Caches/bbrewon macOS) - Type Indicators - Clear visual distinction between formulae
[F]and casks[C]
🔧 Technical Improvements
- Updated to Go 1.25
- Migrated to Podman and OCI-compliant Containerfile
- Enhanced Makefile with 15+ new targets and help system
- Integrated automated security scanning (govulncheck + gosec)
- Fixed implicit memory aliasing issues
- Improved error handling and logging
🐛 Bug Fixes
- Fixed cask analytics endpoint
- Corrected installed casks detection
- Fixed tview special character rendering for type tags
- Improved directory permission handling (0750)
🖼️ Screenshots
Main interface with package list and filters
Filtered view showing installed packages
Fuzzy search in action
📊 Platform Support
| Platform | Support | Notes |
|---|---|---|
| 🍎 macOS | ✅ Full | Native Homebrew support |
| 🐧 Linux | ✅ Full | Linuxbrew/Homebrew support |
🛡️ Security
Security is a priority for Bold Brew. We use:
- govulncheck - Go vulnerability database scanning
- gosec - Static security analysis
- Automated CI/CD - Security checks on every PR and push
Found a security issue? Please report it privately via GitHub Security Advisories.
🔧 Development
Prerequisites
- Go 1.25+
- Homebrew (for testing)
- Podman (optional, for containerized builds)
Building from Source
# Clone the repository
git clone https://github.com/Valkyrie00/bold-brew.git
cd bold-brew
# Build locally
make build-local
# Run tests
make test
# Run linter
make quality-local
# Run security scans
make security
Project Structure
bold-brew/
├── cmd/bbrew/ # Main application entry point
├── internal/
│ ├── models/ # Data models (Formula, Cask, Package)
│ ├── services/ # Business logic (Brew, App, I/O)
│ └── ui/ # TUI components and layout
├── .github/workflows/ # CI/CD pipelines
└── Makefile # Build automation
🤝 Contributing
Contributions are welcome! Please:
- 🍴 Fork the project
- 🔨 Create your feature branch (
git checkout -b feat/amazing-feature) - 📝 Commit your changes using Conventional Commits
- 🧪 Run tests and linters (
make test quality-local) - 🚀 Push to the branch (
git push origin feat/amazing-feature) - 📬 Open a Pull Request
🦸Contributors
Bold Brew exists thanks to the efforts of these wonderful people
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
💖 Support
- 🌟 Star the project
- 🐛 Report a bug
- 💡 Request a feature
- 📣 Share the project with your friends