I built a small Git plugin called git-ai-tools
that uses LLMs (OpenAI, DeepSeek, and Gemini) to generate commit message suggestions directly from my git diffs. It’s designed to integrate natively with Git and stay out of my way until I need it.
Many code editors offer AI-powered commit message suggestions, but I wanted something that:
- Works as a Git subcommand (e.g., git ai commit).
- Is completely optional - only runs when explicitly invoked, so it doesn’t interfere with my workflow.
- Can be configured easily via git config, no separate config files or external setup
Install
PIP
pip install git-ai-tools
or install from source:
git clone https://github.com/Mik1337/git-ai-tools.git
cd git-ai-tools
pip install -e .
Setup
git config --global git-ai.ai-model openai
git config --global git-ai.openai-key "your-openai-api-key"
(Supports OpenAI, DeepSeek, and Gemini.)
Usage
$ git ai commit
Opens your default Git commit message editor with a suggested message.
$ git ai suggest
Outputs a suggested message to the terminal for preview or further editing.
Options
git ai suggest # Suggestion based on staged changes
git ai suggest --unstaged # Suggestion based on unstaged changes
git ai suggest --last # Suggestion based on the last commit (useful for amending)
git ai suggest --shorter # Generate a shorter message
git ai suggest --longer # Generate a longer message
git ai suggest "context" # Provide custom context for the suggestion
I built this to scratch my own itch, but maybe you'll find it useful too.
Source Code available under the MIT License here
https://github.com/Mik1337/git-ai-tools
Would love to hear your feedback or suggestions!
Top comments (0)