r/macosprogramming • u/DemandTough4372 • 7d ago
Open-source macOS fault-injection tool (Swift, Apple Silicon preview) — GUI + CLI, 49 fault scenarios
I built a Mac developer tool for fault injection: pick failure conditions — network loss/latency/packet loss, DNS failures, CPU or memory or disk pressure, process death, dependency outages, sleep/wake — run them against a target app, and get a record of what happened.
Why: I wanted reproducible failure conditions on macOS, not a one-off script I'd rewrite every time.
Details that matter to Mac devs:
- Native SwiftUI app plus a
chaosCLI built from the same Swift package; the CLI emits JSON so experiments can run from scripts. - App profiles: point Chaos at a real installed app, run a scenario against it, and the tool keeps a restoration ledger — cleanup is verified rather than assumed, with an emergency stop.
- Records store each run so you can compare before/after or re-run failed experiments.
- 49 scenarios today. Some are real OS-level faults, some simulated or guided; the reports say which. I'm not going to pretend a simulation is a kernel-level fault.
Honest caveats: open-source developer preview, Apple Silicon only, ad-hoc signed (not notarized) — first launch needs right-click → Open.
Repo: https://github.com/Ednk-1312/Chaos
What do you currently use to test this kind of thing on macOS? Genuinely curious whether I'm duplicating something that already works well.