Generate commit messages with AI (Google Gemini) automatically using `git diff`.
Project description
commitmessagegenerator
Generate objective and technical commit messages with AI (Google Gemini) automatically using your git diff.
📦 Install
pip install commitmessagegenerator
Or, if you're using a venv:
python -m venv venv
source venv/bin/activate # or .\venv\Scripts\activate in Windows
pip install commitmessagegenerator
⚙️ Configuring
IMPORTANT - BEFORE CREATING THIS FILE ADD '.venv' TO YOUR .gitignore SO YOUR API KEY ISN'T EXPOSED
Create a .env file in the directory where you will run commitgen (usually the root of your Git project):
GEMINI_API_KEY=your-gemini-api-key
🚀 Usage
With the terminal, inside any Git repository with pending changes, run:
commitgen (-c/-cg)
The command will:
- Read the git diff;
- Send it to the Google Gemini API;
- Return a commit message suggestion directly in your terminal.
🧩 Requisites
- Python 3.8 or higher
- Gemini API Key (Google Generative AI, free at: https://aistudio.google.com/app/apikey)
- Initialized Git repository
- Python dependencies (Automatically installed with the package):
GitPythongoogle-generativeaipython-dotenv
📄 License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file commitmessagegenerator-1.1.0.tar.gz.
File metadata
- Download URL: commitmessagegenerator-1.1.0.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5653bdb2fdd80ac452132bc3cd966a7fee5e1a3adcc16b92b9dd3d45dd17a16
|
|
| MD5 |
c2e27a2171df50d10eaa9d764900c5d5
|
|
| BLAKE2b-256 |
0952d3209e6467d469620d3d6236beea0580aa3db5237e572f2c90ac2a82249c
|
File details
Details for the file commitmessagegenerator-1.1.0-py3-none-any.whl.
File metadata
- Download URL: commitmessagegenerator-1.1.0-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb7274226848605882e8f998b1f9b96f28c1f3d515a9bb6358c7ba0d4fa51c34
|
|
| MD5 |
1a234f0b2baabbdb13992def68bca48d
|
|
| BLAKE2b-256 |
39f06cde0a1fdeb4fa50f5875d0932a5b529d75d1ef0800279a9e0562730b022
|