keep yourrepositories light.

Lopper finds the branches, worktrees and generated folders you no longer need, shows the git evidence that each one is safe to remove, and lets you undo anything for 30 days.

Version 0.1.0, for macOS 14 or later. Open source, MIT licence.

Why Lopper exists

everyfeatureleavesabranch.

everyagentrunleavesaworktree.

everyworktreegrowsitsownnode_modules.

mostofitisfinished.noneofitsaysso.

loppercutsonlywhatgitcanvouchfor,

andleaveseverythingelsealone.

  • already in the default branch
  • merged through a pull request
  • remote branch deleted
  • nothing only on this branch

A tour of Lopper

everythingyoucanletgoof,ononepage.

Point Lopper at the folders that hold your projects. The overview adds up what is ready to reclaim across every repository and lists what is worth a second look.

Example data from a demo setup.

The Lopper overview: 453,7 MB ready to reclaim, 22 branches and 9 worktrees across 12 repositories, with counts of safe, need a look and protected items.

everyverdictshowsitsevidence.

Safe, needs a look, or protected. For every branch and worktree, Lopper lists what it checked, so you never have to take a verdict on trust.

  • already in the default branch
  • merged through a pull request
  • remote branch deleted
  • nothing only on this branch
A repository in Lopper: a table of branches with Safe, Review and Protected verdicts, and the inspector explaining why the selected branch is safe.

agentsleaveworktreesbehind.lopperfindsthem.

Each worktree shows its state, whether it holds unmerged or uncommitted work, and whether the run is finished or abandoned. Reclaim every finished one in one step.

  • claude code
  • cursor
  • codex
  • conductor
The Agents page: a table of agent worktrees with their state, unmerged work, activity, age and size, and a button to reclaim the finished ones.

seewherethegigabyteswent.

node_modules, build output and caches, by project, by kind, or as a treemap sized by bytes. Developer caches get their own row.

The Disk page as a treemap: node_modules, build output and caches sized by bytes, grouped by project, with developer caches below.

nothingmovesuntilyouconfirmthelist.

Lopper puts everything it will remove on one sheet. Read it, change it, then confirm. Removed items go to the Trash.

The Review and clean sheet: 31 items grouped by repository, each with the reason it is safe, and a button to remove them.

undoanythingfor30days.

Every removal is logged in History with the reason it was safe. Restore one item or a whole cleanup, and branches come back at their exact commit.

History: a chart of space given back per week and a table of removals with the reason each was safe and how many days are left to restore it.

it never removes work that exists nowhere else.

That is the whole job. Every rule below is covered by tests that run against real git repositories, because mocking git would hide exactly the cases that lose work. If Lopper cannot prove something is merged, it says so and leaves the decision to you.

Lopper will offer a branch as safe
only when git confirms its commits are already in the default branch, or a pull request merged them.
Lopper will offer a worktree as safe
only when it has no uncommitted changes and no commits that exist nowhere else.
Lopper will clear a generated folder
only when it is git-ignored, it is not a symlink, and it is checked again right before it moves to the Trash.
Lopper will remove anything at all
only when you reviewed the list and confirmed it.
Lopper will delete for good
only when it is something Lopper itself moved to the Trash, and you asked for it.

no account. no analytics. no network calls of its own. lopper runs git on your mac and reads only the folders you choose.

In the menu bar
A popover keeps Lopper one click away.
Command-K
Opens the command palette.
Rules that offer
Rules and a weekly digest suggest a cleanup. They never delete on their own.
Native
Written in SwiftUI for macOS 14 or later. Needs git, and the GitHub CLI if you want pull request checks.

get lopper.

One download, then drag it to Applications. Version 0.1.0 needs macOS 14 or later and git.

With Homebrew

brew install --cask zawalid/lopper/lopper

The first launch

Lopper is not notarized yet, so macOS asks you to confirm it once. Right-click Lopper in Applications, choose Open, then Open again. Or run this once:

xattr -dr com.apple.quarantine /Applications/Lopper.app

Build it yourself

The source is open. Install git with xcode-select --install if you do not have it. The GitHub CLI is optional and adds pull request based merge detection.

git clone https://github.com/Zawalid/Lopper.git
cd Lopper && scripts/build-app.sh

questions.

Can it delete my unmerged work?

No. A branch or worktree holding commits that exist nowhere else is never offered as safe. If Lopper cannot prove something is merged it shows "needs a look" and leaves the decision to you. Even then, removed branches come back from History at their exact commit.

Does it send anything anywhere?

No. There is no account, no analytics and no crash reporting, and this site has none either. Lopper runs git, and the GitHub CLI if you have it, on your Mac and reads only the folders you chose.

Which AI tools does it understand?

Worktrees from Claude Code, Cursor, Codex and Conductor are recognised by their layout and labelled with the tool. Worktrees from anything else are handled as ordinary git worktrees.

Will it ever clean up on its own?

No. Rules and the weekly digest only offer a cleanup. Nothing is removed until you have reviewed the list and confirmed it, and everything goes to the Trash first.

Why does macOS warn me the first time?

The app is not yet signed with an Apple Developer ID, so Gatekeeper asks you to confirm it once. The steps are in the install section above. The source is open, so you can read it or build it yourself.