README (English) | README (한국어)
Generate concise, conventional commit messages using GPT, directly from your staged git diff
.
Powered by OpenAI API and built with Python 3.12. Supports any language supported by GPT (e.g., English, Korean, French, etc.)
- Auto-generate commit messages using LLM
- Supports Conventional Commit format
- Multilingual support (language is GPT-dependent, use --language )
- PyInstaller-compatible for single-file binary distribution
If using source code:
pip install -r requirements.txt
Developed in a Python 3.12 environment. Recommended to use Conda:
conda create -n commit-message python=3.12
# Generate and apply commit message
python main.py
# Specify language
python main.py --language english
OpenAI API key is required. Create the following file in your home directory:
~/.api_keys/openai.json
{
"api_key": "your-openai-api-key-here"
}
You can customize the commit format via:
prompt_template.yml
It defines the Conventional Commit format and supported types (e.g., feat
, fix
, docs
...).
PyInstaller is used to create a .exe
:
pyinstaller --onefile --add-data "prompt_template.yml;." main.py
- Executable is saved in
dist/main.exe
- Supports Windows (tested)
🤖 Generating commit message in english...
✅ Generated commit message:
feat: add CLI option to specify commit message language
Would you like to commit with this message? [Y/n]:
Gladly welcoming contributors!
Feel free to fork, improve, and send a pull request.