AI Git Helper generates Git commit messages from the current repository diff.
This VS Code version follows the same core design as the IntelliJ plugin in the parent project:
- collect Git changes;
- truncate the diff/content summary with a configurable limit;
- send the summary through the selected provider: OpenAI Official or OpenAI Compatible;
- write the generated message back to the Git commit input box when possible.
Usage
- Open a Git repository in VS Code.
- Configure
aiGitHelper.model, or runAI Git Helper: Select or Enter Model. - Run
AI Git Helper: Set API Key, or provideOPENAI_API_KEYin the VS Code process environment. - Stage files if you want the message based on staged changes.
- Run
AI Git Helper: Generate Commit Messagefrom the Command Palette or the Source Control title bar.
Settings
aiGitHelper.provider:OpenAI OfficialorOpenAI Compatible.aiGitHelper.baseUrl: provider base URL, defaulthttps://api.openai.com/v1.aiGitHelper.model: model name. You can type it manually, or runAI Git Helper: Select or Enter Modelto fetch models from the configured/modelsendpoint and choose one.aiGitHelper.commitLanguage: output language.aiGitHelper.maxDiffChars: maximum diff/content characters sent to the provider.aiGitHelper.includeUnversionedFiles: include untracked files that are not part of Git diff output.aiGitHelper.diffMode:stagedOrWorking,staged, orworkingfor tracked-file diffs.aiGitHelper.systemPrompt: reusable prompt instruction.
API keys are intentionally not stored in VS Code settings because settings can be synced or committed accidentally. Use AI Git Helper: Set API Key to store the key in VS Code SecretStorage, or provide OPENAI_API_KEY in the VS Code process environment.
Development
npm install
npm run compile
Press F5 in VS Code to launch an Extension Development Host.
To package:
npm run package
Privacy
When generating a commit message, selected Git diff content and optional unversioned file snippets are sent to the configured AI provider.