Git Auto Commit Message
AI-powered VS Code extension that generates Conventional Commit messages using Groq (free), Google Gemini (free), or Anthropic Claude (paid).
Features
- One-Click Generation — Click the sparkle icon in Source Control or use the Command Palette
- No Staging Required — Works with staged, unstaged, and untracked file changes
- 3 AI Providers — Groq/Llama (free, fast), Google Gemini (free), Anthropic Claude (paid, best quality)
- Auto Model Switching — Changing the provider automatically selects the best model
- Conventional Commits — Generates messages in
type(scope): description format
- Secure API Key Storage — Stored in VS Code's encrypted SecretStorage per provider
- Auto Setup Prompt — Prompts for API key on first activation
- Multi-Root Workspace Support — Prompts to select a workspace when multiple folders are open
- Cancellable Operations — Cancel anytime via the progress notification
- Smart Retry — Automatically retries on transient API failures with exponential backoff
- Output Logging — View detailed logs in the "Git Auto Commit Message" output channel
- Works Globally — Install once and use in any git repository
Installation
Quick Install (Recommended)
cd vscode-auto-commit
./install.sh
Manual Install
cd vscode-auto-commit
npm install
npm run build
npx @vscode/vsce package --allow-missing-repository
code --install-extension git-auto-commit-message-*.vsix
After installing, reload VS Code:
Cmd+Shift+P (Mac) / Ctrl+Shift+P (Windows/Linux) → Developer: Restart Extension Host
Usage
- Make changes to your code in any git repository
- Open the Source Control panel (
Ctrl+Shift+G / Cmd+Shift+G)
- Click the sparkle icon in the Source Control title bar
- Or open Command Palette (
Ctrl+Shift+P / Cmd+Shift+P) and run "Auto Generate Commit Message"
- On first use, enter your API key when prompted
- The generated commit message appears in the SCM input box — ready to commit!
AI Providers
Commands
| Command |
Description |
Auto Commit: Auto Generate Commit Message |
Generate a commit message from current changes |
Auto Commit: Setup API Key |
Set or update your API key for the current provider |
Auto Commit: Reset API Key |
Clear the stored API key (re-prompts on next use) |
Settings
| Setting |
Default |
Description |
autoCommit.provider |
groq |
AI provider — groq, gemini, or claude |
autoCommit.model |
meta-llama/llama-4-scout-17b-16e-instruct |
Model (auto-switches when provider changes) |
autoCommit.maxDiffLength |
10000 |
Maximum diff characters sent to AI (1,000 - 50,000) |
Available Models
| Model |
Provider |
Free |
Notes |
meta-llama/llama-4-scout-17b-16e-instruct |
Groq |
Yes |
Latest Llama (default) |
llama-3.3-70b-versatile |
Groq |
Yes |
Stable, free |
gemini-2.0-flash |
Gemini |
Yes |
Fast and stable |
gemini-2.5-flash |
Gemini |
Yes |
May be overloaded |
gemini-3-flash-preview |
Gemini |
Yes |
Latest Gemini |
claude-haiku-4-5-20251001 |
Claude |
No |
Fast, best quality |
claude-sonnet-4-6-20260310 |
Claude |
No |
Balanced |
claude-opus-4-6-20260310 |
Claude |
No |
Highest quality |
Supported Commit Types
| Type |
Description |
feat |
A new feature |
fix |
A bug fix |
refactor |
Code refactoring (no feature/fix) |
docs |
Documentation changes |
style |
Formatting, whitespace, etc. |
test |
Adding or updating tests |
chore |
Maintenance tasks |
perf |
Performance improvements |
ci |
CI/CD changes |
build |
Build system or dependencies |
API Key Management
- On first activation, a notification prompts: "Enter API Key" or "Later"
- Keys are stored per provider — switching providers prompts for the new provider's key
- Stored in VS Code's encrypted SecretStorage — never in settings files or plaintext
- Use "Auto Commit: Setup API Key" to set or update your key
- Use "Auto Commit: Reset API Key" to clear the stored key
- Keys persist across VS Code restarts and work globally across all workspaces
Requirements
- VS Code 1.115.0 or later
- Node.js 18+ (for building from source)
- Git installed and available in PATH
- API key from one of the supported providers
Troubleshooting
| Problem |
Solution |
| "Invalid API key" |
Run Auto Commit: Setup API Key and re-enter your key |
| "Credit balance too low" (Claude) |
Add credits at console.anthropic.com or switch to Groq/Gemini (free) |
| "No changes detected" |
Ensure you have modified, staged, or untracked files in the repo |
| "Not inside a git repository" |
Open a folder that contains a .git directory |
| Wrong model for provider |
Change provider in settings — model auto-switches |
| Extension not loading |
Cmd+Shift+P → "Developer: Restart Extension Host" |
| View logs |
Output panel (Ctrl+Shift+U) → select "Git Auto Commit Message" |
Author
Mohit Jangir
| |