brew-cask-audit is a conservative, audit-first shell tool for macOS GUI apps.
It reports:
- Which
.appbundles exist in/Applicationsand~/Applications - Which are managed by currently installed Homebrew casks
- Which are not managed by installed casks
- Which unmanaged apps plausibly map to available (but not installed) casks by name
It does not automatically migrate apps. It generates reports only. Manual follow-up is required.
Dependencies
Required:
- Homebrew
- GNU coreutils (for
gfind,gsort,gcomm,greadlink,gtr) - GNU awk (
gawk) - GNU sed (
gsed) - Python 3
Install GNU tools with:
brew install coreutils gawk gnu-sed gnu-tar
The script sets LC_ALL=C for deterministic bytewise sorting/collation.
Usage
Each run writes to a new timestamped directory:
brew-cask-audit-YYYYMMDD-HHMMSS
Example:
brew-cask-audit-20260226-110033
Key Output Files
apps_managed_by_installed_casks.names.txt: App bundle names declared in installed cask artifacts.apps_not_managed_by_installed_casks.txt: App bundle names found on disk that were not matched to installed cask artifacts.apps_not_managed_by_installed_casks.with_missing_cask_by_name.txt: Name-normalized unmanaged app names that intersect with available-not-installed cask tokens.installed_casks_missing.txt: Installed cask tokens that were not present in installed-cask JSON metadata (renamed/deprecated/broken metadata cases).REPORT.txt: Summary counts and file pointers for the run.
Recommended Workflow
- Inspect
apps_not_managed_by_installed_casks.with_missing_cask_by_name.txt. - For each candidate token, run
brew info --cask <token>. - Quit the corresponding app.
- Reinstall with
brew install --cask --force <token>when appropriate.
Limitations
- Name matching is heuristic.
- Some casks do not declare
.appartifacts cleanly. - Mac App Store apps may appear as unmanaged.
- Installer-package (
pkg) casks may not surface as.appartifacts. - Renamed/deprecated casks are reported separately via
installed_casks_missing.txt.
Inspired By
kethomassen/cask-migrator(conceptual prior art; this repo is standalone and audit-focused)- SuperUser discussion: Script for reinstalling apps on macOS with brew cask