🧠 AI-powered Git commit message generator using Groq & Gemini
Project description
🧠 Diffscribe
Diffscribe is an intelligent CLI tool that automatically generates meaningful Git commit messages using your staged diffs. It leverages Gemini (by Google) and Groq APIs to analyze your code changes and produce clean, contextual commit messages — all from the terminal.
✨ Features
- 📜 AI-generated commit messages based on
git diff --cached - 🤖 Supports Gemini (Google) and Groq AI models
- 🔁 Auto fallback: If Gemini fails, Groq takes over
- 🔐 First-time setup with API key prompts and secure
.envstorage - 🚫 Your code is never stored — only diff sent securely to model
📦 Installation
Install directly from PyPI:
pip install diffscribe
Or install locally for development:
git clone https://github.com/yourusername/diffscribe.git
cd diffscribe
pip install -e .
🚀 Usage Stage your changes as usual:
git add .
Then run:
diffscribe
You’ll see an AI-generated commit message based on your staged diff.
✅ Commit directly
To auto-generate and commit in one step:
diffscribe --commit
Commits the previously generated message if available; otherwise, generates a new commit message and runs: git commit -m ""
🔑 First-Time Setup (API Keys) When you run diffscribe for the first time, you'll be prompted to enter free API keys for Gemini and Groq.
- 🌐 Gemini (Google) API Key 🔗 Generate at: https://makersuite.google.com/app/apikey
📌 After login, click on your profile icon > API Keys > Create API key
- ⚡ Groq API Key 🔗 Generate at: https://console.groq.com/keys
📌 Log in > Go to API Keys tab > Create new key
✅ Once entered, your keys will be saved automatically to a local .env file — no need to enter them again.
If your keys ever expire or are invalid, you'll be prompted to enter new ones on the next run.
🛡️ Security & Privacy Your .env file is local only and never uploaded.
Only the staged diff is sent securely to Gemini/Groq.
No code or messages are stored by diffscribe.
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 diffscribe-0.1.2.tar.gz.
File metadata
- Download URL: diffscribe-0.1.2.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62f6330b5de2a1d0dede8651eb9e941b68daa6089e84bafda3fa871d86d4f3c7
|
|
| MD5 |
f7b38e6206ea15111eda334b5a278f73
|
|
| BLAKE2b-256 |
5843e45af8dafee97bb7fbf2ba436ea120d367ad154553fb262d421acab5933e
|
File details
Details for the file diffscribe-0.1.2-py3-none-any.whl.
File metadata
- Download URL: diffscribe-0.1.2-py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
082dea8a55e5edab221b674535e32d1c7863b3239f1e5915ca3be30140cbe250
|
|
| MD5 |
2e082473bb04c888965e4447401af92c
|
|
| BLAKE2b-256 |
80c4062d7b079d40fe93b73faea74d9df320ca8ee7565fbdaffe90f544f5e849
|