Repository navigation
feat: Projects & Worktrees cleanup (CLI + app) - #202
Closed
HigorAlves wants to merge 2 commits into
Closed
HigorAlves wants to merge 2 commits into
HigorAlves wants to merge 2 commits into
Conversation
Adds a git worktree scanner and remover to puremac purge. Covers worktrees registered with repos under the scanned folders plus .claude/worktrees, .orc, .supacode and ~/.supacode, and orphaned worktree folders. Only clean worktrees whose commits all exist on a remote and are older than the threshold are preselected. Removal uses git worktree remove without --force, then prune. Adds ~/Developer and ~/Developers to the default purge roots. Size-budget-override: feature spans CLI and app; the CLI half is the core logic and tests
New tool that scans a chosen folder for build artifacts (node_modules, .turbo, .next, target, ...) and linked git worktrees, including .claude/worktrees, .orc and Supacode. Old artifacts and clean, pushed worktrees are preselected; everything else is listed with the reason it is left unchecked. Deletion is permanent after confirmation; worktrees are removed with git worktree remove (never forced). Adds localization keys to every language file and documents the feature in both READMEs. Size-budget-override: feature spans CLI and app; the app half is the service, view and wiring
Owner
|
Thanks. The CLI half landed as your commit 9fc197c in 9028c74 (#209), plus cad9be4, which skips orphaned worktree folders instead of deleting them, because moving a repository leaves its worktrees in that state. |
iramarfalcao
pushed a commit
to iramarfalcao/PureMac
that referenced
this pull request
Nov 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds a way to point PureMac at a projects folder (for example
~/Developer) and clean up developer clutter in one pass:node_modules,.turbo,.next,target,.venvand the rest of the existingpurgelist..claude/worktrees,.orc,.supacodeand~/.supacode, plus orphaned worktree folders whose repository is gone.Available in two places:
puremac purge ~/Developer --worktrees(opt-in, so--forcenever removes worktrees unattended).~/Developerand~/Developersare now default scan roots.Safety
git worktree remove(never--force) followed bygit worktree prune, so git refuses anything with uncommitted changes and repo metadata stays consistent. Branches are never deleted.--forcepath skips it, as it already does for artifacts).Type of change
Testing
swift testpasses (70 tests, 14 new, using real temporary git repos and worktrees).xcodebuild testpasses (190 tests, 13 new, including localization key parity).puremac purge ~/Developer --worktreesagainst a real folder found and classified existing.orcworktrees without deleting anything.New localization strings are English in every language file as a fallback; translations are welcome.
Size-budget-override: the feature spans the CLI and the app. The commits are split so each half can be reviewed separately.