Skip to content

A Commitizen plugin that leverages OpenAI's GPT-4o to automatically generate clear, concise, and conventional commit messages based on your staged git changes.

License

Notifications You must be signed in to change notification settings

watadarkstar/cz_ai

Repository files navigation

🤖 AI Commitizen Plugin

A Commitizen plugin that leverages OpenAI's models
and local LLMs from Ollama to automatically generate clear, concise, and
conventional commit messages based on your staged git changes.

npm version

Need help building your AI tool? Connect with Adrian on X 🚀

Features

  • Analyzes your staged diffs using OpenAI GPT-4o or any LLM from Ollama
  • 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.) or locally installed Ollama model

Prerequisites

Install

pip install cz-ai

Usage

cz --name cz_ai commit

Terminal Alias

To 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'

Development

Install the plugin locally:

pip install -e .

Then check that cz recognizes the plugin:

cz ls

It should appear as cz_ai

Then run this command to test it:

cz commit

Build

rm -rf dist/
uv build

Upload to pypi.org

twine upload dist/*

Author

Adrian C (watadarkstar)

License

This project is licensed under the MIT License.
Feel free to use, modify, and distribute it as needed.

Credits

Generated using this template: https://github.com/commitizen-tools/commitizen_cz_template

Github Contributors

Thanks to these awesome contributors and many more! 🧘


Ready to build your AI tool?

Star this repo • 💬 Contact Adrian to Build It

Built with ❤️ by Adrian


Keywords: react-native, react, ai, tool, commits, aicommits, python, commitizen

About

A Commitizen plugin that leverages OpenAI's GPT-4o to automatically generate clear, concise, and conventional commit messages based on your staged git changes.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages