A modern, GUI-based Homebrew package manager for macOS written in Rust.
This codebase was largely pair-programmed with AI models (Claude, ChatGPT, etc.). Treat it as:
- A sandbox for learning and architecture experiments
- A case study in what AIs get right—and almost right
- A living demo of clean architecture in Rust
Disclaimer: It compiles, it runs, and it manages Homebrew, but parts were authored by statistically enthusiastic robots. Expect the occasional off-by-one joke, an overconfident TODO, or a function that’s suspiciously clever at 3am.
Meta-note: Yes, an AI wrote this warning about AI-written code. Self-reference acknowledged; recursion depth limited; stack intact.
Use, fork, and learn freely. If you find a bug, blame the robots, keep the credit.
-
📦 Package Management
- View installed formulae and casks
- Check for outdated packages
- Install, uninstall, and update packages
- Search for available packages
- Pin and unpin packages to prevent updates
-
🧹 Maintenance
- Clean package cache
- Remove old package versions
- Update all packages at once
- Sequential updates: Update packages one at a time with progress tracking
-
🔐 Security
- Password authentication modal for install/uninstall operations
- Automatic password error detection and retry mechanism
- Secure password input (hidden field with show/hide toggle)
-
🎨 Modern UI
- Clean, intuitive interface built with egui
- Tab-based navigation
- Async operations with responsive UI
- Real-time loading indicators for package operations
Brewsty follows clean architecture principles with SOLID design:
src/
├── domain/ # Core business logic
│ ├── entities/ # Domain models (Package, PackageType, CacheInfo)
│ └── repositories/ # Repository interfaces
├── infrastructure/ # External integrations
│ └── brew/ # Homebrew command execution
├── application/ # Use cases
│ ├── dto/ # Data transfer objects
│ └── use_cases/ # Application business logic
└── presentation/ # GUI layer
├── components/ # Reusable UI components
├── services/ # Async task management
└── ui/ # Application views
- Single Responsibility: Each module has one clear purpose
- Dependency Inversion: Use cases depend on repository abstractions
- Interface Segregation: Clean, focused trait definitions
- Testability: Repository pattern allows easy mocking and testing
- Sequential Operations: Long-running updates process packages one at a time with UI feedback
- Graceful Auth Handling: Automatic detection of password requirements with user-friendly modal
- macOS
- Homebrew installed
- Rust toolchain (install via rustup)
- Xcode Command Line Tools (
xcode-select --install)
git clone https://github.com/whooof/brewsty.git
cd brewsty
cargo build --releasecargo run --releaseBy default, the application shows INFO level logs in release builds and DEBUG level logs in debug builds. To enable verbose TRACE level logging for debugging:
cargo run --features verbose-loggingFeature Flags:
verbose-logging- Enables TRACE level logging (useful for debugging)- Default (no flags) - INFO level (release) or DEBUG level (debug)
The application provides four main tabs:
- Installed: Browse all installed formulae and casks with version info
- Outdated: See packages that need updates and upgrade them
- Select multiple packages for sequential updating
- Each package updates one at a time with progress tracking (e.g., "Updating 2/5: package-name...")
- Select All / Deselect All buttons for batch operations
- Search: Find and install new packages from Homebrew
- Maintenance: Clean cache and remove old versions
When updating multiple packages, Brewsty processes them sequentially rather than all at once. This approach:
- Reduces system load and improves stability
- Provides clear progress feedback in the UI
- Prevents overwhelming Homebrew with concurrent requests
- Updates the package list locally after each successful update for instant feedback
If an operation (install, uninstall, update) requires administrator privileges:
- The app attempts the operation normally first
- If a password is required, a modal dialog appears
- Enter your administrator password in the secure input field
- The operation retries with the provided password
- On failure, you can try again or cancel
The password input field includes a "Show password" toggle for verification.
- Rust - Systems programming language
- egui - Immediate mode GUI framework
- eframe - Native GUI application framework
- Tokio - Async runtime for non-blocking operations
- Homebrew - macOS package manager
- egui-winit - Window integration for egui
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License (Tortilla Edition 🌯)
See LICENSE.md for details.