Track and compare Homebrew install trends for casks and formulae.
Homebrew publishes install analytics for every cask and formula, but only as a single ranked list with no history. brewstats takes a snapshot of that data every week, keeps it forever, and turns it into charts so you can see how packages trend over time and how they stack up against each other.
- Casks — macOS apps distributed through Homebrew, such as
bruno,cursor, or1password - Formulae — CLI tools and libraries, such as
node,python, orgit
- Compare packages side by side — pick up to eight casks or formulae and plot them on one chart
- Line and pie charts — see trends over time or share of installs at a glance
- Three time windows — 30-day, 90-day, and 365-day rolling install counts
- Fast search — instant substring search with full keyboard navigation
- Shareable URLs — your selection, period, and chart type live in the URL, so any view can be linked
- Dark and light mode — follows your system preference, with a manual toggle
Example: compare API clients over the last 90 days as a pie chart:
https://brewstats.dev/casks?packages=bruno,postman,insomnia&period=90d&chart=pie
Homebrew Analytics API ──▶ scripts/fetch-stats.js ──▶ stats/<source>/<period>/<date>.csv
│
▼
public/stats/<source>/<period>.json ◀── scripts/compile-stats.js
│
▼
Astro site (brewstats.dev)
- Fetch. A GitHub Actions workflow runs every Sunday at 12:00 UTC and pulls the 30-, 90-, and 365-day install counts for every cask and formula from the Homebrew Analytics API.
- Store. Each run is saved as a dated CSV in
stats/. Package names are mapped to compact IDs in ametadata.jsonfile per source, which keeps the weekly snapshots small. - Compile.
scripts/compile-stats.jsmerges all snapshots into one JSON file per period, which the site loads client-side. - Commit. The workflow commits the new snapshots and compiled JSON back to the repository, so the full history lives in git.
Requires Node.js 20 or newer.
git clone https://github.com/usebruno/brewstats.dev.git
cd brewstats.dev
npm install
npm run compile # build the JSON the site reads from the committed CSV snapshots
npm run dev # start the dev server at http://localhost:4321| Command | Description |
|---|---|
npm run dev |
Start the Astro dev server with hot reload |
npm run build |
Compile stats, then build the production site into dist/ |
npm run preview |
Serve the production build locally |
npm run fetch |
Fetch the latest snapshot from Homebrew (only runs on Sundays) |
npm run compile |
Compile the CSV snapshots in stats/ into JSON under public/stats/ |
To fetch a fresh snapshot on any other day of the week:
FORCE_RUN=true npm run fetch.
├── .github/workflows/fetch-stats.yml # weekly data refresh
├── scripts/
│ ├── fetch-stats.js # pulls analytics from Homebrew
│ └── compile-stats.js # CSV snapshots → JSON for the site
├── stats/
│ ├── cask-install/ # weekly CSVs for casks, by period
│ └── formulae-install/ # weekly CSVs for formulae, by period
└── src/
├── components/StatsPage.astro # the shared casks/formulae page
├── layouts/Layout.astro
└── pages/ # index, /casks, /formulae
- Astro and Tailwind CSS
- Chart.js
- Data from Homebrew Analytics
Issues and pull requests are welcome. If you spot a package that looks wrong or have an idea for a new view, open an issue.
Built by the team behind Bruno, the open-source API client.