English | 简体中文
Links: GitHub | Open VSX | Website
WTF Commit is a minimalist VS Code extension that uses AI to generate concise and meaningful Git commit messages from your staged changes (or working tree changes).
- Leaner LLM context: Lower default diff budget (10k chars), compact multi-file diffs, metadata + 30-line preview for new files — faster and cheaper generation.
- Smarter filtering: Default
ignorePathsfor snapshots, minified assets, and generated files; lighter oversized-diff summaries.
See CHANGELOG for earlier releases.
- Multi-lingual Support: Preset support for English, Chinese, Japanese, Classical Chinese, and Custom strings.
- Conventional Commits: Automatically follows conventional commit standards (feat, fix, docs, etc.).
- Smart Diffing: Prioritizes staged changes, confirms mixed staged/unstaged states, falls back to working tree changes, and strips more low-value diff noise before generation.
- Intent-Aware Generation: Reuses any text already typed into the SCM input box as a zero-config generation hint.
- Auto Commit & Push: Full automation pipeline — generate, commit, and push in one keystroke.
- Interactive Tuning: Auto-commit flows support real-time message editing without blocking Git staging.
- Lightweight Recovery: Offers an inline
AI Repairaction when the generated title format needs a quick fix. - Reliable Request Flow: Built-in timeout + automatic retry with categorized API error handling, with extended reasoning for DeepSeek and other thinking models.
- Streaming Generation: Real-time streaming preview in the progress notification while the commit message is generated.
- Keyboard Shortcut: Default binding
Cmd+Alt+G(Mac) /Ctrl+Alt+G(Windows/Linux). - Customizable: Fully adjustable system prompt and Base URL for custom LLM endpoints.
Get started with AI commits in 3 simple steps:
- Install: Search for
WTF Commitin the Open VSX Extensions marketplace and install. - Set API Key: Press
Cmd+Shift+P(Mac) orCtrl+Shift+P(Windows), typeWTF Commit: Set API Key, select your provider, and paste your key. - Generate: Press
Cmd+Alt+G(Mac) orCtrl+Alt+G(Windows). The extension will automatically generate a message based on your code diff.
Open VS Code Settings (Cmd+,) and search for WTF Commit to customize the behavior:
| Setting | Description |
|---|---|
| UI Language | Language for the extension's own UI (en / zh), independent of the commit-message language. |
| Show Status Bar Item | Show the WTF Commit button in the status bar. |
| Changelog Popup | Show a notification after the extension is updated. |
| Auto Commit | Commit automatically after generating. Off = message goes to the Source Control box for manual review (recommended for most users). |
| Auto Push | Push automatically after the auto-commit. |
| Smart Stage | With Auto Commit, stage current changes before generation so later edits cannot sneak in. |
| Confirm Before Commit | Confirm before the auto-commit (only when Auto Commit is on). |
| Confirm Before Push | Extra confirmation before pushing (only when Auto Commit + Auto Push are on). |
| Warn On Truncated Diff | Warn when the diff is large and only a partial diff is sent to the AI. |
| Prompt | Customize the AI's persona and generation rules. |
You can use any OpenAI-compatible model (like local models via Ollama) by changing the Provider or Model/Base URL:
- In Settings, set Provider to
Custom. - Enter the Base URL (e.g.,
http://localhost:11434/v1). - Enter the Model name (e.g.,
llama3).
If you want the AI to use a specific language (e.g., French, Cantonese, or Emoji-only):
- Set Language to
Custom. - Enter your target language in Custom Language (e.g.,
Emoji only).
How defaults work (three separate concepts):
| Term | Meaning |
|---|---|
| Default Provider | OpenAI — used on first install until you change Provider in settings. |
| Provider default | Each built-in provider has its own default Model and Base URL (table below). Applies only when that provider is selected and Model / Base URL are left empty. |
| Our recommendation | Editorial picks for commit messages (see Choosing a model) — not the extension default provider. |
Provider defaults — when Base URL and Model are left empty:
| Provider | Default Model | Default Base URL |
|---|---|---|
| OpenAI | gpt-5-nano |
https://api.openai.com/v1 |
| DeepSeek | deepseek-v4-flash |
https://api.deepseek.com |
| MiMo | mimo-v2.5 |
https://api.xiaomimimo.com/v1 |
| GLM | glm-4.7-flashx |
https://open.bigmodel.cn/api/paas/v4 |
| Z.AI | glm-4.7-flashx |
https://api.z.ai/api/paas/v4 |
| Gemini | gemini-3.1-flash-lite |
https://generativelanguage.googleapis.com/v1beta |
| OpenRouter | openrouter/free |
https://openrouter.ai/api/v1 |
| Custom | - | - |
| Provider | Get API Key |
|---|---|
| OpenAI | platform.openai.com/api-keys |
| DeepSeek | platform.deepseek.com/api_keys |
| MiMo | platform.xiaomimimo.com/console/api-keys |
| GLM (China) | open.bigmodel.cn/apikey/platform |
| Z.AI (International) | z.ai/manage-apikey/apikey-list |
| Gemini | aistudio.google.com/api-keys |
| OpenRouter | openrouter.ai/keys |
GLM and Z.AI keys are not interchangeable — create a key on the platform that matches your provider.
Generating a commit message is a lightweight task — you don't need a frontier model. Pick based on cost, latency, and whether you already have an API key.
The list below is our recommendation — change Provider in settings to use a different service (e.g. set Provider to DeepSeek and leave Model empty for deepseek-v4-flash).
Pricing comparison (USD per 1M tokens, cache-miss input; sources linked below):
| Provider | Model | Input | Output | ~Cost / generation† | Notes |
|---|---|---|---|---|---|
| OpenRouter | openrouter/free |
$0 | $0 | ~$0 | Zero-cost trials; quality/latency vary |
| OpenAI | gpt-5-nano |
$0.05 | $0.40 | ~$0.0003 | Default Provider default model |
| Z.AI | glm-4.7-flashx |
$0.07 | $0.40 | ~$0.0004 | Z.AI provider default; often slower |
| GLM | glm-4.7-flashx |
¥0.5 (~$0.07) | ¥3 (~$0.42) | ~$0.0004 | GLM provider default; often slower |
| DeepSeek | deepseek-v4-flash |
$0.14 | $0.28 | ~$0.0007 | Recommended — fast, cheap, great quality |
| MiMo | mimo-v2.5 |
$0.14 | $0.28 | ~$0.0007 | Same price tier as DeepSeek; OpenAI-compatible |
| Gemini | gemini-3.1-flash-lite |
$0.25 | $1.50 | ~$0.0015 | Recommended — fast; generous free tier |
† Rough estimate for ~5K input + 150 output tokens (typical diff + commit message), no prompt cache. GLM CNY prices converted at ~¥7.2/$ for comparison. Actual cost depends on diff size and model verbosity.
GLM vs Z.AI: Same model family, different platforms — GLM uses the China endpoint (
open.bigmodel.cn); Z.AI uses the international endpoint (api.z.ai). API keys are not interchangeable. Each usesglm-4.7-flashxas its provider default (paid). The freeglm-4.7-flashtier is heavily rate-limited and not recommended.
Our recommendation (speed + value) — set Provider in settings to match your pick:
- DeepSeek V4 Flash — set Provider to DeepSeek; leave Model empty →
deepseek-v4-flash. Best overall: fast, cheap, high quality. Thinking mode is disabled automatically. - Gemini 3.1 Flash Lite — set Provider to Gemini; leave Model empty →
gemini-3.1-flash-lite. Also excellent: fast with a generous free tier; usesthinking_level: minimal. - MiMo V2.5 — set Provider to MiMo; leave Model empty →
mimo-v2.5. Same USD price band as DeepSeek. - GLM / Z.AI — set Provider to GLM (China) or Z.AI (international); leave Model empty →
glm-4.7-flashx. Works reliably but is often slower than DeepSeek or Gemini Flash Lite. Requires a paid balance. openrouter/free— set Provider to OpenRouter; fine for experimenting.
Official pricing pages: DeepSeek · MiMo · Gemini · OpenAI · Zhipu GLM · Z.AI · OpenRouter
OpenRouter provider default is
openrouter/free.
Gemini uses Google's native Interactions REST API (
/v1beta/interactions), authenticates with thex-goog-api-keyheader, and uses theminimalthinking level to reduce latency for commit-message generation.
Important
Claude Support: Native Claude format is not supported yet. Please use a proxy service that provides an OpenAI-compatible endpoint.
- Source Control Icon: Click the ✨ icon at the top of the Git panel.
- Command Palette: Run
WTF Commit: Generate. - Command Palette: Run
WTF Commit: Set API Keyto configure or rotate your API key. - Chorded Keybinding: You can bind a double-press like
Cmd+GCmd+G. See💡 Pro Tips.
How to set a chorded keybinding?
- Open Keyboard Shortcuts (
Cmd+K Cmd+S). - Search for
WTF Commit: Generate. - Double-click and press
Cmd+Gtwice.
MIT License.