A simple command-line tool that generates conventional commit messages using OpenAI's GPT model based on your staged git changes.
- Automatically generates commitizen style conventional commit messages
- Uses OpenAI's GPT-4o-mini model for intelligent message generation
- Option to push changes after commit
- Properly formatted commit messages with title under 50 characters and body wrapped at 72 characters
- Python 3.6+
- Git
- OpenAI API key
- Clone this repository
- Set your OpenAI API key as an environment variable:
export OPENAI_API_KEY="your-api-key-here"
- Run the script:
python main.py
Download the prebuilt executable from the releases section or build it yourself using PyInstaller (see below).
To create a standalone executable:
-
Install PyInstaller:
pip install pyinstaller
-
Build the executable:
pyinstaller --onefile main.py --name acm
-
Find the executable in the
dist
directory
- Stage your changes with
git add
- Run the script or executable
- Review the generated commit message
- Confirm to commit and optionally push changes