Skip to content

dofy/brew-graph

Repository files navigation

Brew Graph

🍺 A modern web application to search, explore and manage Homebrew packages.

Version License PWA Homebrew React TypeScript Vite

✨ Features

  • 🔍 Smart Search - Fuzzy search by name and description with relevance ranking
  • 📦 Package Categories - Browse Formulae and Casks separately
  • 📋 One-click Copy - Quickly copy install commands
  • 🔗 Dependency Graph - View and navigate package dependencies with breadcrumb trail
  • 💾 Offline Support - Local IndexedDB caching with 48-hour auto-refresh
  • Favorites & Tags - Organize packages with favorites and custom tags
  • ⌨️ Full Keyboard Support - Navigate entirely with keyboard shortcuts
  • 🌓 Dark Mode - Light, dark, and system theme support
  • 📱 Responsive Design - Works on desktop and mobile devices
  • 📲 PWA Support - Install as a native app on desktop and mobile

🔍 Search Syntax

Syntax Description Example
text Search by name and description react
#tag Filter by tag #frontend
* Show only favorites *
Combined Combine multiple filters react #tool
Combined Search favorites with text * node

⌨️ Keyboard Shortcuts

Search

Key Action
⌘K or / Open search
Esc Close dialog / Go home

Navigation

Key Action
Shift+H Go to Home
Shift+F Go to Favorites
Shift+T Go to Tags

Settings

Key Action
d Toggle theme
w Toggle page width
x Toggle hide deprecated
r Refresh data
? Show help

List View

Key Action
1 2 3 Filter type
[ / ] Previous / Next page
Shift+[ First page
↑↓←→ or hjkl Navigate cards
Enter Open package
f Toggle favorite
t Add tag

Detail View

Key Action
Go back
f Toggle favorite
t Add tag
o Open homepage
c Copy install command

🚀 Getting Started

Prerequisites

  • Node.js 18+
  • pnpm

Installation

# Clone the repository
git clone https://github.com/dofy/brew-graph.git
cd brew-graph

# Install dependencies
pnpm install

# Start development server
pnpm dev

Build

pnpm build

Preview Production Build

pnpm preview

📲 Install as App

Brew Graph is a Progressive Web App (PWA) that can be installed on your device:

  • Desktop (Chrome/Edge): Click the install icon in the address bar
  • iOS Safari: Tap Share → "Add to Home Screen"
  • Android Chrome: Tap menu → "Install app"

Once installed, the app works offline with cached data.

🛠️ Tech Stack

  • Framework: React 19 + TypeScript
  • Build Tool: Vite 7
  • Styling: Tailwind CSS 4 + shadcn/ui
  • State Management: Zustand
  • Local Database: Dexie.js (IndexedDB)
  • Routing: React Router 7
  • Icons: Lucide React
  • PWA: vite-plugin-pwa + Workbox

📦 Data Source

Package data is fetched from the official Homebrew Formulae API.

🌐 Deployment

This project is configured for deployment on Vercel. Simply connect your GitHub repository to Vercel for automatic deployments.

📄 License

MIT License © 2026 Seven Yu


Powered by yahaha.net | phpz.xyz