Sloth Commit: a local AI that writes your commit messages and splits the messy ones A developer built Sloth Commit, a zero-dependency Python CLI that uses a local open-weight model via Ollama to read staged git diffs and draft commit messages without code leaving the machine. The tool adds a Style Mimic feature that learns conventions from the last 30 commits, a regex-based Secret Guard that flags keys and .env files before the model sees them, and a Commit Splitter that separates unrelated changes into individual commits. In a test on a clinical NLP pipeline with qwen2.5-coder:3b on a 6 GB RTX 3050, the generated message matched the repo's plain style but described a README edit while ignoring added code comments, which the developer cites as the reason the tool asks for confirmation before committing. This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady https://dev.to/challenges/hacktoberfest-week3-2026-10-19 Writing a commit message is the smallest chore in programming and the one I put off the most. So I built Sloth Commit: a command-line tool where a local open-weight model reads your staged diff and writes the message for you. git add . git commit the editor opens with the message already written The model runs on my own laptop through Ollama https://ollama.com . The tool is plain Python with no dependencies beyond the standard library. A diff is just your unreleased source code, and it never leaves the machine. Writing a message from a diff is a one-line idea, so I spent the effort on the parts around it: .env files and huge binaries, then warns you. --slow , a bigger model polishes the draft. Speed is a dial you control. sloth-commit standup , which turns your week of commits into a few bullets. Anyone who has typed fix stuff at 1 a.m. gets to be a little lazier, and the history still comes out readable. I ran it on a real project of mine, a clinical NLP pipeline, on a laptop with 16 GB RAM and an RTX 3050 with 6 GB of VRAM, using qwen2.5-coder:3b : PS sloth-commit doctor ok inside a git repository ok Ollama is running at http://localhost:11434 1 models ok fast model qwen2.5-coder:3b PS sloth-commit style Learned from 7 recent commit s : format plain subject lines casing Capitalised first word period no emoji no length ~60 chars limit 91 PS sloth-commit msg Asking qwen2.5-coder:3b... Update README.md with detailed project information The reply took a second or two. Style Mimic worked: my repo uses plain, capitalised subjects with no period, and that is exactly what came back, not the Conventional Commits default. The message itself was only half right, and I'd rather show that than hide it. My test change was four comment lines added to frontend/app.py , plus a README edit that only removed a trailing newline. The model wrote about the README and ignored the code. My guess is it anchored on the first file in the diff, but I haven't tested that. This is the kind of mistake a 3B model makes on a tiny, odd diff, and it's why the tool shows the message and asks for confirmation instead of committing silently. A lazy git commit assistant. A local open-weight model via Ollama https://ollama.com reads your staged diff and writes the commit message, so you don't have to. Your code never leaves your machine, it works offline, and it costs nothing to run. Zero Python dependencies: standard library only. bash $ git add $ git commit editor opens with the message already written | Feature | What it does | |---|---| | Style Mimic | Reads your repo's last 30 commits and copies the conventions Conventional Commits or plain, casing, length, emoji . No config file. | | Secret Guard | Scans staged changes for API keys, tokens, private keys, .env files and huge binaries before the model or your history sees them. Local regexes, so nothing is uploaded to check. | | Commit Splitter | Spots unrelated changes in one staged diff a fix plus a README tweak and commits them separately, each with its own message. Splits | The open pieces are what make it work: qwen2.5-coder:3b , which fits comfortably in 6 GB of VRAM. The slow model defaults to qwen2.5-coder:7b . Both are config, not code, so any model Ollama can run works. /api/chat , with clear errors for the failures people actually hit: Ollama isn't running, or the model isn't pulled it tells you the exact ollama pull command . package-lock.json .