AI Commit Message Generator for VS Code
One click in Source Control and your staged diff becomes a Conventional Commit, written by any model on OpenRouter: Gemini Flash, Claude Sonnet, GPT, DeepSeek, Llama and 350+ more.
Built by Ciro Cesar Maciel — because I got tired of typing "fix stuff" into the commit box.
I commit dozens of times a day. Every time, the same ten seconds: stare at the empty input box, try to remember what I just changed, write something worse than the change deserved. Ten seconds a commit adds up to hours, and the history still read like a diary.
The tools that fixed this locked me into one model, one provider or one monthly plan. So I built the one I wanted: it reads your diff, asks the model you picked, and puts the message in the commit box. You review it and commit. That's all it does.
Stage → click the comment icon in Source Control → commit. Paid per token at OpenRouter prices, with your own key.
See it in action
The hero above: one staged file, one click, a subject and a body that says why. This is the real output for that diff (retry with exponential backoff, jitter and an idempotency key on a payments client), from google/gemini-3.8-flash:
feat(payments): retry transient charge failures with exponential backoff
Transient upstream errors (429 and 5xx) can cause payment processing to
fail unnecessarily. Add automatic retries with exponential backoff and
pass an idempotency key to make charge requests resilient without risk
of duplicate charges.
Compare it with what usually lands in that box: update client.
Commit Generator: Select Model — the live OpenRouter list, with context window and price per million tokens in and out. Type to filter, pick one, done. New models show up the day OpenRouter lists them.
Why this one?
- Bring your own model. Any model on OpenRouter, one key: Gemini Flash, Claude Sonnet, GPT, DeepSeek, Qwen, Llama, Mistral. Switch whenever a new one drops.
- You see the price before you pick. The model picker shows each model's context window and its price per million tokens, in and out, straight from OpenRouter.
- Pay per token, no subscription. Your key, your account, your bill. The diff sent is capped at 12,000 characters by default, about 3,000 tokens: at the $0.25 per million input tokens of the default
google/gemini-3.1-flash-lite, that is under a tenth of a cent.
- Conventional Commits by default.
type(scope): subject, imperative, lowercase, 72 characters max, and a body that explains why when the change isn't trivial. Or switch to plain.
- Any language. English by default; set
portuguese, spanish, french or whatever you write in.
- Staged first. It uses your staged diff when there is one. Nothing staged? It falls back to the working tree, new untracked files included.
- It never commits for you. The message lands in the input box. You read it, edit it, and commit.
- Any editor. Published on Open VSX too: works in Cursor, VSCodium and Windsurf.
How it compares
|
AI Commit Message Generator |
GitHub Copilot |
AI Commit |
Commit Sage |
| Any of 350+ models, one key |
Yes: OpenRouter |
No: Copilot models |
Partial: OpenAI, Gemini, Claude, Azure keys |
Yes: many providers |
| Pay per token, no subscription |
Yes |
No: monthly plan |
Yes |
Yes |
| Conventional Commits |
Yes |
Partial |
Yes |
Yes |
| Live model list with prices |
Yes |
— |
— |
— |
| Works in Cursor, VSCodium (Open VSX) |
Yes |
No |
No |
Yes |
From each extension's public listing, September 2026; — means the listing doesn't say. Something changed? Tell me at ciromaciel.click.
Setup
- Get an API key at openrouter.ai/keys.
- Run
Commit Generator: Set OpenRouter API Key from the Command Palette and paste it (sk-or-...). Or just click generate: with no key set, it asks for one.
- Optional: run
Commit Generator: Select Model to browse the live list with prices, or pick a slug from the dropdown in Settings → Commit Generator → commitGenerator.model.
Use it
Two ways, pick your favorite:
- Comment icon in the Source Control title bar. It turns into a spinner while the model writes.
- Status bar:
Commit Msg in the bottom-left. It grays out when there is nothing to commit.
Want a keyboard shortcut? Open Keyboard Shortcuts, search for "Commit Generator: Generate" and bind any combo you like.
Configuration
| Setting |
Default |
What it does |
commitGenerator.openRouterApiKey |
"" |
Your OpenRouter key (sk-or-...). |
commitGenerator.model |
google/gemini-3.1-flash-lite |
Any model slug from OpenRouter. |
commitGenerator.style |
conventional |
conventional or plain. |
commitGenerator.language |
english |
The language the message is written in: english, portuguese, spanish… |
commitGenerator.maxDiffChars |
12000 |
Larger diffs are truncated before sending, to keep cost predictable. |
Updates
New versions install themselves: VS Code checks for updates and applies them on its own, unless Extensions: Auto Update is off. To update by hand, open the Extensions view (⌘⇧X / Ctrl+Shift+X), find this extension and click Update; the version you have is shown next to its name.
Cursor, VSCodium and Windsurf update from Open VSX, where every version is published the same day as on the VS Code Marketplace.
What changed in each version is in the changelog.
FAQ
What is sent to the model?
Your diff (staged first, truncated at maxDiffChars) and the instructions for the message. It goes to OpenRouter and then to the provider behind the model you picked. Nothing is sent until you click.
Where is my key stored?
In your VS Code user settings, as commitGenerator.openRouterApiKey. If OpenRouter rejects it, the extension asks for a new one.
How much does it cost?
Whatever the model charges per token on OpenRouter, and the picker shows it before you choose. There is no subscription.
Does it commit for me?
No. The message lands in the commit box; you review and commit.
About me
I'm a developer building tools I want to use. More of my stuff at ciromaciel.click.
If this saved you time, send it to a teammate whose history is a wall of wip.
Proprietary — see LICENSE.
Keywords: ai commit message, commit message generator, git commit ai, conventional commits, openrouter, chatgpt commit, claude commit, gemini commit, deepseek commit, copilot commit alternative, aicommits, git, source control, cursor, vscodium.