commit-rewriter v0.1
commit-rewriter v0.1 is a web app that helps open source maintainers clean up AI-generated Git commit messages. It lets you review and edit messages through a simple web interface, automatically rewrites the commit history chain, and creates a timestamped backup branch for safety. Launch it with uvx from the command line, making it ideal for removing AI tooling noise and private repository references before publishing security releases.
If you maintain open source projects and use AI coding assistants, you've probably run into this problem: the commit messages your tools generate are full of clutter that you don't want in a public repository. I built a small web app called commit-rewriter to solve exactly that, and the first version, 0.1, is now available.
Why I Built It
I recently needed to prepare the Datasette security releases for publication. The commits behind those fixes had been made with the help of a coding agent, and their messages were messy. They contained leftover noise from the AI tooling and, more problematically, references to issue numbers from our private repository. Publishing those messages as-is would have leaked internal details, so they needed a careful rewrite.
Editing commit messages by hand is tedious, especially when there are many commits in a row. Git does let you modify history with tools like interactive rebase, but the workflow is fiddly and easy to get wrong under time pressure. Since this is a task that comes up whenever I release security fixes, it felt worth automating.
How It Works
commit-rewriter is a web application that gives you a simple interface for reviewing and editing the commit messages in any repository. You launch it from the command line like this:
```
uvx commit-rewriter path/to/repo
```
If you're already sitting in the repository's directory, you can leave off the path and it will just use the current location.
Once it's running, you edit the messages through the web interface. When you submit your changes, the tool does two things:
- It creates a timestamped branch capturing the current state of your repository. This acts as a safety net — if anything about the rewrite goes wrong, you can easily revert back to that branch.
- It rewrites the entire history from the earliest commit you edited all the way through to the most recent one.
That rewriting step is the key part. Git commits are chained together by hashes, so changing the message on one commit changes every commit that comes after it. The tool handles that chain automatically, so you don't have to think about it.
Running It Yourself
The easiest way to try the tool is with uvx, which fetches and runs Python applications without requiring a manual install. Just make sure you have uv installed, point the command at your repository, and open the web interface it provides.
Because the tool rewrites history, it's best used on branches you haven't pushed yet, or where you're comfortable force-pushing afterward. The timestamped backup branch gives you a rollback option, but as with any history-rewriting tool, it's wise to double-check the result before sharing it publicly.
Tags
python, git, projects, ai-assisted-programming

Comments (0)