← all repositories
RomanHotsiy/commitgpt

Your commit messages are bad and ChatGPT can fix them

A CLI tool that reads your staged diff and asks OpenAI to write conventional commit messages, because "wip" is not a type.

1.6k stars TypeScript Coding Assistants
commitgpt
Velocity · 7d
+1.2
★ / day
Trend
steady
star history

What it does

commitgpt runs git diff --cached, ships the output to OpenAI’s API, and returns ten suggested commit messages in conventional commit format. You pick one, or don’t. It requires an API key and works via npx with zero installation.

The interesting bit

The prompt template is fully exposed and editable. The default asks for <type>[scope]: <description> format, but you can override the entire .commitgpt-template file — meaning you’re not locked into someone else’s idea of what a commit message should look like. The model, temperature, and token limit are also configurable via .commitgpt.json.

Key highlights

  • Ships as npx commitgpt — no global install needed
  • Uses text-davinci-003 by default (configurable)
  • Template-driven prompting: edit the raw prompt sent to the model
  • Suggests 10 messages at once, letting you pick or retry
  • Follows conventional commits out of the box

Caveats

  • Built on the older text-davinci-003 model; no mention of GPT-4 or newer chat models in the README
  • Requires an OpenAI API key and sends your diffs to their servers — privacy implications are yours to evaluate
  • The README doesn’t specify cost, rate limits, or how large diffs are handled

Verdict

Useful if you write commits in teams that enforce conventional commits and you hate typing feat(auth):. Skip it if you’re cost-sensitive, privacy-paranoid about diffs, or already fluent in writing commit messages that don’t make your teammates wince.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.