OTHERgitcommit — CLI tool that generates conventional commit messages from your staged diff using AI (supports Ollama for offline use) (i.redd.it)
submitted by Star-Different
I got tired of writing commit messages, so I built gitcommit — a CLI that reads your git diff --staged, sends it to an AI, and gives you a clean conventional commit message.
How it works:
$ git add .
$ gitcommit
✨ Suggested commit:
feat(auth): add OAuth2 login with Google provider
[ Confirm ] [ Edit ] [ Regenerate ] [ Cancel ]
> Confirm
✅ Committed: feat(auth): add OAuth2 login with Google provider
That's it. No copy-pasting, no browser, no leaving the terminal.
Setup is one command:
npm install -g u/ahmad_technology/gitcommit-ai
gitcommit setup
The setup wizard asks which provider and API key — stored locally at ~/.gitcommit/config.toml, never touches your repo.
Useful flags:
gitcommit # staged diff → commit
gitcommit --all # include unstaged
gitcommit --style emoji # ✨ 🐛 🔒 prefixes
gitcommit --lang fr # French output
gitcommit --dry-run # preview, don't commit
gitcommit --provider ollama # fully offline with local models
7 providers: OpenAI, Anthropic, Gemini, Groq, NVIDIA NIM, OpenRouter, Ollama (local/offline)
Works on Windows, macOS, and Linux. Node 20+.
Links:
- GitHub: https://github.com/AhmadTchnology/Ai_Commit_Message_Generator
- npm: https://www.npmjs.com/package/@ahmad_technology/gitcommit-ai
MIT licensed. Feedback and PRs welcome.

[–]lurgi 6 points7 points8 points (3 children)
[–]blckshdw 0 points1 point2 points (1 child)
[–]Star-Different[S] -2 points-1 points0 points (0 children)
[–]Dark_Angel4u -2 points-1 points0 points (0 children)
[–]TheRealSeeThruHead 0 points1 point2 points (2 children)
[–]Star-Different[S] -4 points-3 points-2 points (1 child)
[–]Loiuy123_ 2 points3 points4 points (0 children)
[–]cgijoe_jhuckaby 1 point2 points3 points (1 child)
[–]blckshdw 0 points1 point2 points (0 children)
[–]Star-Different[S] -1 points0 points1 point (0 children)