Summary
Add a read-only menu option 99 that estimates how much disk space
each cleanup entry would free, then redraws the menu with
(Estimate: <size>) next to every option plus a total on Clear All.
Today the tool only shows total free disk space and a before/after figure;
there's no way to know which options are worth running, or how much each
would reclaim, before deleting anything.
Proposed behaviour
- New option
99 (non-contiguous on purpose, so it stays stable if the menu
is renumbered by future PRs). Existing options 0-N and the "Invalid
choice" message are unchanged.
- Strictly read-only: it only runs
du (bash) / Measure-Object
(PowerShell). It deletes nothing and behaves identically under --dry-run.
- Per-entry estimate mirrors exactly the paths the matching cleanup routine
would remove.
- Best-effort for tool-managed caches (npm/yarn/pnpm, Homebrew, etc.) using
their known cache dirs; approximate values are marked with a leading ~.
- Flutter and PlatformIO estimates cover the global cache only (fast and
deterministic, no recursive project scan); Time Machine reports the local
snapshot count rather than bytes.
- Sizes use the same binary units as
df -h on macOS (Gi/Mi/Ki) so the
estimate matches the existing "Free Space" figure.
- Implemented in both
dev-cleaner.sh and dev-cleaner.ps1 (parity).
Environment
- OS: macOS (bash 3.2-safe, validated with
shellcheck) and Windows
(PowerShell 5.1+) — feature added to both ports.
- Shell: bash / PowerShell.
I have an implementation ready and would like to submit it as a PR if the
maintainers are happy with the approach (especially: option number 99,
read-only guarantee, and the ~ = approximate convention).
Summary
Add a read-only menu option
99that estimates how much disk spaceeach cleanup entry would free, then redraws the menu with
(Estimate: <size>)next to every option plus a total on Clear All.Today the tool only shows total free disk space and a before/after figure;
there's no way to know which options are worth running, or how much each
would reclaim, before deleting anything.
Proposed behaviour
99(non-contiguous on purpose, so it stays stable if the menuis renumbered by future PRs). Existing options
0-Nand the "Invalidchoice" message are unchanged.
du(bash) /Measure-Object(PowerShell). It deletes nothing and behaves identically under
--dry-run.would remove.
their known cache dirs; approximate values are marked with a leading
~.deterministic, no recursive project scan); Time Machine reports the local
snapshot count rather than bytes.
df -hon macOS (Gi/Mi/Ki) so theestimate matches the existing "Free Space" figure.
dev-cleaner.shanddev-cleaner.ps1(parity).Environment
shellcheck) and Windows(PowerShell 5.1+) — feature added to both ports.
I have an implementation ready and would like to submit it as a PR if the
maintainers are happy with the approach (especially: option number
99,read-only guarantee, and the
~= approximate convention).