Skip to content

About

WTF Commit is a minimalist VS Code extension that uses AI to generate concise and meaningful Git commit messages from your staged changes

Topics

Resources

Stars

5 stars

Watchers

0 watching

Forks

Repository files navigation

English | 简体中文

WTF Commit

Visual Studio Marketplace Version Visual Studio Marketplace Installs Open VSX Downloads License

GitHub · VS Marketplace · Open VSX · Website

One keystroke. Clean commits, straight to git.

WTF Commit reads your git diff, streams a conventional commit message into Source Control, and commits on the spot. Turn on Auto Push to ship upstream in the same stroke — no boilerplate, no context switching.

Pipeline: git diff → shortcut → stream message → auto commit → (optional) push

Aspect Detail
Fast setup Paste an API key once. DeepSeek by default — direct access, pay-as-you-go, no subscription
Full pipeline Auto Commit is on by default; turn on Auto Push to generate, commit, and push in one stroke
Bring your own key Works with DeepSeek, OpenCode Go, Gemini, OpenAI, OpenRouter, or local Ollama
Pay-as-you-go or quota Costs ~$0.0008 per commit, or draws from an existing OpenCode Go allowance
Cross-editor Runs on VS Code, Cursor, and VSCodium. MIT-licensed, settings roam with your profile

Already installed? Jump to ① Configure AI (~1 min) → ② Daily use.

Install

Editor How to install Updates
VS Code Extensions → search WTF Commit → Install (Marketplace) Auto-update via Visual Studio Marketplace
Cursor / VSCodium Extensions → search WTF Commit → Install (Open VSX) Auto-update via Open VSX

VSIX (offline / manual): Download from GitHub Releases or either marketplace above, then open Extensions → ⋯ → Install from VSIX… (or drag the .vsix onto the Installed list). Manual VSIX installs do not auto-update; use a marketplace install when possible.

① Configure AI (once)

Defaults work out of the box: Provider = DeepSeek. All you need is an API key.

  1. Install — Search WTF Commit in your editor's Extensions view.
  2. Set API Key — Open Command Palette → WTF Commit: Set API Key:
    • The first item shows your current provider and whether a key is stored; pick Choose another provider… to switch.
    • On first run, press Enter on Paste API Key now, or pick Open {provider} key page — the prompt stays open while your browser loads, so you can come back and paste directly.
    • Input is masked with live paste checks; once saved, the status bar echoes the masked key (e.g. sk-ab••••wxyz) for quick confirmation.
    • Saving a key for another provider prompts to Switch Provider.
  3. Get a key: DeepSeek API keys (also linked inside the setup flow).

Switch providers anytime via Set API Key → Choose another provider…, or change Provider in Settings. Leave Model empty to use provider defaults.

② Daily use (every commit)

How it runs: Prefers staged changes (staged). If the index is clean and Auto Commit is on, it stages modified files, generates a conventional commit, and commits locally (Auto Push stays off by default).

  1. Make your code changes (staging target files first is recommended).
  2. Press the shortcut — the message streams live into Source Control and commits.
  3. Push when ready — Auto Push is off by default.

Default shortcut: Cmd+Alt+G (Mac) / Ctrl+Alt+G (Windows/Linux).

Custom shortcut: Many Cursor users bind a double-tap on Cmd+G / Ctrl+G:

  1. Open Keyboard Shortcuts (Cmd+K Cmd+S / Ctrl+K Ctrl+S).
  2. Search for WTF Commit: Generate.
  3. Double-click the row → press Cmd+G twice (or Ctrl+G twice on Windows/Linux) → press Enter.

Hands-free push (optional): Enable Auto Push in Settings. Keep Confirm Before Push on at first; turn it off when you want generate → commit → push with no confirmation dialog.

Other triggers: the ✨ button in the Source Control title bar, or Command Palette → WTF Commit: Generate.

Prefer to review before committing? Turn off Auto Commit and the generated message stays in the input box for editing.

Latest (v1.20.3)

  • Docs accuracy: OpenCode Go now defaults to /inference/go/openai/v1, lists its $100/mo DeepSeek V4.1 Flash allowance on the $10 plan (4× promo retired), Gemini's free tier is noted as 15 RPM / 500 RPD, and Settings reflects OpenAI's gpt-6-luna default.
  • README refresh: Rewritten around the single-keystroke workflow, with a clear comparison table and scenario-based model guidance.

Full history in CHANGELOG.

Features

  • Conventional Commits — feat, fix, docs, and more, with local formatting cleanup and one-click AI repair.
  • Smart diffing — Reads staged changes first; with Auto Commit on, stages the working tree when the index is empty.
  • Intent-aware — Uses any text already typed in the SCM box as a hint, with no extra prompt UI.
  • Streaming preview — Watch the commit message appear token by token while the model runs.
  • Auto Commit & Push — Optional one-keystroke pipeline with a push confirmation gate.
  • Multi-language — English, 简体中文, 繁體中文, Japanese, Classical Chinese, or Custom.
  • Custom endpoints — Built-in providers plus Custom for Ollama, proxies, and self-hosted gateways.
  • Rebindable shortcut — Defaults to Cmd+Alt+G / Ctrl+Alt+G; supports chords like double Cmd+G.

Advanced

1. Settings

Open Settings (Cmd+,) and search for WTF Commit. Options are grouped into WTF Commit (basics) and WTF Commit › Advanced.

Basics:

Setting Description
Commit Message Language Language for generated commit messages.
Provider AI backend (defaults to DeepSeek).
Auto Commit On by default — commits after generation. Turn off to leave the message in Source Control.
Auto Push Off by default — pushes after auto-commit. Requires Auto Commit.
Confirm Before Push On by default — asks before pushing; turn off for a hands-off flow.

Advanced: Custom Base URL/Model, Provider Overrides, ignore paths, and status bar visibility.

Extension UI language follows VS Code (vscode.env.language): zh* → Chinese, otherwise English. Power-user keys live in settings.json only: wtfCommit.prompt and wtfCommit.customCommitMessageLanguage (when Commit Message Language is Custom).

2. Custom Models & Endpoints

Use any OpenAI-compatible model, such as local Ollama:

  1. Set Provider to Custom.
  2. Under WTF Commit › Advanced, set Base URL (e.g. http://localhost:11434/v1).
  3. Set Model (e.g. llama3).

To customize a built-in provider's endpoint or model, use Provider Overrides rather than the global Base URL / Model fields.

3. Custom Commit Language

To generate commits in another language or style (e.g. French, Cantonese, or Emoji-only):

  1. Set Commit Message Language to Custom.
  2. Add the target language to settings.json:
{
  "wtfCommit.commitMessageLanguage": "Custom",
  "wtfCommit.customCommitMessageLanguage": "Emoji only"
}

Providers & Models

How defaults work:

Term Meaning
Default Provider DeepSeek — active on first install until you change Provider. Pure pay-as-you-go with no subscription, reachable directly from mainland China (Alipay / WeChat Pay).
Provider default Each built-in provider's default Model and Base URL (table below). Applies when selected without Provider Overrides or Custom fields.
Our recommendation Picks tuned for commit generation (see Choosing a model) — both DeepSeek and OpenCode Go are recommended.

Provider defaults (when Base URL and Model are empty):

Provider Default Model Default Base URL
DeepSeek deepseek-flash https://api.deepseek.com
OpenCode Go deepseek-v4.1-flash https://opencode.ai/inference/go/openai/v1
Gemini gemini-3.5-flash-lite https://generativelanguage.googleapis.com/v1beta
OpenAI gpt-6-luna https://api.openai.com/v1
OpenRouter openrouter/free https://openrouter.ai/api/v1
Custom - -

Get API Keys

Provider Get API Key
DeepSeek platform.deepseek.com/api_keys
OpenCode Go Subscribe / get key · pricing docs
Gemini aistudio.google.com/api-keys
OpenAI platform.openai.com/api-keys
OpenRouter openrouter.ai/keys

Other OpenAI-compatible APIs (MiMo, GLM, Z.AI, NVIDIA NIM, proxies): set Provider to Custom and fill Base URL + Model under Advanced, or route through OpenRouter.

Choosing a model for commit messages

Commit generation rewards low latency and strict formatting — fast, lightweight models give the best experience:

  • Direct Access · Pay-as-you-go (Default) → DeepSeek (deepseek-flash)
    • No subscription required (~$0.0008 per commit).
    • Extended thinking is disabled out of the box for crisp, fast conventional commits.
  • Subscription Quota · Global Routing → OpenCode Go (deepseek-v4.1-flash)
    • Built for developers with an OpenCode Go subscription.
    • Low-latency global endpoints; commits draw from your Go monthly allowance ($10 plan includes $100/mo Flash allowance).
  • Free Quota · Official API → Gemini (gemini-3.5-flash-lite)
    • Google AI Studio offers 15 RPM / 500 requests per day free; native Interactions REST API keeps responses fast.
  • OpenAI Key · Minimal Latency → OpenAI (gpt-6-luna)
    • Official OpenAI endpoint with reasoning effort set to none for low token use and fast output.
  • Self-Hosted · Custom Gateway → Custom or OpenRouter
    • Point to local Ollama, a LAN endpoint, or test free of charge with openrouter/free.

DeepSeek vs. OpenCode Go (same underlying model): DeepSeek uses deepseek-flash; Go lists deepseek-v4.1-flash. Both route to V4.1 Flash at identical list rates (off-peak: $0.15 input / $0.60 output; peak: $0.30 input / $1.20 output per 1M tokens). Go costs $10/mo and includes a $100/mo DeepSeek V4.1 Flash allowance (Go Plus $40/mo → $200/mo), roughly 10× the subscription fee in list-rate usage (Go pricing). DeepSeek requires no subscription and connects directly from mainland China; Go is subscription-only for international users, drawing commits from your existing allowance.

Pricing comparison (USD per 1M tokens, cache-miss input):

Provider Model Input Output ~Cost / generation† Notes
OpenRouter openrouter/free $0 $0 ~$0 Free trials; speed and model vary
DeepSeek deepseek-flash $0.15 / $0.30* $0.60 / $1.20* ~$0.0008 / ~$0.0017* Default — V4.1 Flash pay-as-you-go; 50% off off-peak
OpenCode Go deepseek-v4.1-flash $0.15‡ / $0.30*‡ $0.60‡ / $1.20*‡ ~$0.0008‡ / ~$0 in quota Recommended with Go sub — $100/mo V4.1 Flash allowance on $10 plan
OpenAI gpt-6-luna $0.10 $0.50 ~$0.0006 OpenAI default; reasoning disabled
Gemini gemini-3.5-flash-lite $0.30 $2.50 ~$0.0019 Alternative; free tier available
  • DeepSeek & OpenCode Go peak rates apply 01:00–04:00 and 06:00–10:00 UTC (Mon–Fri, excluding Chinese public holidays); all other times are off-peak (50% discount).

† Estimated for ~5K input + 150 output tokens (typical diff + commit message) without prompt caching.

‡ OpenCode Go meters its monthly allowance at the same Flash list rates as DeepSeek (Go pricing). Within the $10 plan's $100/mo allowance (Go Plus: $200/mo), commits carry zero marginal cost until the allowance is exhausted.

Official pricing: DeepSeek · OpenCode Go · Gemini · OpenAI · OpenRouter

OpenRouter defaults to openrouter/free (rate-limited at ~20 RPM, ~50 requests/day, or ~1,000/day after a $10 credit top-up; underlying model rotates).

Gemini uses Google's native Interactions REST API (/v1beta/interactions) with x-goog-api-key and minimal thinking level to keep latency low.

Upgrading from an older build that used MiMo / GLM / Z.AI / NVIDIA NIM: your Provider setting migrates automatically to Custom with Base URL and Model preserved.

Note

Claude support: Native Claude format is not yet supported; connect via an OpenAI-compatible proxy.

Other Entry Points

  • Source Control title bar ✨ · Command Palette WTF Commit: Generate · rebindable shortcut (see Daily use).
  • Rotate keys anytime with WTF Commit: Set API Key.

Feedback

Find WTF Commit useful? A GitHub star, an Open VSX review, or an issue helps others discover it and guides what we build next.

License

MIT License.

About

WTF Commit is a minimalist VS Code extension that uses AI to generate concise and meaningful Git commit messages from your staged changes

Topics

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages