Skip to main content

🧠 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 .env storage
  • 🚫 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.

  1. 🌐 Gemini (Google) API Key 🔗 Generate at: https://makersuite.google.com/app/apikey

📌 After login, click on your profile icon > API Keys > Create API key

  1. ⚡ 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

diffscribe-0.1.2.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

diffscribe-0.1.2-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

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

Hashes for diffscribe-0.1.2.tar.gz
Algorithm Hash digest
SHA256 62f6330b5de2a1d0dede8651eb9e941b68daa6089e84bafda3fa871d86d4f3c7
MD5 f7b38e6206ea15111eda334b5a278f73
BLAKE2b-256 5843e45af8dafee97bb7fbf2ba436ea120d367ad154553fb262d421acab5933e

See more details on using hashes here.

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

Hashes for diffscribe-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 082dea8a55e5edab221b674535e32d1c7863b3239f1e5915ca3be30140cbe250
MD5 2e082473bb04c888965e4447401af92c
BLAKE2b-256 80c4062d7b079d40fe93b73faea74d9df320ca8ee7565fbdaffe90f544f5e849

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page