Releases: seunggabi/mac-ops
Releases · seunggabi/mac-ops
v1.4.1 - README Readability and Consistency Improvements
What's Changed
Docs
- Fix source clone section: split commands into separate lines, add
PATHexport guidance - Move
> Available modulesnote from Miscellaneous to below Basic Commands - Consolidate monitor scheduling into Scheduled Execution section (Method 3)
- Rename
Danger Process→Destructive Commands - Remove stale
Replace /path/to/mac-opscrontab note - Remove relative
nowfrom Cache Protection Policy description
v1.4.0 - Monitor Launchd Setup & README Improvements
What's New
Features
- Add
mac-ops monitor setup/monitor unsetupto install a launchd agent that collects CPU/memory snapshots every 5 minutes - Add
launchd/com.mac-ops.monitor.plistplist template
Fixes
- Add
shellcheck disablecomments for zsh-specific syntax (glob qualifiers(N),${~pattern}) inignore.zsh,monitor.zsh,orphan-app-cleanup.zsh,docker-cleanup.zsh
Docs
- Replace
bin/mac-opswithmac-opsthroughout all README command examples - Add
monitor --hoursflag to help and README - Add monitor scheduling docs (cron + launchd) to README
v1.3.1 — Code review: safety, race conditions, consistency fixes
Bug Fixes & Safety Improvements
🔴 Critical
- trash.zsh: Add
_mac_ops_index_lock/unlockmutex (mkdir-based) aroundmac_ops_index_add— prevents index corruption when multiple cleanup modules run in parallel - trash.zsh: Strengthen
mac_ops_trash_expirepath guard —trash_pathmust be insideMAC_OPS_TRASH_DIRbefore permanent deletion - docker-cleanup.zsh: Replace
BASH_REMATCH[1/2]with zsh-nativematch[1/2]; fix decimal size parsing via awk (e.g.1.23GBwas previously miscomputed)
🟠 High
- notify.zsh: Escape
"and\in notification strings before embedding in AppleScript (prevents command injection via special filenames) - lock.zsh: Atomic lock file creation via
set -o noclobbersubshell (eliminates TOCTOU race window) - cache/tmp/log/browser/dev-cleanup: Apply user
[path]ignore rules (mac_ops_ignore_check_path) before eachmac_ops_trash_move— rules from~/.mac-ops/ignorewere silently ignored in these modules
🟡 Medium / Low
- disk.zsh: Fix
cmd; if [[ $? ]]separation anti-pattern →if ! cmd=$(...)incheck_disk_spaceandemergency_purge - bin/mac-ops: Add path pattern guard for
stats_dirbeforerm -rf - monitor.zsh: Add
speculativepages to memory formula, consistent withsnapshot.zsh - analyze.zsh: Replace all
echowithprint --for zsh consistency
Full Changelog
v1.3.0 — User ignore file, monitor module, orphan-app safety improvements
What's New
✨ User Ignore File
Create ~/.mac-ops/ignore to exclude specific bundle IDs, process names, or paths from all cleanup modules.
[bundle]
com.mycompany.*
[process]
my-custom-daemon
[path]
~/work/special-cache
See config/ignore.example for a full template.
📊 Monitor Module
New mac-ops monitor command for CPU/memory monitoring.
mac-ops monitor show # Full dashboard with 7-day history
mac-ops monitor top # Top processes by memory
mac-ops monitor collect # Collect a snapshot
mac-ops monitor kill --mb 500 # Kill processes over 500 MBSafety Improvements
orphan-app-cleanup
- Stage C: Homebrew Cask scanning — apps installed via
brew install --caskare not indexed by Spotlight and were previously missed - Stage D: LaunchDaemons/LaunchAgents scanning — protects Korean banking/security software (AhnLab V3, TouchEN nxKey, INISAFE CrossWeb EX)
- Added
systemgroup.*andgroup.*exclusions (macOS system group containers) - Added
jetbrains.bare prefix to safelist (JetBrains helper plists) - Extended safelist: Korean banking security (
com.ahnlab.,com.initech.,com.raon.,kr.co.*), Chromium browsers, Cursor, Zed, Charles Proxy (com.xk72.), Raycast - Consolidated duplicate safelist into
_MAC_OPS_BUNDLE_SAFELISTarray
dev-cleanup
- Added 30-day age filtering for npm/yarn/pnpm/pip/gradle caches
- Protected
modules-*gradle directories (downloaded dependency JARs)
Defaults
browser-cleanupis now disabled by default (opt-in via config)dev-cleanupis now disabled by default (opt-in via config)
Full Changelog
v1.2.2
What's Changed
- (#30) chore: increase cache retention to 30 days for safer cleanup by @seunggabi in #31
Full Changelog: v1.2.1...v1.2.2
v1.2.1
What's Changed
- (#28) fix: incorrect version display in Homebrew installation by @seunggabi in #29
Full Changelog: v1.2.0...v1.2.1
v1.2.0 - Smart Cache Protection
🎉 What's New
Smart Cache Protection
Implement intelligent cache protection to prevent accidental deletion of login sessions and active application data.
Key Features
- ✅ Installed App Protection: Automatically protects caches from all apps in
/Applications - ✅ Running App Protection: Detects and protects caches from currently running applications
- ✅ Recent Usage Protection: Protects caches accessed within the last 3 days (configurable)
- ✅ Orphan-Only Cleanup: Only removes caches from uninstalled/inactive apps older than 7 days
New Configuration
MAC_OPS_CACHE_RECENT_DAYS=3 # Protect caches used within N days (default: 3)Impact
- No more lost login sessions: Chrome, Slack, VS Code, and other active apps' sessions are fully protected
- Safe by default: Only truly orphaned caches are cleaned
- User control: Configurable protection period via environment variable
Technical Details
- Collects installed app bundle IDs via
findanddefaults - Detects running apps via
lsappinfo - Multi-layer protection: Apple system caches → installed apps → running apps → recent usage → age-based cleanup
Full Changelog: v1.1.8...v1.2.0
What's Changed
- (#26) feat: add smart cache protection for active apps by @seunggabi in #27
Full Changelog: v1.1.8...v1.2.0