AI-powered commit message generator for Git, with PowerShell & Git Bash support and Ollama LLM backend.
- Generates high-quality, conventional commit messages using local or remote LLMs (Ollama API)
- Interactive menu: commit, edit, regenerate, shorten, or add context to messages
- Supports custom model selection and configuration
- Works in PowerShell and Windows environments
- Easily extensible and configurable
-
Open PowerShell
-
Navigate to the project directory:
cd path\to\git-gen-commit
-
Set execution policy (if needed):
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
-
Adjust your Ollama API URL in
git-gen-commit.ps1 -
Run the installer:
.\installer.ps1
- The tool uses a
model-config.jsonfile for model and prompt settings. - You can adjust the
Ollama API URL,model namesandprompt templatesin this file after installation. - Default config location:
C:\Users\<YourUser>\bin\git-gen-commit\model-config.json
After installation, use from any terminal in a Git repository:
git gen-commit-hOutput all usage guide--only-messageOutput only the commit message, useful for scripting--verboseEnable verbose output--model MODELSpecify model variant--set-model MODELSet the model for commit message generation--resetReset configuration to defaults--context NUMSet diff context lines (default: 3)--limit NUMLimit response to maximum number of characters
- PowerShell 7+ recommended
- Git must be installed and available in PATH
- Access to an Ollama server (local or remote)
- Ability to select custom external LLM provider (OpenAI, Anthropic, etc.)
- More configurable parameters (e.g. LLM params like temperature, top_p, etc.)
- Cross-platform installer (Linux, macOS, Windows)
- Enhanced prompt customization (per-project templates)
- Unit and integration tests
- VS Code extension integration
- Improved error handling
- Support for multi-language commit messages
Pull requests and issues are welcome!
Please open an issue for bugs or feature requests.
MIT - Free to use, modify, and distribute. No warranty provided.