A Commitizen plugin that leverages OpenAI's GPT-4o to automatically generate clear, concise, and conventional commit messages based on your staged git changes.
- Analyzes your staged diffs using OpenAI GPT-4o
- Generates commit messages that follow the Conventional Commits specification
- Suggests high-quality messages instantly to save time
- Seamlessly integrates with existing Commitizen workflows
- Choose your preferred OpenAI model (gpt-4o-mini, gpt-4o, etc.)
- Python 3.x
- Install commitizen
pip install cz-aicz --name cz_ai commitTo make it persistent across sessions, add this line to your ~/.bashrc or
~/.bash_profile or /.config/fish/config.fish or ~/.zshrc (depending on your setup):
alias gai='cz --name cz_ai commit'Install the plugin locally:
pip install -e .Then check that cz recognizes the plugin:
cz lsIt should appear as cz_ai
Then run this command to test it:
cz commitpython3 -m buildtwine upload dist/*Adrian C (watadarkstar)
Generated using this template: https://github.com/commitizen-tools/commitizen_cz_template
This project is licensed under the MIT License.
Feel free to use, modify, and distribute it as needed.