DEV Community

MoLines Designs
MoLines Designs

Posted on

I built a visual TUI for Homebrew with React and Ink

Why I built Brew-TUI

If you're a macOS developer, you probably use Homebrew every day. But memorizing all the brew commands gets old — especially when you just want to see what's outdated, upgrade a few packages, or check if a service is running.

So I built Brew-TUI: a full visual terminal UI for Homebrew.

What it looks like

It's a keyboard-driven TUI built with React 18 + Ink 5 (terminal renderer) and Zustand for state management. You get:

  • Dashboard — package stats, outdated counts, services, system info at a glance
  • Installed — browse and filter all formulae and casks with version info
  • Search — find and install packages without leaving the TUI
  • Outdated — see version diffs, upgrade one by one or all at once
  • Services — start/stop/restart Homebrew services
  • Doctor — run brew doctor and see warnings
  • Package Info — dependencies, caveats, quick actions

Navigate with 1-0 to jump to views, j/k to scroll, / to search, Tab to cycle. Press L to switch between English and Spanish.

The tech stack

  • TypeScript (strict mode, ESM-only)
  • React 18 for the component tree
  • Ink 5 as the terminal renderer (<Box> = flexbox, <Text> = styled output)
  • Zustand for state management
  • tsup for building

The data flow is: Views → Zustand stores → brew-api → Parsers → brew CLI (spawn). Streaming operations (install, upgrade) use an AsyncGenerator that yields lines in real time.

Pro features

There's also a freemium tier with:

  • Profiles — export/import your Homebrew setup across machines
  • Smart Cleanup — find orphan packages and reclaim disk space
  • History — track every install/uninstall/upgrade
  • Security Audit — scan packages against the OSV vulnerability database
  • BrewBar — a macOS menu bar companion app (Swift 6 / SwiftUI) that shows outdated counts and lets you upgrade from the menu bar

Install

# npm
npm install -g brew-tui

# Homebrew
brew tap MoLinesGitHub/tap
brew install brew-tui

# Run without installing
npx brew-tui
Enter fullscreen mode Exit fullscreen mode

Links

Feedback, issues, and stars welcome! 🍺

Top comments (0)