Stay ahead of system slowdowns.
ResourceGuard is a small native macOS app that watches memory, disk, and CPU on your Mac and warns you before the machine becomes hard to use. v0.2.0 adds Storage Intelligence — bounded storage scans, developer cache discovery, and a copy-only command assistant — without accounts, network requests, or telemetry.
Screenshots use category labels and sizes only — no home directory paths or usernames. Free space will differ on your Mac.
- Memory use, macOS memory pressure, swap, free disk space, and CPU
- Top apps by estimated memory, with CPU since the last check
- Native notifications after sustained pressure, with cooldown and snooze
- Configurable thresholds and check interval
- Recovery advice: save work, quit unused apps, stop dev servers, review storage
- Confirmed Quit or Stop only — never force-quit, never close browser tabs
- Optional launch at login
- Send test notification in Settings (uses the packaged app icon when
Assets.caris present)
Open from the menu bar: Storage… (footer) or Storage Intelligence… (in advice when tips are shown). Low-disk notifications can include Open Storage Intelligence.
| Section | What it does |
|---|---|
| Overview | Last scan summary, monitored locations, custom roots |
| Storage Explorer | Pick any folder; largest children; breadcrumbs; partial measurements labeled |
| Developer Storage | Measured known developer tool locations |
| Recommendations | Inspection and vetted maintenance commands to copy — never auto-run |
| Command Assistant | Searchable command library by category |
| Storage History | Last 20 scan summaries; growth between comparable complete scans |
- Quick Scan — default, always partial (bounded visit budgets)
- Deep Scan — optional; marked partial if any path hits limits
- No scan on startup; monitoring loop stays separate from storage work
- Scanned categories are not a full-disk breakdown
- macOS 14 or later
- Xcode with Swift 6 (or matching toolchain) to build from source
git clone https://github.com/shekinahwebdev/resourceguard.git
cd resourceguard
swift test
./scripts/package-app.sh
open build/ResourceGuard.app./scripts/package-app.sh builds build/ResourceGuard.app, compiles Assets.car for Notification Center, and ad-hoc signs the bundle for local use. This is not Apple notarization; Gatekeeper may still prompt on first open depending on your Mac’s settings.
Use the .app for Finder, notifications, login items, and Storage Intelligence. swift run is for development only.
Move ResourceGuard.app to Applications for reliable Launch at login approval under System Settings → General → Login Items.
| Condition | Behavior |
|---|---|
| Less than 10 GB free | Disk warning on the next check |
| Less than 5 GB free | Critical disk warning |
| CPU above 80% | Warning after 3 sustained checks (~60 s at default interval) |
| Memory pressure Warning | Warning after sustained checks |
| Memory pressure Urgent / Critical | Warning on the next check |
| Swap above 2 GB | Icon and advice only (no separate notification) |
Default interval: 20 seconds. Cooldown: 30 minutes. All adjustable in Settings.
- Local only: monitoring settings (
local.resourceguard.settings), storage preferences (local.resourceguard.storage), and scan history (~/Library/Application Support/ResourceGuard/storage-history.json) stay on your Mac. - No automatic file deletion, no command execution, no admin privileges.
- No network APIs in the app target (repository links in About are not background traffic).
- Copied shell commands use POSIX single-quote escaping; paths with command substitution are rejected.
- MongoDB database directories are not recommended for cleanup; Cursor guidance targets logs/cache subfolders only.
See docs/permissions.md.
Measurements from ./scripts/measure-performance.sh on a developer Mac (your numbers will vary with disk and project size):
| Metric | Typical range |
|---|---|
| Release binary | ~1.5 MB (Mach-O in .app) |
| Idle RSS (short sample after launch) | Tens of MB — GUI + Swift runtime |
| Monitoring sample CPU | Low single-digit % during periodic checks |
| Quick Scan | Seconds to low tens of seconds (bounded visits) |
| Deep Scan | Longer; cancellable; partial if budgets exceeded |
ResourceGuard does not guarantee a fixed Quick Scan time on huge trees. Compare runs using the same scan mode and completeness in Storage History.
- Ad-hoc signed builds for local use from source (
./scripts/package-app.sh). This is not Apple notarization; Gatekeeper may prompt on first open. - Storage cleanup is manual. ResourceGuard does not delete files or run cleanup commands. Any disk space you free is from your own actions, not automatic recovery by the app.
- Storage sounds use system default notification sound when enabled (not custom sound files).
- Hard links are deduplicated within a single directory walk; cross-volume edge cases remain possible.
- Quick Scan is always partial by design.
- Growth notifications require two comparable complete deep scans and a large measured delta.
swift test # 28 automated tests
swift build -c release
./scripts/measure-performance.shArchitecture: docs/architecture.md · Roadmap: docs/roadmap.md · Contributing: CONTRIBUTING.md
Release audits: docs/v0.2-release-audit.md

