A SwiftUI macOS app that monitors system health, finds reclaimable storage, and removes developer cruft with guardrails for safety.
- Native SwiftUI experience with a design system theme and
NavigationSplitViewsidebar. - Features: dashboard metrics, system cleanup, large/old file finder, app uninstaller, and developer tooling hygiene.
- Safety first: all deletions are filtered through
DeletionGuard, prompt for elevated privileges when needed, and show recovery notes.
- Dashboard: CPU, memory, disk, battery, and uptime snapshot with live metrics streaming via
SystemMonitorService. - System Cleanup: Scans caches, logs, temp folders, app support leftovers, and simulator caches; review by category, select/deselect, then delete with progress tracking.
- Large & Old Files: Maps home/Downloads/Desktop/Movies for oversized or stale files, supports exclusions, and handles Full Disk Access gracefully.
- Uninstaller: Groups installed apps by location (system/user), shows bundle IDs and paths, and uninstalls with admin prompts when required.
- Developer Tools: One-click actions for DerivedData, Xcode/VS Code caches, simulator caches/devices, toolchain logs, and custom toolchains.
- Diagnostics: Toolbar "ladybug" button opens a diagnostics panel;
UITEST_SEED_DIAGNOSTICS=1seeds data for UI tests.
- DeletionGuard prevents risky paths; privileged deletion paths are routed through
PrivilegedDeletionHelper/PrivilegedDeletionService. - Full Disk Access: Some scans (large files, caches, uninstall) need it. Go to System Settings → Privacy & Security → Full Disk Access and add TidyMac.
- Dry-run style UX: You review categories and selections before deleting; overlays keep destructive actions obvious.
- macOS Sonoma or later (tested on Apple Silicon).
- Xcode 15+ (Swift 5.10+). Uses the Xcode project
TidyMac.xcodeprojwith the TidyMac scheme. - Optional:
xcbeautifyfor prettier build output when using the helper script.
-
Open
TidyMac.xcodeprojin Xcode and select the TidyMac scheme. -
Run the app (⌘R) or use the helper script:
./scripts/build_and_run.sh
-
Grant Full Disk Access if prompted so scans can traverse user and system locations.
-
Unit/UI tests are under
TidyMacTests/andTidyMacUITests/. -
From the command line:
xcodebuild \ -scheme TidyMac \ -project TidyMac.xcodeproj \ -destination 'platform=macOS' \ test
TidyMac/Views/– SwiftUI screens (Dashboard,SystemCleanup,LargeFilesFinder,Uninstaller,DeveloperTools,ContentView).TidyMac/ViewModels/– State holders for each feature area.TidyMac/Services/– Domain services (cleanup orchestration, inventory, large file scanning, developer ops).TidyMac/Model/– Core data models (apps, cleanup categories, storage info, deletion helpers).TidyMac/Utilities/– Shared helpers (diagnostics, design system palette, deletion guards).scripts/– Automation likebuild_and_run.sh.
SystemCacheCleanupService– Comprehensive cache/log/temp discovery with inventory of orphaned support files and browser caches.FileSystemLargeFileScanningService– Async scanner with progress callbacks, permission-aware messaging, and guarded deletions.CleanupInventoryService– Finds orphaned preferences/app support/installers to surface in cleanup categories.DeveloperOperationsService– Implements DerivedData/Xcode/VS Code/simulator/toolchain maintenance tasks with privileged fallbacks.
- Scan shows few results: Confirm Full Disk Access is granted; some system paths are hidden without it.
- Uninstall fails: App may be in a protected location (e.g.,
/Applications); rerun with admin approval when prompted. - Build noise: Install
xcbeautify(brew install xcbeautify) to clean Xcode build logs when using the script.
- Keep destructive changes behind user confirmation and progress overlays.
- Prefer async work off the main actor for scans; surface progress via view models.
- Add tests in
TidyMacTestsfor new services andTidyMacUITestsfor UI flows.