This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady
What I Built
Every developer knows the moment. The code is done. The tests pass. And then you sit there, staring at an empty commit box, trying to summarize three hours of work in one line.
fix stuff you type. You delete it. update code. Delete. changes. Delete.
SlothCommit ๐ฆฅ removes that moment entirely. Paste your git diff, and it hands you a proper commit message โ Conventional Commits, a plain summary, or an emoji-flavored one โ plus an optional PR description with What changed / Why / Testing sections.
The laziest part of your workflow, automated. Who gets to be lazier? Anyone who has ever typed wip and pushed.
Demo
Live site: https://commit.tianx.tech โ the web UI is live on the .tech domain. Click Try sample diff to see the output format instantly. Full AI generation runs locally (see Run it yourself below) โ paste the output of git diff --staged, pick a style, hit Generate.
Video demo:
Code
joemh79
/
sloth-commit
๐ฆฅ Paste your git diff, get a clean commit message + PR description โ powered by open-weight AI
SlothCommit ๐ฆฅ
Never stare at a commit box again.
Paste your git diff, get a clean Conventional Commit message + PR description โ generated by open-weight AI.
Live Demo ยท DEV Post ยท Hacktoberfest Week 3: Slow and Steady
What it does
Writing commit messages is the most procrastinated 30 seconds in a developer's day. SlothCommit removes it:
- Run
git diff --stagedin your terminal - Paste the diff into SlothCommit
- Get back a proper commit message (Conventional Commits / Simple / Emoji style) + an optional PR description
- Copy, paste, done. Back to napping.
How it's built
-
Frontend: Single zero-build
index.htmlโ no framework, no bundler -
Backend: Cloudflare Pages Function (
functions/api/generate.js) - AI: Llama 3.1 8B Instruct (open weights) via Cloudflare Workers AI โ no API keys, no per-token billing
-
Domain: Deployed on
commit.tianx.tech(a.techdomain)
Why open weights?
Your diffs contain yourโฆ
Zero-build frontend (one index.html), one Cloudflare Pages Function for the API, and an open-weight model doing the thinking. The whole thing is small enough to read over coffee.
How I Built It
-
Frontend: a single zero-build HTML file โ no framework, no bundler, no
node_modulesfolder the size of a small moon. -
Backend (local): a tiny Python server (
local_server.py, ~100 lines) that forwards prompts to Ollama. No Cloudflare lock-in for the AI path. - AI: Gemma 3 (4B) โ open weights from Google โ running locally via Ollama. No API key to manage, no per-token bill to dread.
-
Domain: the web UI is deployed on
commit.tianx.tech(Cloudflare Pages, free tier), because a tool this lazy deserves a proper home.
The interesting engineering problem wasn't the generation โ it's the guardrails. Left alone, a small model will happily invent file names and add cheerful commentary. The prompt enforces: subject line only per the format, body bullets explain what and why (never how), and output nothing but the message itself.
A note on the architecture: the deployed site serves the UI and a one-click sample. Full AI generation runs against local open-weight models โ the same code path, zero data leaves your machine. The deployed Cloudflare Pages Function version is in the repo for anyone who wants to wire it to Workers AI on their own account.
Why Does Open Innovation Matter?
Your diff is your most honest code. It's the half-finished refactor, the internal API you haven't announced, the proprietary logic your company hasn't shipped yet.
Sending that to a closed, per-token API means trusting a third party with your unfinished work โ and paying them for the privilege, every single commit, forever.
Open weights change the math:
- Privacy by architecture: the model runs on infrastructure you control (or your own machine, if you self-host this). Your uncommitted code isn't training data.
- Set up once, pay never: no subscription, no token anxiety. A commit message costs fractions of a cent on Workers AI's free tier โ or nothing on a local Ollama install.
- It works offline: point the same frontend at a local open-weight model and SlothCommit works on a plane, in a tunnel, during an outage. A closed API can't say that.
The sloth doesn't pay rent on its tree. Your commit messages shouldn't require a subscription either.
The Lazy Payoff
Measured honestly, from my own week:
- Before: ~40 seconds of staring + typing + rewriting per commit message, ~15 commits a day.
- After: paste, glance, copy โ under 10 seconds.
- Saved: roughly 7 minutes a day, ~35 minutes a week. Small numbers โ which is exactly the point. Sloth-sized savings, every day, forever.
The PR description generator is the bigger win: a structured What/Why/Testing write-up used to take me 3โ5 minutes of grudging typing. Now it's one click and a quick review.
Prize Categories
-
Best Use of a .tech Domain โ SlothCommit lives at commit.tianx.tech, deployed on the
.techdomain I picked up during Hacktoberfest.
Top comments (0)