DEV Community

Cover image for 🧠 Introducing `brew_brain`: The Homebrew Arsenal Manager I Wish I Had Years Ago
raymonepping
raymonepping

Posted on

🧠 Introducing `brew_brain`: The Homebrew Arsenal Manager I Wish I Had Years Ago

If your terminal is a little too full of Homebrew installs, and you’re tired of forgetting what’s actually important, this is for you.


🍺 The Problem

Ever run brew list and felt a wave of guilt?

“Wait, do I even use half of these? Why is that still installed?”

Worse, have you ever needed to:

  • Onboard a teammate and document your dev setup?
  • Move to a new Mac and wish you could just “import your tools” (without 100+ random things)?
  • Prove to security/audit teams what’s actually on your machine?

Me too. That’s why I built brew_brain — a Bash-powered Homebrew arsenal manager that tracks what matters, documents it, and lets you export or audit your toolkit in seconds.


🚀 What brew_brain Actually Does

  • Track only what matters: Add "track": "true" in your arsenal JSON to focus on your must-have CLIs.
  • Instant health checks: brew_brain checkup tells you what’s missing, outdated, or gathering dust.
  • Templated Markdown & JSON output: Generate clean, team-friendly docs (thanks, .tpl files!) or export pretty JSON for backups or onboarding.
  • One-liner installs: If you’re missing a tool, brew_brain will even suggest (or run) the right brew install.

🛠️ How to Use It

  1. Clone or drop in $PATH: Just grab the script, put it in your $PATH, and you’re set.
  2. Configure your arsenal: Your Homebrew arsenal lives in a simple JSON file (~/.brew_brain.json). Only “tracked” tools get included in audits or docs.
  3. Audit & document with a single command:
    • brew_brain → Markdown summary
    • brew_brain checkup → Health check
    • brew_brain --output json --output-file arsenal → Export for backup/onboarding
    • brew_brain --dump --filter=raymonepping --output=my_brews.json → Full, pretty, filtered export

Bonus: Markdown docs use your own .tpl template files, so you can make the docs fit your style or team branding.


⚡️ Real-World Uses

  • Team onboarding: Ship a single JSON config and every dev has the same CLI arsenal in minutes.
  • Compliance or “works on my machine”: Export a clear, timestamped doc of exactly what’s installed.
  • Disaster recovery/migration: Moving to a new Mac? Grab your arsenal JSON and re-create your setup—minus the cruft.

🤔 Why Not Just Use brew list?

Because brew list is just a list.

brew_brain is an arsenal—tracked, documented, exportable, and team-ready.

You control what gets tracked, how it’s output, and how it’s shared.

Plus, you get Markdown docs that look… actually decent.


🧑‍💻 Try It!

Install, track, document, and ship your toolkit like it actually matters.

Top comments (0)