AI git Commit Writer — VS Code Extension
Marketplace extension ID: hi-mamba.hi-mamba-ai-commit-writer. Version 0.0.4 uses the display name AI git Commit Writer. The extension ID, commands and settings remain unchanged from 0.0.2.
Generate Conventional Commits from staged changes using an OpenAI-compatible AI service. Review candidates, copy a message, or fill the Git commit input.
This VS Code release supports English, Simplified Chinese and following the language of recent commits. Its feature set is separate from the JetBrains release.
Install
In VS Code, choose Extensions → … → Install from VSIX, select the supplied .vsix, and reload the window. Run AI Commit: Set API Key, then configure your API base URL and model in Settings. Stage changes and run AI: Generate Commit Message.
API requests send your staged changes to the configured provider. The API key is stored in VS Code SecretStorage and is not included in the extension package. The extension fills the commit input; you review and create the Git commit yourself.
Follow hi-mamba on GitHub for more developer tools and updates.
Build & test:
npm install
npm run compile
npm test
Settings
| Setting |
Default |
Description |
| aiCommitMessage.apiBaseUrl |
https://api.openai.com/v1 |
OpenAI-compatible base URL |
| aiCommitMessage.model |
gpt-4o-mini |
Model name |
| aiCommitMessage.commitLanguage |
en |
en / zh / follow-history |
| aiCommitMessage.maxDiffChars |
12000 |
Max staged diff chars |
| aiCommitMessage.includeBody |
true |
Include commit body |
| aiCommitMessage.generateCandidates |
3 |
Number of candidates (1-5) |
API key is stored via SecretStorage (run AI Commit: Set API Key), never written to settings.json.
Manual test
- Open this folder in VS Code, press F5 to launch an Extension Development Host (add a
.vscode/launch.json with an extensionHost config if not present).
- Open a git workspace, stage a change.
- Run
AI Commit: Set API Key and enter a key for your OpenAI-compatible provider.
- Set
aiCommitMessage.apiBaseUrl / model if not using OpenAI.
- Click the AI button in the Source Control title bar, or run
AI: Generate Commit Message.
- Verify: candidates appear in a preview panel; "Use" fills the SCM commit input box; "Regenerate" re-runs; "Copy" copies.
- Negative paths: with no API key → prompts to set it; with no staged changes → friendly "Stage your changes first" message.
- Switch VS Code display language to zh-CN (Command Palette → "Configure Display Language") → command titles localize to Chinese.