A single-command macOS disk and memory health analyzer that generates a beautiful interactive HTML report.
Built for Mac users who want to understand what's eating their storage and RAM — especially useful for Macs with limited disk space (128GB/256GB) or memory (8GB).
- Health Score — 0-100 score based on disk usage, memory pressure, and cache bloat
- Disk Usage Gauge — visual breakdown of storage with used/free/total
- RAM Monitor — active, wired, compressed, inactive, and free memory breakdown
- Memory Pressure — the real indicator of whether your Mac needs more RAM
- Cache Scanner — finds and sizes all
~/Library/Cachesdirectories - Downloads Analyzer — file type donut chart + subfolder sizes
- Large File Finder — spots files >5MB in Downloads
- App Data Viewer — Chrome, VS Code, Brave, Firefox, npm data sizes
- Directory Explorer — browse Desktop, Documents, Downloads, Movies, Music, Pictures by size
- node_modules Detector — finds bloated node_modules in project folders
- One-click Actions — copy
rmcommands andopenfolder commands to clipboard
curl -sL https://raw.githubusercontent.com/mayurchheta/mac-disk-health/main/install.sh | bashThis will:
- Clone the repo to
~/.mac-disk-health - Create a
disk-healthcommand - Run the first scan automatically
# Run a scan
disk-health
# Or run directly
python3 ~/.mac-disk-health/scanner.pyThe report opens automatically in your default browser.
Generates ~/Desktop/DiskReport.html — a fully self-contained HTML file with:
- Dark theme with smooth animations
- Tabbed interface (Overview, Memory, Explorer, Caches, Downloads, Large Files, App Data)
- Interactive sort buttons
- Copy-to-clipboard buttons for cleanup commands
- Works offline — no external dependencies after generation
- macOS (tested on macOS Ventura/Sonoma/Sequoia)
- Python 3.8+
- No pip packages needed — uses only standard library
The scanner collects data using native macOS commands:
dffor disk usagevm_statfor memory pagesmemory_pressurefor system memory pressuresysctlfor hardware infodufor directory sizes
All data stays local. Nothing is sent anywhere.
Report shows blank page?
- Hard refresh:
Cmd + Shift + R - Try opening in Safari (handles local
file://better than Chrome)
Permission errors?
- Some system directories may be restricted. The scanner skips them gracefully.
Slow scan?
- First scan may take 30-60 seconds if you have many files in Downloads.
MIT License — see LICENSE
Made by Mayur Chheta