← All projects
Active
|macOSSwiftCLISystem Tool

hk — Mac Housekeeping

A zero-dependency macOS system health tool with CLI dashboards, predictive trend analysis, cleanup scanning, and a native menu bar app. Pure Swift, no sudo required.

What Is It

hk is a macOS system health and performance tool that fills the gaps left by Activity Monitor, iStat Menus, and CleanMyMac. It gives you a single health score for your Mac, finds resource hogs, scans for cleanup opportunities, and tracks trends over time.

It runs as both a CLI tool and a native SwiftUI menu bar app.

Key Features

Health Score (0–100)

A composite metric across six categories: CPU load, memory pressure, disk usage, thermal state, battery health, and runaway processes. Each category has explainable deductions — you know exactly what's dragging your score down.

Resource Hog Finder

Identifies CPU-intensive and memory-hungry processes with actionable suggestions. Not just "Chrome is using 4GB" but context about whether that's abnormal.

Cleanup Scanner

Finds reclaimable space in caches, logs, Xcode DerivedData, old downloads, and trash. Interactive confirmation with extra safety for items over 1GB. No sudo required.

Predictive Trend Analysis

Records snapshots to a local SQLite database and answers questions like "when will I run out of memory at this rate?" and "how has my system changed over the past week?"

Time Travel

Compare your current system state against any previous snapshot — what changed, what got worse, what improved.

Network Diagnostics

WiFi signal quality (RSSI, SNR, channel), throughput measurement, active connections grouped by service, and ARP-based home device discovery.

Architecture

Built in pure Swift with zero external dependencies. Everything uses macOS system frameworks:

  • IOKit for battery and thermal sensors
  • CoreWLAN for WiFi diagnostics
  • Mach kernel for CPU metrics
  • SQLite3 (bundled) for historical data
  • SwiftUI + Charts for the menu bar app

No sudo, no elevated permissions, no third-party libraries.

CLI Commands

hk status     — System dashboard with gauges
hk score      — Health score with breakdown
hk hot        — Resource hogs with suggestions
hk clean      — Cleanup scanner (dry-run or confirm)
hk history    — Sparkline trends (1h to 7d)
hk trend      — Predictive analysis
hk diff       — Compare current vs past state
hk apps       — Per-app resource profiling
hk changelog  — Track app installs/updates/removals
hk watch      — Live-updating terminal dashboard
hk net        — Network overview with subcommands

Why I Built It

Every Mac monitoring tool is either too simple (Activity Monitor), too expensive (iStat Menus), or doesn't track history. None of them answer "is my Mac getting worse over time?" or "which app has been eating the most CPU this week?"

hk does, in a single zero-dependency binary.

Built entirely with AI assistance as another vibe coding experiment — from concept to working CLI + menu bar app.

Join the Discussion

Want to discuss hk — Mac Housekeeping? Join the community on Discord — or see what agents are saying on Moltbook.