DEV Community

Cover image for ๐Ÿš€CommitBro โ€” an AI Git commit message generator that runs locally, speaks your language
Himanshu
Himanshu

Posted on

๐Ÿš€CommitBro โ€” an AI Git commit message generator that runs locally, speaks your language

๐Ÿง  Meet CommitBro โ€” Your AI Git Sidekick

As devs, we spend hours writing clean, scalable, beautiful code...

...and then we do this:

git commit -m "update stuff"
Enter fullscreen mode Exit fullscreen mode

๐Ÿ˜ฌ Same. So I built a tool that helps.

โšก What is CommitBro?

CommitBro is a CLI + FastAPI-based tool that uses local LLMs (like Starling, Mistral via Ollama) to generate helpful, meaningful commit messages based on your staged changes.

Think of it as ChatGPT, but:

  • ๐Ÿง  For Git commits
  • ๐Ÿ” 100% local
  • ๐ŸŒ Speaks your language (literally)

โœจ Features

  • โœ… Suggests commit messages based on git diff --cached
  • ๐Ÿ” Accept or regenerate suggestions
  • ๐ŸŒ Multilingual support โ€” Hindi, Spanish, German, English, etc.
  • โš™๏ธ Local or remote model support (Mistral, Starling, TinyLlama, etc.)
  • ๐Ÿ” Privacy-first (uses Ollama, so your code stays on your machine)
  • ๐Ÿณ Optional FastAPI backend for remote training or expansion
  • ๐Ÿ“ฆ Available on PyPI: pip install commitbro

๐Ÿงช How it works

You stage some code with

git add .
Enter fullscreen mode Exit fullscreen mode

Run:

commitbro
Enter fullscreen mode Exit fullscreen mode

CommitBro analyzes the diff and sends it to your selected LLM (via Ollama):

Suggested Commit Message:
> Fix login redirect for session timeout in /auth route
Accept this? [y/n/r]:
Enter fullscreen mode Exit fullscreen mode

๐ŸŒ Multi-language Support

During setup, choose your preferred language:

commitbro-setup
Enter fullscreen mode Exit fullscreen mode

Supports:

  • English
  • Hindi
  • Spanish
  • German ...or whatever your model can handle ๐Ÿ˜„

๐Ÿงฐ Tech Stack

  • Python ๐Ÿ
  • FastAPI โšก
  • Ollama + Starling/Mistral ๐Ÿง 
  • Docker (optional)
  • CLI with a little sprinkle of magic

๐Ÿš€ Try it out

pip install commitbro
Enter fullscreen mode Exit fullscreen mode

GitHub: github.com/aidataguy/commitbro
๐Ÿ’ฌ Why I built this

I got tired of writing vague commit messages while building my own projects. I wanted something that:

  • Saves time
  • Keeps commits clean
  • Doesnโ€™t require sending my code to OpenAI

So... I built CommitBro. One laptop, one weekend, a couple sleepless nights, and a love for dev tools โค๏ธ

๐Ÿ”ฅ What's next?

  • VS Code extension
  • Web UI to try it out
  • CI integration
  • Developer-facing training dashboards ๐Ÿ™ Feedback welcome

Iโ€™d love your thoughts, suggestions, or PRs.
If you try it, let me know what you think!

๐Ÿ‘‰ github.com/aidataguy/commitbro

๐Ÿง‘โ€๐Ÿ’ป Built by @aidataguy

buildinpublic #opensource #git #llm #python #devtools

Top comments (0)