This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady
What I Built
Writing code is exhilarating. Writing Pull Request descriptions, technical changelogs, testing instructions, and release notes is⦠exhausting.
During Hacktoberfest, developers are eager to ship contributions, but writing thorough PR documentation often turns into an afterthoughtβor a rushed, one-line summary ("fixed stuff").
CommitSloth π¦₯ is an offline-first, privacy-guaranteed CLI assistant that automates developer paperwork using open-weight AI. It analyzes your local git repository (working directory, staged changes, branches, or specific commits), automatically strips noisy lockfiles and binary assets, and prompts a local Google Gemma model via Ollama to generate:
- π― Conventional Commits PR Title (e.g.,
feat(parser): add lockfile filtering and token guardrails) - π Bulleted Technical Changelog categorizing functional codebase modifications
- π§ͺ Step-by-Step Testing Instructions with actionable reproduction and verification commands
- π Release Notes Summary ready for changelog logs or version tag notes
Who Gets to Be Lazier?
Every developer who writes code! Instead of spending 15β20 minutes context-switching to write PR descriptions and markdown paperwork, you simply run commitsloth and get coffee. CommitSloth does the slow and steady documentation for you.
Demo
CommitSloth runs seamlessly in your terminal with live token streaming and formatted terminal tables:
# Analyze uncommitted changes and stream Gemma's output live
python commitsloth.py --stream
# Or export polished documentation straight to a Markdown file
python commitsloth.py -o PULL_REQUEST.md
Example Generated PR Output
# feat(git): implement offline git diff parsing and local gemma integration
## π Changelog & Key Changes
- **`commitsloth/git_parser.py`**: Added safe subprocess invocation with automatic lockfile and artifact filtering.
- **`commitsloth/agent_core.py`**: Implemented local Ollama loopback client with zero-cloud-leakage guardrails.
- **`commitsloth/cli.py`**: Created terminal interface with Rich styling and Markdown file export.
## π§ͺ Testing Instructions
1. Run automated test suite:
```bash
pytest tests/ -v
```
2. Verify diff extraction on local changes:
```bash
python commitsloth.py --diff-only
```
3. Test local Ollama endpoint connection:
```bash
python commitsloth.py --mock
```
## π Release Summary
CommitSloth provides a 100% offline developer productivity CLI that automates Pull Request and release notes generation using local Google Gemma models.
Code
CommitSloth π¦₯
"Slow and Steady" developer paperwork using local, open-weight AI.
Built for the Hacktoberfest 2026 Open-Source AI Challenge.
π Why CommitSloth?
Developers love writing code, but writing Pull Request descriptions, changelogs, and release paperwork is tedious and easy to rush. During Hacktoberfest's "Slow and Steady" week, CommitSloth encourages developers to take a breath, slow down, and let a thoughtful local AI assistant craft professional documentationβwithout sending proprietary code to the cloud.
CommitSloth runs entirely on your machine. It analyzes your local git repository, filters out irrelevant build noise and lockfiles, and prompts Google's open-weight Gemma model via Ollama (http://localhost:11434) to produce:
- π― Conventional Commits PR Title (e.g.
feat(auth): implement offline token verification) - π Bulleted Technical Changelog categorizing functional code changes
- π§ͺ Reviewer Testing Instructions with actionable verification steps
- π Release Notes Summary for version tags and changelog logs
π Architecture
flowchart TD
subgraph Local Repositoryβ¦- GitHub Repository: https://github.com/Babin123456/CommitSloth
- License: MIT License
How I Built It
CommitSloth is written in Python (3.10+) and architected into modular components:
CommitSloth Architecture:
[Git Working Tree] ββ> [Safe Subprocess] ββ> [GitParser & Noise Filter]
β
βΌ
[Rich Terminal / Output] <ββ [AgentCore] <ββ [Gemma Prompt Constructor]
β
(Local Loopback HTTP)
βΌ
[Ollama Daemon: localhost:11434]
β
[Google Gemma (2B / 7B)]
Key Technical Pillars
-
Local Open-Weight Model (Google Gemma): Powered by Google's open-weight
gemma:2b(ultra-fast for quick local loops) andgemma:7b(high-depth analysis) running locally via Ollama. -
Zero-Cloud-Leakage Guardrails: Enterprise teams frequently ban cloud AI tools because proprietary diffs cannot leave the machine.
AgentCorevalidates that every outbound request resolves strictly to a loopback interface (localhost,127.0.0.1,::1). If an external URL is passed, it halts execution immediately with aSecurityViolationError. -
Smart Noise & Lockfile Truncation: Large diffs from package managers (like a 3,000-line
package-lock.jsonorCargo.lock) choke local LLM context windows. CommitSloth'sGitParserautomatically strips lockfiles, minified assets (*.min.js), and binaries, compressing the git diff down to meaningful code logic within a 14,000-character budget. -
Rich Terminal Experience: Built with
richfor live progress spinners, diff statistics tables (+additions /-deletions), and real-time token streaming.
Why Does Open Innovation Matter?
Open innovation is what made CommitSloth possible.
With closed, proprietary APIs:
- Data Privacy & IP Exposure: Developers working on proprietary software, private client work, or air-gapped systems cannot send raw code diffs across the public internet.
- Cost & Rate Limits: Using cloud tokens for repetitive git diff analysis quickly accumulates subscription costs and rate limit bottlenecks.
- Portability & Longevity: With open-weight models like Google Gemma, developers have full ownership over their inference stack. Gemma runs entirely offline on consumer laptops without an active internet connection, API keys, or fear of deprecation.
Open-weight AI turns the developer workstation into an autonomous, private documentation engine.
My Agent Session
Developing CommitSloth involved iterative prompt engineering, subprocess security testing, test-driven validation with pytest, and lint formatting. You can review the development session transcript and workflow via the CommitSloth GitHub repository.
The Lazy Payoff
The Math of Slothful Productivity
- Average time to review diffs and write a structured PR description manually: ~10 to 15 minutes per PR.
-
Time spent with CommitSloth: ~4 seconds (
python commitsloth.py -o PULL_REQUEST.md). - Time saved across a typical 4-PR Hacktoberfest sprint: ~1 hour of pure developer paperwork eliminated.
Reviewers get clean, Conventional-Commits-compliant PRs with actionable reproduction steps, and authors never have to type "fixes and updates" as a PR title ever again.
Wrapping Up π¦₯
Developer documentation shouldn't be an afterthought or a rushed chore. The spirit of "Slow and Steady" isn't about sluggish progressβit's about taking pride in thoughtful engineering while letting local, privacy-first AI take care of the repetitive paperwork.
If you are participating in Hacktoberfest or simply want cleaner, more descriptive Pull Requests without sending proprietary diffs to third-party clouds, give CommitSloth a spin:
git clone https://github.com/Babin123456/CommitSloth.git
cd CommitSloth
pip install -r requirements.txt
python commitsloth.py
Slow down, write great code, and let the sloth handle the paperwork. π¦₯β¨
Feedback, ideas, and contributions are warmly welcome on GitHub. Happy Hacktoberfest!
Top comments (0)