AI-powered git commit messages, PR descriptions, and changelogs using free APIs
Project description
GitWit
Stop wasting time writing commit messages. GitWit generates meaningful, conventional commit messages using AI — completely free.
$ gitwit commit
Analyzing 3 file(s): +147 -12
Generating commit message using groq (llama-3.3-70b-versatile)...
Generated commit message:
feat(auth): add OAuth2 login with Google provider
Options: [y]es, [e]dit, [r]egenerate, [n]o/cancel
Accept this message? [y]: y
Committed successfully!
[main 8f3a2b1] feat(auth): add OAuth2 login with Google provider
Why GitWit?
| Feature | GitWit | aicommits | GitHub Copilot |
|---|---|---|---|
| Price | Free forever | Free (limited) | $10/month |
| API Key | Free (Groq/Gemini) | Requires OpenAI ($) | Subscription |
| Local Option | Yes (Ollama) | No | No |
| PR Descriptions | Yes | No | Yes |
| Conventional Commits | Yes | Yes | Sometimes |
| Edit/Regenerate | Yes | Limited | No |
Quick Start (3 commands)
# 1. Install
pip install gitwit
# 2. Configure (one-time, 30 seconds)
gitwit config init
# 3. Use it
git add .
gitwit commit
That's it. Your first AI-powered commit in under a minute.
Features
- Commit Messages — Generate conventional commits from staged changes
- PR Descriptions — Generate title + description from branch diffs
- Multiple Providers — Groq, Google Gemini, or local Ollama
- Interactive — Accept, edit, regenerate, or cancel
- Fast — Sub-second generation with Groq
Installation
pip install gitwit
Requires Python 3.10+
Configuration
Interactive Setup (Recommended)
gitwit config init
This walks you through choosing a provider and setting your API key.
Manual Setup
# Set provider (groq, gemini, or ollama)
gitwit config set provider groq
# Set API key (not needed for Ollama)
gitwit config set api-key YOUR_API_KEY
# View config
gitwit config show
Usage
Generate Commit Message
# From staged changes
git add src/
gitwit commit
# Stage all + commit
gitwit commit --all
# Auto-accept (no confirmation)
gitwit commit --yes
# Dry run (preview only)
gitwit commit --dry-run
Generate PR Description
# Compare current branch to main
gitwit pr
# Specify base branch
gitwit pr --base develop
# Dry run
gitwit pr --dry-run
Why Free?
GitWit uses AI providers with generous free tiers:
| Provider | Free Tier | Speed | Best For |
|---|---|---|---|
| Groq | 30 req/min | Fastest | Daily use |
| Gemini | 1,500 req/day | Fast | High volume |
| Ollama | Unlimited | Varies | Privacy, offline |
Groq is recommended — it's the fastest inference provider and the free tier is more than enough for individual developers.
Get Your Free API Key
- Groq: console.groq.com (instant, no credit card)
- Gemini: aistudio.google.com (instant, no credit card)
- Ollama: ollama.ai (runs locally, no API key needed)
How It Works
- GitWit reads your staged changes (
git diff --cached) - Sends the diff to your chosen AI provider
- AI generates a conventional commit message
- You review, edit, regenerate, or accept
- GitWit runs
git commitwith your approved message
Your code never leaves your machine when using Ollama.
Contributing
Contributions welcome! Please open an issue or PR.
# Development setup
git clone https://github.com/MazadiaS/gitwit.git
cd gitwit
pip install -e ".[dev]"
pytest
License
MIT — use it however you want.
Like GitWit? Give it a ⭐ on GitHub!
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 gitwit-0.1.0.tar.gz.
File metadata
- Download URL: gitwit-0.1.0.tar.gz
- Upload date:
- Size: 15.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3f7995b4a488f556b650191cff56a1e3c3030caa20dc8127c84e3db668a1e5df
|
|
| MD5 |
031d5735748cc5d5477eba38696cd7b5
|
|
| BLAKE2b-256 |
ed53f8229aac7c738213fe310844735260ed020896fdaf143545706cdf3ac436
|
File details
Details for the file gitwit-0.1.0-py3-none-any.whl.
File metadata
- Download URL: gitwit-0.1.0-py3-none-any.whl
- Upload date:
- Size: 17.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ed07c60a9e4939cab98a28871c9d2e77c7799e6fde835896b7e28c844071438
|
|
| MD5 |
f70e8631f59cc81e258d92b095197e23
|
|
| BLAKE2b-256 |
d0ebd50e09c056eaca8f4cd5800d832a011d36b4f29c50d308deed08c42c40e1
|