Skip to content

Commit beecc1b

Browse files
akhil-gautamclaude
andcommitted
feat: permission tiers + memory action layer (v0.2.0)
Adds a capability tier model (User / Full Disk Access / Admin / Accessibility / Automation) so cleanup rules and memory actions can declare what TCC surface they need. Probes run at startup without triggering prompts; the new Permissions tab (key 5) shows status and deep-links to System Settings. New memory actions on the System tab: P purge inactive memory (admin) F flush DNS cache (admin) S suspend selected process (SIGSTOP) R resume selected process (SIGCONT) Admin-tier deletions go through one batched osascript prompt per cleanup run instead of one per file. APFS local snapshots are listed via tmutil and removed by date. New cleanup rules: - Mail (envelope index / downloads / attachments) — FDA - Messages attachments — FDA - Photos derivative caches — FDA - iOS backups + Xcode iOS DeviceSupport — FDA - Simulator caches, Homebrew cache, QuickLook + font caches — User - /Library/Caches, /private/var/log, DiagnosticReports, APFS local snapshots — Admin Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 37ec6e5 commit beecc1b

25 files changed

Lines changed: 1822 additions & 7 deletions

Cargo.lock

Lines changed: 119 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "bloat"
3-
version = "0.1.0"
3+
version = "0.2.0"
44
edition = "2021"
55
description = "An htop-style disk storage analyzer and cleanup TUI for macOS"
66

@@ -21,6 +21,9 @@ sysinfo = "0.33"
2121
notify-rust = "4"
2222
toml = "0.8"
2323
mlua = { version = "0.10", features = ["lua54", "vendored"] }
24+
glob = "0.3"
25+
rusqlite = { version = "0.32", features = ["bundled"] }
26+
core-foundation = "0.10"
2427

2528
[dev-dependencies]
2629
tempfile = "3"
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# APFS local snapshots inventory — read-only, no admin needed.
2+
# Use the System Caches admin rule (in the Cleanup tab) to actually
3+
# delete snapshots; this panel only reports what's there.
4+
5+
[[panel]]
6+
name = "APFS Snapshots"
7+
command = "tmutil listlocalsnapshots / 2>/dev/null | wc -l | awk '{print $1\" snapshots\"}'"
8+
interval = 30
9+
position = "right"
10+
color = "magenta"
11+
12+
[[panel]]
13+
name = "Simulators (stale)"
14+
command = "xcrun simctl list devices 2>/dev/null | grep -c unavailable || echo 0"
15+
interval = 60
16+
position = "right"
17+
color = "blue"

examples/plugins/brew-cleanup.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Brew cleanup status panel — shows reclaimable Homebrew bytes.
2+
# Copy alongside your existing plugins.toml (`brew cleanup --dry-run`
3+
# does not modify state, so this is safe to poll).
4+
5+
[[panel]]
6+
name = "Brew Cleanup"
7+
command = "brew cleanup --dry-run 2>/dev/null | tail -3"
8+
interval = 60
9+
position = "left"
10+
color = "yellow"

0 commit comments

Comments
 (0)