Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Claude loads one when your task matches it, or you run it by name.

Turn a messy working tree into clean, atomic commits. See the plan before anything moves.
git and nothing else. No model, no API key, no network.

You got in the zone and came out with forty changed files and no commits, or one
giant blob with a message like wip that you are not proud of. preen turns that
into a clean, ordered set of small, self-contained commits, grouped by what
changed rather than by what you meant to do.
Think git add -p and git rebase -i, done for you. preen reads everything you
changed, groups it by package and kind of change, writes a subject for each,
orders them so dependencies land first, and shows you the plan first. Nothing
moves until you approve.
Rewriting history is not a thing to take on faith, so preen does not ask you to.
Before a run it hashes your HEAD plus every staged, unstaged, and untracked
change, and after the run it hashes the same thing again. The two must match
exactly. A single differing byte rolls the run back to the recovery branch it
made before it started. Every run leaves a preen-backup/<timestamp> branch and
preen restore puts you back. How that works.
The built-in subjects say what changed, not why: Add cmd/parser.go and its test, Update dependencies. Every one of them is built from the file list and
nothing else, so a subject is a claim the commit can be checked against. For
commits that follow intent rather than structure, hand grouping to any program
you like with --grouper, a model included. A model reads the diff for
meaning, which the built-in rules never attempt, and can write subjects that
say why. Reword anything at the approval prompt either way.
Clean history is worth having on its own. It makes review readable, git bisect
useful, and git blame honest. preen gets you there without the tedious
hand-staging.
preen only reshapes history, never content, and it enforces that rather than promising it. The check is a content hash of everything you have, not a diff of what preen thinks it touched, so it holds whether or not preen understood your tree correctly.
The tree it hashes covers HEAD plus every staged, unstaged, and untracked
change. If the before and after hashes differ by a byte, the run rolls back and
names the paths that diverged rather than leaving you to find them.
Every run leaves a preen-backup/<timestamp> branch whether or not anything
went wrong. preen restore puts you back where you were, with your work
returned to the working tree in the same state it was in, staged files staged
and untracked files untracked.
brew install --cask dcadolph/tap/preen
Or with Go:
go install github.com/dcadolph/preen/v2@latest
Prebuilt archives for macOS, Linux, and Windows are on the releases page.
preen is a single binary. It needs git on your PATH and nothing else: no
model, no API key, no network.
checksums.txt carries a keyless Sigstore signature made by this repository's release
workflow, and every archive carries SLSA build provenance. Check a download before you run it:
cosign verify-blob checksums.txt \
--signature checksums.txt.sig \
--certificate checksums.txt.pem \
--certificate-identity-regexp '^https://github.com/dcadolph/preen/\.github/workflows/release\.yml@refs/tags/v' \
--certificate-oidc-issuer https://token.actions.githubusercontent.com
sha256sum -c checksums.txt --ignore-missing
gh attestation verify preen_<version>_linux_amd64.tar.gz --repo dcadolph/preen
Run it against a dirty working tree:
preen
You get a plan like this:
Planned commits (4):
1. Update dependencies
go.mod
2. Add api/server.go and its test
api/server.go
api/server_test.go
3. Add store/db.go
store/db.go
4. Update docs/guide.md
docs/guide.md
Held back as generated output (1), left uncommitted:
api/__pycache__/server.cpython-313.pyc [__pycache__/: Python bytecode cache]
Add them to .gitignore, or rerun with --allow-generated to commit them.
Apply this plan? 4 commits [y/n, or ? for edits]:
Approve and it stages each group precisely, commits, verifies your content is unchanged, and tells you how to undo it. Or edit the plan first, one move at a time, with the full plan reshown after each:
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
Plugins from other owners that cover similar ground