Macupdate
a script which migrates as many of the installed packages on a MacOs system to Brew/cask installs and installs software to manage the update of this software via a gui.
Install / Use
/learn @mightywomble/MacupdateREADME
macupdatecheck
A macOS utility that scans /Applications and ~/Applications, detects which apps are available as Homebrew casks, and interactively generates (and optionally runs) an installer script. It also consults the Homebrew Formulae API to suggest alternatives and can replace pre-existing, non-brew .app bundles when installing via Homebrew.
📦 Version history
- 1.2 — 2025-10-22
- ➕ Added per‑app skip option for alternative (amber) suggestions in checker.sh, so you can bypass long candidate lists quickly.
- 🆕 Added brewmelater.sh to scan all installed Homebrew formulae and casks, show status (up‑to‑date/needs update/deprecated), and optionally generate an Ansible playbook (brew_reinstall.yml) to reinstall them.
- 🛠️ Prompt handling improvements (avoid unintended actions when no TTY).
- 1.0 — 2025-10-01
- 🎉 Initial release of checker.sh with scanning, alternative suggestions, and installer generation.
Features
- Fast scan of installed apps using Spotlight (mdfind)
- Classifies apps with icons:
- ✅ Green: already installable/managed via Homebrew
- 🤔 Amber: possible alternatives (suggested via brew search + online API)
- ❌ Red: not available (or macOS core apps)
- Online lookup using the Homebrew Formulae API when local searches miss
- Interactive post-scan flow to choose alternatives and build an installer
- Per‑app skip for alternative suggestions (⏭️ quickly skip long lists)
- Generates ./brew_app_installer.sh and can run it immediately
- Installer auto-adds Applite for easy app management
- Handles “Error: It seems there is already an App at …” and prompts to replace the existing app cleanly
Requirements
- macOS
- Homebrew (brew)
- curl (optional, enables online lookups and better alternatives)
Quick start
chmod +x checker.sh
./checker.sh
🔍 Example scan output
Scanning for apps in /Applications and ~/Applications...
This may take a moment while checking Homebrew...
-----------------------------------------------------
✅ Visual Studio Code
-> Note: Available to install.
-> Run: brew install --cask visual-studio-code
🤔 Warp
-> Note: No exact match for 'warp'.
-> Found similar casks: warp
✅ Warp
-> Note: Found via online Homebrew lookup.
-> Run: brew install --cask warp
-> Ref: https://formulae.brew.sh/cask/warp
❌ Safari
-> Note: Core macOS app, not managed by Homebrew.
-----------------------------------------------------
Scan complete.
Create a Homebrew install script from found apps? [y/N]: y
Reviewing alternatives for apps marked as 'maybe'...
- Warp:
[1/1] Warp -> warp
Install? [Y/n]:
Creating ./brew_app_installer.sh ...
Installer script created at: ./brew_app_installer.sh
Run the installer script now? [Y/n]:
🚀 Example installer output (brew_app_installer.sh)
Updating Homebrew...
==> Auto-updated Homebrew!
Installing casks: visual-studio-code warp applite
==> brew install --cask visual-studio-code
==> Downloading ...
==> Installing Cask visual-studio-code
🍺 visual-studio-code was successfully installed!
==> brew install --cask warp
🍺 warp was successfully installed!
==> brew install --cask applite
🍺 applite was successfully installed!
All requested casks processed.
What the generated installer does
- Installs all selected casks (greens + chosen alternatives)
- Always includes
applitefor GUI management of Homebrew apps - For each cask, if Homebrew reports “already an App at '…'”, the script asks to replace the existing app and retries install
Replace-existing-app flow
- Prompts: “Replace existing app at /Applications/Foo.app with Homebrew cask 'foo'? [Y/n]:” (Enter defaults to Yes)
- Attempts Finder delete (moves to Trash); falls back to moving to
~/.Trashor removing the bundle - Retries
brew install --cask foo
How to run only the installer later
./brew_app_installer.sh
🧰 Script structure (checker.sh)
- Colors and icons: visual indicators for results
- Prerequisite check: ensures brew is installed
- Installed casks cache:
brew list --caskonce for speed - App discovery: uses
mdfindto enumerate .app bundles in system and user Applications folders - Name normalization (caskify): lowercases, replaces spaces with dashes, strips special chars
- Checks per app:
- Already managed by Homebrew (exact token match)
- Exact cask available (
brew info --cask <name>) -> ✅ - Broad local search (
brew search --casks <App Name>) -> 🤔 with candidates - Online exact lookup (Homebrew API:
/api/cask/<name>.json) -> ✅ - Online search alternatives (
/api/search.json?q=<App Name>) -> 🤔 with candidates - Otherwise -> ❌ (with filtering of macOS core apps)
- Post-scan interactive builder:
- Prompts to create an installer
- Iterates each amber app’s candidate list, asking per-candidate:
- Shows progress as
[x/y] App -> candidate - Default Yes on Enter
- Shows progress as
- Produces
./brew_app_installer.shand offers to run it immediately
- Installer helpers (embedded in the generated script):
prompt_yes_default: default-Yes prompt reader using/dev/ttyinstall_cask_with_replace: wrapsbrew install --cask, detects “already an App at …”, prompts, removes old app, and retries
- Cleanup: temporary files removed via
trap
🧪 brewmelater.sh
brewmelater.sh scans all installed Homebrew items and helps you rebuild your environment via Ansible.
- ✅ Marks up‑to‑date items
- ⚠️ Highlights items needing updates (including greedy casks)
- ❌ Flags deprecated/disabled items via brew info metadata
- ✍️ Optionally generates brew_reinstall.yml that:
- Installs Homebrew (if missing)
- Reinstalls all detected formulae and casks using community.general.homebrew and homebrew_cask
Run:
./brewmelater.sh
# Answer Y to generate brew_reinstall.yml
Example run of the generated playbook (brew_reinstall.yml):
PLAY [Reinstall Homebrew apps] *************************************************
TASK [Ensure Homebrew is installed] ********************************************
ok: [localhost]
TASK [Install Homebrew formulae] ***********************************************
changed: [localhost]
TASK [Install Homebrew casks] **************************************************
changed: [localhost]
PLAY RECAP *********************************************************************
localhost : ok=3 changed=2 unreachable=0 failed=0
Generated playbook (snippet):
---
- name: Reinstall Homebrew apps
hosts: localhost
connection: local
gather_facts: false
vars:
formulae:
- git
- wget
casks:
- iterm2
- visual-studio-code
tasks:
- name: Ensure Homebrew is installed
shell: |
if ! command -v brew >/dev/null; then
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
args:
executable: /bin/bash
environment:
NONINTERACTIVE: "1"
- name: Install Homebrew formulae
community.general.homebrew:
name: "{{ formulae }}"
state: present
update_homebrew: true
- name: Install Homebrew casks
community.general.homebrew_cask:
name: "{{ casks }}"
state: present
Troubleshooting
- brew not found: install Homebrew from https://brew.sh and re-run
- No prompts for alternatives: ensure you answered
ywhen asked to create the installer; the script reads prompts from/dev/tty - Network issues: online lookups require
curland internet access
Notes
- The script uses
mdfindfor speed; Spotlight indexing should be enabled - Online API used: https://formulae.brew.sh/api
Keeping track of Brew Updates
This is a simple script for SwiftBar that adds a Homebrew update notifier to your macOS menu bar.
It silently checks for outdated Homebrew packages in the background and displays a small icon with the number of available updates. It provides a simple, clickable menu to update individual packages, dismiss updates, or upgrade all packages at once.
Instead of manually running brew outdated every day, this gives you a passive, at-a-glance reminder and brings a convenient GUI-like experience to your command-line package manager.
Features
-
✅ Auto-detects Homebrew: Works out-of-the-box on both Apple Silicon (e.g., M1/M2/M3) and Intel-based Macs.
-
🖥️ Native Look & Feel: Sits in your menu bar and uses Apple's SF Symbols for a clean, system-integrated icon (
:arrow.down.circle:or:checkmark.circle:). -
🔔 Update Counter: Displays a badge with the number of available updates (e.g.,
(3)). -
📋 Detailed List: Clicking the icon shows a dropdown list of all packages needing an update, complete with their
from -> toversion numbers. -
🖱️ One-Click Actions:
-
Update: Update a single package by clicking "Update". A Terminal window will pop up to show the process.
-
Dismiss: Ignore a specific update (e.g., a buggy version) until the next version is released.
-
Upgrade All: A convenient button to run
brew upgradefor all packages.
-
-
⚙️ Configurable Schedule: Runs every hour by default. You can change this by renaming the file (e.g.,
brew_updates.30m.shfor 30 minutes). -
🧹 Utility Functions: Includes "Refresh Menu" and "Clear Dismissed List" for easy management.
Installation
This script requires SwiftBar and jq (a command-line JSON processor).
Step 1: Install Tools
Open your Terminal and use Homebrew to install swiftbar and jq:
Bash
brew install swiftbar jq
Step 2: Set Up SwiftBar Plugin Folder
- Launch **Swif
