AI-powered commit messages, standups and PR descriptions from your git diff
Project description
commitgpt ⚡
AI-powered commit messages, standups, and PR descriptions — generated from your git diff in 2 seconds.
The problem
Every day as a developer you waste time writing:
git commit -m "fix"— lazy, meaningless commit messages- Standup updates — "what did I do yesterday??"
- PR descriptions — explaining your changes all over again
commitgpt fixes all 3 with one command.
Demo
$ git add .
$ cmt
✨ feat(auth): add Google OAuth2 login with session timeout
- Implemented OAuth2 flow using Google provider
- Sessions expire after 30 mins of inactivity
- Fixed bug where users stayed logged in after password change
- Added redirect to dashboard on successful login
Install
pip install commitgpt
Setup
You only need ONE of these. Pick whichever you prefer:
Option 1 — GitHub Token (FREE, recommended)
Best for beginners. No credit card. 150 requests/day free.
- Go to github.com → Settings
- Click Developer Settings → Personal Access Tokens → Tokens (classic)
- Click Generate new token (classic)
- Give it any name, no scopes needed
- Copy the token starting with
ghp_
Create a .env file in your project:
GITHUB_TOKEN=ghp_your_token_here
Option 2 — Gemini (FREE, best free option)
Best free option. 1,500 requests/day free. No credit card.
- Go to aistudio.google.com
- Click Get API Key → Create API key
- Copy the key starting with
AIza
Create a .env file in your project:
GEMINI_API_KEY=AIza_your_key_here
Option 3 — OpenAI (Paid)
Best quality. Costs roughly $0.001 per request.
- Go to platform.openai.com
- Click API Keys → Create new secret key
- Copy the key starting with
sk-proj-
Create a .env file in your project:
OPENAI_API_KEY=sk-proj-your_key_here
Option 4 — Anthropic Claude (Paid)
Great quality. Costs roughly $0.001 per request.
- Go to console.anthropic.com
- Click API Keys → Create Key
- Copy the key starting with
sk-ant-
Create a .env file in your project:
ANTHROPIC_API_KEY=sk-ant-your_key_here
Make your token permanent
So you never have to set it again every time you open terminal:
Mac/Linux:
echo 'export GITHUB_TOKEN=ghp_yourtoken' >> ~/.zshrc
source ~/.zshrc
Windows:
setx GITHUB_TOKEN "ghp_yourtoken"
Usage
Commit message
git add .
cmt
Daily standup
cmt standup
Output:
Yesterday: Implemented OAuth2 login flow, fixed session expiry bug
Today: Writing tests for auth middleware, reviewing PR #42
Blockers: None
PR description
cmt pr
Output:
## What changed
Added Google OAuth2 login with automatic session timeout after 30 minutes.
## Why
Users were being kept logged in indefinitely, creating a security risk.
## Testing
- Manual: tested login, logout, session expiry
- Unit: auth middleware coverage at 94%
- Edge: concurrent login sessions handled correctly
Extra flags
cmt --emoji # adds emoji to commit message
cmt --copy # copies output to clipboard automatically
How the tool picks your API
You don't need to configure anything. Just put your key in .env and the tool automatically detects it in this order:
GITHUB_TOKEN → GitHub Models (gpt-4o-mini)
GEMINI_API_KEY → Gemini 2.0 Flash
OPENAI_API_KEY → OpenAI gpt-4o-mini
ANTHROPIC_API_KEY → Claude Haiku
First key found = that provider gets used.
Requirements
- Python 3.8+
- Git installed
- Any one API key from the options above
Troubleshooting
cmt: command not found
pip install commitgpt
Error: No API key found
Make sure your .env file exists with one of these:
GITHUB_TOKEN=ghp_...
GEMINI_API_KEY=AIza...
OPENAI_API_KEY=sk-proj-...
ANTHROPIC_API_KEY=sk-ant-...
Not a git repository
You need to be inside a git project. Run git init first.
No staged changes found
Run git add . before running cmt
pip install fails
Make sure Python 3.8+ is installed:
python --version
Contributing
Pull requests are welcome! Here's how:
- Fork the repo
- Create a branch:
git checkout -b feat/your-feature - Make your changes
- Use commitgpt to write your own commit message 😄
- Push and open a PR
License
MIT — free to use, modify and distribute.
Made by a developer who was tired of writing "fix" as a commit message.
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 commitgpt_nikesh-1.0.0.tar.gz.
File metadata
- Download URL: commitgpt_nikesh-1.0.0.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83fc0ff9890483285dfa96bd603ceaa64b404a320805a803e4406bac32dcd730
|
|
| MD5 |
186cc83780f1d7814ae8a6dee987a932
|
|
| BLAKE2b-256 |
a4e381116882186a12d8d86258b64dbf5a039a528c5e8dd30bcd82249ff81f45
|
File details
Details for the file commitgpt_nikesh-1.0.0-py3-none-any.whl.
File metadata
- Download URL: commitgpt_nikesh-1.0.0-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d909711383cbcaa715fdcd472683036e60a74c4deefb6d50c5104983294f154e
|
|
| MD5 |
0b9db3d4986d15c8a33a828ceaa2ac4e
|
|
| BLAKE2b-256 |
b958357a47c1d2ee2d2417fc374c9aa613b0f9e9fbec88ab479adb7ef0071703
|