Generate git commit messages with the Claude CLI, straight from VS Code's Source Control panel.
A ✨ button appears in the Source Control toolbar. Click it: the extension reads your diff (staged, or the whole working tree if nothing is staged), asks Claude for a concise commit message, and fills the commit input box.
- The Claude CLI installed and authenticated (
claude --versionshould work in your terminal).
- Download the
.vsixfrom the Releases page. - In VS Code:
Ctrl+Shift+P→ Extensions: Install from VSIX… → pick the file. - Reload the window.
Open the Source Control panel and click the ✨ button next to CHANGES.
| Setting | Default | Values | Description |
|---|---|---|---|
claudeCommitButton.cliPath |
"" |
any path | Path to the Claude CLI. Empty = auto-detect from PATH. |
claudeCommitButton.model |
sonnet |
haiku, sonnet, opus, fable |
Model used to generate the message. |
claudeCommitButton.effort |
low |
low, medium, high, xhigh, max |
Effort level. |
The extension auto-detects Claude from your Windows PATH. If you installed the
Claude CLI with npm on Windows, it's found automatically (the extension resolves the
real claude.exe behind npm's shim scripts).
But if Claude is installed only inside WSL or Git Bash, it lives on that environment's PATH — not the Windows PATH that VS Code sees — so auto-detect can't find it. Point the extension at the executable directly:
"claudeCommitButton.cliPath": "C:\\Users\\<you>\\AppData\\Roaming\\npm\\node_modules\\@anthropic-ai\\claude-code\\bin\\claude.exe"Run where claude (CMD/PowerShell) or which claude (Git Bash) to locate yours.
On Windows, prefer the .exe over the .cmd/.ps1/extensionless shims — only the
native .exe can receive the diff over stdin reliably.
You can move the button inside the commit message box (Copilot-style) instead of the toolbar.
This needs VS Code's proposed scm/inputBox API, so it only works locally (it can't be shipped in the .vsix) and requires a one-time manual setup:
- In the installed extension's
package.json, add the proposed API:and a"enabledApiProposals": ["contribSourceControlInputBoxMenu"],
scm/inputBoxmenu entry mirroring thescm/titleone. - Add the extension id to
~/.vscode/argv.json:"enable-proposed-api": ["marciotoledo.claude-commit-button"]
- Fully restart VS Code (not just "Reload Window").
After this setup an extra setting becomes available:
| Setting | Default | Values | Description |
|---|---|---|---|
claudeCommitButton.buttonLocation |
input |
input, top |
Where the button appears: inside the message box, or in the toolbar. |
This setting does nothing in the default
.vsixbuild — it only takes effect once the proposed-API setup above is in place.
If this little ✨ button saved you some time and you'd like to give back, you can buy me a coffee ☕. Another way to help is to use one of the referral links on my site when signing up for services I recommend. It's totally optional and very appreciated — thanks! 😊
MIT © Marcio Toledo

