Skip to content
jCyrus
jCyrusProduct Builder
  • Home
  • About
  • Work
  • Skills
  • Projects
  • Contact
  1. Projects
  2. /
  3. Firebreak
macOS Utility

Firebreak

In Review

About the Project

Firebreak is a native macOS utility that catches runaway process swarms before they cook the machine. Passive monitors show a temperature in the menu bar and leave the rest to you; Firebreak is process-tree aware. When an iOS Simulator spawns fifty poster extensions, a container runtime fans out workers, or an Electron app leaks helpers, no single process looks guilty, so Firebreak rolls every child PID up into the application that owns it, computes the cumulative load, and names the real culprit. From the menu bar you can freeze the whole tree with SIGSTOP, thaw it with SIGCONT, or kill it outright, and domain recipes handle common cases such as shutting down every simulator. The core is a Swift framework: a thermal monitor that combines ProcessInfo.thermalState with Mach load statistics, a process enumerator built on libproc (proc_listpids, proc_pidinfo, proc_pidpath), a swarm aggregator, an anomaly detector, and a signal controller. The same core drives a SwiftUI MenuBarExtra app and a firebreak command-line tool. The direct-download build also reads CPU die temperatures from the hardware sensors through IOKit.

Key Features

  • Menu bar extra with a live thermal badge and the culprit's CPU % when the breaker trips
  • Process-tree aware: collapses child PIDs, .appex extensions, and container runtimes into their root app
  • One-click freeze (SIGSTOP), thaw (SIGCONT), or kill (SIGKILL) across an entire process swarm
  • Anomaly detection on thermal velocity, core saturation, and multi-process runaway
  • Recovery recipes, such as shutting down every iOS Simulator at once
  • Actionable notifications with Shutdown, Freeze, and Kill buttons
  • Adaptive sampling: every 6 seconds when nominal, every 1.5 seconds on alert
  • firebreak CLI with status, scan, trip, and cool commands; trip exits 1 when the breaker trips, for cron and CI
  • Runs entirely on-device: no network access, no accounts, no analytics

Challenges & Solutions

Process inspection runs continuously, so it has to be close to free: Firebreak caches PID-to-path lookups and adapts its cadence, sampling every 6 seconds when the machine is nominal and every 1.5 seconds once an alert is live. CPU percentages came out wrong until the Mach absolute-time units were converted with the machine's timebase, which differs between Apple silicon and Intel. Reading die temperatures needs private IOKit HID APIs, which the Mac App Store does not allow, so the App Store build is sandboxed and compiled without them and falls back to the system thermal state, while the direct-download build keeps the sensor readout. On recent macOS versions, several registered copies of the app stopped the menu bar icon from appearing in System Settings, so the install script now removes stale copies.

Outcomes & Impact

Version 1.1.0 is submitted to the Mac App Store and in review. The direct-download build ships as a notarised DMG from GitHub Releases, and the source is open under the MIT license. The release pipeline builds both variants from one XcodeGen project: the Hardened Runtime DMG and the sandboxed App Store archive.

Actions

View Source

Project Details

Category
macOS Utility
Status
In Review
Developer
Cyrus Espiritu
Privacy Policy
View Policy

Tech Stack

SwiftSwiftUIlibprocIOKitPOSIX SignalsXcodeGen

Interested in Firebreak?

Let's collaborate or discuss how I can help bring your projects to life.

Get in touch

© 2026 Cyrus Espiritu. Privacy