GitWhisper VS Code Extension
🤖 AI-powered Git commit message generator for VS Code
Based on the original GitWhisper CLI tool by iamngoni
📖 Documentation | 🛠️ CLI Repository
GitWhisper is a VS Code extension that generates meaningful, conventional commit messages using AI. It supports multiple AI providers and languages, making your Git workflow more efficient and consistent.
✨ Features
🤖 AI-Powered Intelligence
- Multiple AI Models: Support for OpenAI, Claude, Gemini, Grok, Llama, DeepSeek, GitHub Models, and Ollama
- Smart Commit Messages: Generate conventional commit messages that follow best practices
- Change Analysis: AI-powered analysis of your code changes with detailed insights
⚡ Streamlined Workflow
- One-Click Actions: Generate, commit, and push to GitHub in seconds
- Smart Git Integration: Automatic staging, multi-repository support, and intelligent change detection
- Status Bar Integration: Quick access and real-time status updates
🌍 Flexible & Secure
- Multi-Language Support: Generate commit messages in 30+ languages
- Secure Storage: Uses VS Code's secure secrets storage for API keys and GitHub PATs
- Local AI Option: Use Ollama for completely offline, private AI processing
- Customizable Settings: Flexible configuration for models, languages, and workflow preferences
🔧 Developer-Friendly
- GitHub Integration: Seamless commit and push with Personal Access Token support
- File Filtering: Smart exclusion of lock files, logs, and temporary files
- Multi-Repository: Works across multiple Git repositories in your workspace
- Extension Integration: Works alongside your existing VS Code workflow
🚀 Quick Start
Install the Extension
- Search for "GitWhisper" in VS Code Extensions (
Ctrl+Shift+X
)
- Or install from the VS Code Marketplace (when published)
Set Up Your AI Provider
- Open Command Palette (
Ctrl+Shift+P
/ Cmd+Shift+P
)
- Run
GitWhisper: Set API Key
- Choose your preferred AI provider and enter your API key
- For Ollama (local AI), no API key needed - just install Ollama locally
Generate Your First Commit Message
- Stage your changes:
git add .
or use VS Code's Source Control panel
- Open Command Palette (
Ctrl+Shift+P
/ Cmd+Shift+P
) and run GitWhisper: Generate Commit Message
- Review and commit!
Optional: Configure for Your Workflow
- Run
GitWhisper: Configure
to set your preferred language, model, and workflow options
- For GitHub repos, optionally set up a Personal Access Token for one-click push
📱 Visual Guide
Extension Interface Overview

The image above shows key GitWhisper interface elements in VS Code: status bar integration, source control panel icons, and command access points.
Where to Find GitWhisper
- Status Bar: Look for the GitWhisper indicator in the bottom status bar
- Source Control Panel: Find GitWhisper icons in the SCM toolbar
- Command Palette: Search for "GitWhisper" commands (
Ctrl+Shift+P
/ Cmd+Shift+P
)
🎯 Commands
All commands are accessible through the Command Palette (Ctrl+Shift+P
/ Cmd+Shift+P
) - search for "GitWhisper":
Command |
Description |
GitWhisper: Generate Commit Message |
Generate AI-powered commit message |
GitWhisper: Analyze Changes |
Analyze staged changes with AI |
GitWhisper: Set API Key |
Configure API keys for AI providers |
GitWhisper: Set GitHub Personal Access Token |
Configure GitHub PAT for private repos |
GitWhisper: Select Model |
Choose default AI model and variant |
GitWhisper: Set Language |
Set commit message language |
GitWhisper: Set Custom Ollama Model |
Configure custom Ollama model variants |
GitWhisper: Configure |
Open configuration options |
GitWhisper: Open Settings |
Open extension settings panel |
⚙️ Configuration
AI Providers
GitWhisper supports multiple AI providers:
- OpenAI (GPT-4o, GPT-4o Mini, GPT-4 Turbo, GPT-4, GPT-3.5 Turbo)
- Anthropic Claude (Claude 3.5 Sonnet, Claude 3.5 Haiku, Claude 3 Opus, Claude 3 Sonnet, Claude 3 Haiku)
- Google Gemini (Gemini 1.5 Pro, Gemini 1.5 Flash, Gemini Pro, Gemini Pro Vision)
- xAI Grok (Grok Beta, Grok Vision Beta)
- Meta Llama (Llama 3.2 90B, Llama 3.2 11B, Llama 3.1 70B, Llama 3.1 8B)
- DeepSeek (DeepSeek Chat, DeepSeek Coder)
- GitHub Models (GPT-4o, GPT-4o Mini, o1 Preview, o1 Mini)
- Ollama (Llama 3.2, Llama 3.1, Code Llama, Mistral, Mixtral, Qwen 2.5, DeepSeek Coder, Phi-3, Gemma 2, and custom models)
Settings
Configure GitWhisper through VS Code settings (Ctrl+,
then search for "gitwhisper"):
Setting |
Default |
Description |
gitwhisper.defaultModel |
"openai" |
Default AI model to use |
gitwhisper.defaultVariant |
"gpt-4o" |
Default model variant |
gitwhisper.language |
"en;US" |
Language for commit messages |
gitwhisper.alwaysAdd |
false |
Auto-stage unstaged changes |
gitwhisper.autoPush |
false |
Auto-push commits after creation |
gitwhisper.ollamaBaseUrl |
"http://localhost:11434" |
Ollama server URL |
gitwhisper.customOllamaVariant |
"" |
Custom Ollama model name |
gitwhisper.ignoredFiles |
[...] |
File patterns to ignore |
Example configuration:
{
"gitwhisper.defaultModel": "openai",
"gitwhisper.defaultVariant": "gpt-4o",
"gitwhisper.language": "en;US",
"gitwhisper.alwaysAdd": false,
"gitwhisper.autoPush": false,
"gitwhisper.ollamaBaseUrl": "http://localhost:11434",
"gitwhisper.customOllamaVariant": ""
}
Language Support
Generate commit messages in multiple languages (30+ supported):
Format: Use language code format "code;countryCode"
(e.g., "en;US"
, "es;ES"
, "fr;FR"
)
- European: English, Spanish, French, German, Italian, Portuguese, Dutch, Swedish, Norwegian, Danish, Finnish, Polish, Czech, Hungarian, Romanian, Bulgarian, Greek, Turkish, Croatian, Serbian, Slovak, Slovenian, Lithuanian, Latvian, Estonian, Ukrainian, Russian
- Asian: Chinese (Simplified), Japanese, Korean, Thai, Vietnamese, Indonesian, Malay
- Middle Eastern: Arabic, Hebrew
- Indian Subcontinent: Hindi
🔧 API Key Setup
OpenAI
- Visit OpenAI API Keys
- Create a new API key
- Set it in GitWhisper:
GitWhisper: Set API Key
→ openai
Anthropic Claude
- Visit Anthropic Console
- Generate an API key
- Set it in GitWhisper:
GitWhisper: Set API Key
→ claude
Google Gemini
- Visit Google AI Studio
- Create an API key
- Set it in GitWhisper:
GitWhisper: Set API Key
→ gemini
xAI Grok
- Visit xAI Console
- Generate an API key
- Set it in GitWhisper:
GitWhisper: Set API Key
→ grok
- Visit Meta Llama
- Get API access through approved providers
- Set it in GitWhisper:
GitWhisper: Set API Key
→ llama
DeepSeek
- Visit DeepSeek Platform
- Create an API key
- Set it in GitWhisper:
GitWhisper: Set API Key
→ deepseek
GitHub Models
- Visit GitHub Models
- Generate a Personal Access Token with model access
- Set it in GitWhisper:
GitWhisper: Set API Key
→ github
Ollama (Local)
- Install Ollama
- Pull a model:
ollama pull llama3.2
- No API key needed - uses local endpoint
- Configure custom models in GitWhisper settings if needed
Troubleshooting Ollama
If Ollama commit generation is not working:
Check Ollama is running: Ensure Ollama is installed and running
ollama serve
Verify model is available: Make sure the model is pulled
ollama list
ollama pull llama3.2 # or your desired model
Test Ollama API: Verify the API is accessible
curl http://localhost:11434/api/generate -d '{
"model": "llama3.2",
"prompt": "Hello",
"stream": false
}'
Check VS Code Developer Console: Open Developer Tools (Help > Toggle Developer Tools) and check console for detailed error messages
Custom Base URL: If Ollama runs on different port/host, update base URL in GitWhisper settings
Verbose Output: If your model (like DeepSeek R1) generates too much text including thinking process, GitWhisper automatically cleans the response to extract just the commit message
Setting Custom Ollama Models: Use GitWhisper: Set Custom Ollama Model
command to configure specific models like deepseek-r1:1.5b
, qwen2.5:7b
, etc.
🔗 GitHub Integration
GitWhisper provides seamless GitHub integration with one-click commit and push functionality.
Setting up GitHub Personal Access Token
For private repositories or enhanced security, you can configure a GitHub Personal Access Token:
Generate a PAT:
Configure in GitWhisper:
- Run
GitWhisper: Set GitHub Personal Access Token
- Paste your token (it will be stored securely)
Commit and Push Workflow
When GitWhisper detects a GitHub repository, you'll see an additional "Commit and Push" button:
- Generate commit message as usual
- Choose your action:
- Commit: Standard commit (local only)
- Commit and Push: Commit and immediately push to GitHub
- Copy to Clipboard: Copy message for manual use
The extension automatically handles:
- GitHub repository detection
- HTTPS/SSH URL conversion
- Secure PAT authentication
- Error handling and fallbacks
📝 Usage Examples
Basic Workflow
# Make your changes
git add .
Then open Command Palette (Ctrl+Shift+P
/ Cmd+Shift+P
) and run GitWhisper: Generate Commit Message
Advanced Workflows
Analyze Before Committing:
- Stage your changes
- Run
GitWhisper: Analyze Changes
to analyze changes
- Run
GitWhisper: Generate Commit Message
to generate commit message
- Review and commit
One-Click Commit and Push (GitHub repos):
- Generate commit message as usual
- Choose "Commit and Push" when prompted
- GitWhisper handles authentication and pushing automatically
With Prefix Support
GitWhisper supports commit prefixes for ticket tracking:
JIRA-123: feat: add user authentication system
TICKET-456: fix: resolve memory leak in data processing
Multi-Repository Support
GitWhisper automatically detects and handles multiple Git repositories in your workspace.
🔧 Troubleshooting
Common Issues
"No staged changes found"
- Make sure you've staged your changes with
git add .
or through VS Code's Source Control panel
- Check that you're in a Git repository
API Key Issues
- Verify your API key is correct using
GitWhisper: Set API Key
- Check your API provider's console for usage limits or billing issues
- For GitHub Models, ensure your PAT has the correct permissions
Ollama Not Working
- Ensure Ollama is installed and running:
ollama serve
- Check if your model is available:
ollama list
- Pull the model if needed:
ollama pull llama3.2
Extension Not Activating
- Reload VS Code window:
Ctrl+Shift+P
→ "Developer: Reload Window"
- Check VS Code's Output panel for error messages
- Ensure you have the minimum VS Code version (1.74.0+)
Getting Help
- Check the Issues page for known problems
- Open Developer Tools (Help > Toggle Developer Tools) to see console errors
- Review VS Code's Output panel for GitWhisper logs
❓ Frequently Asked Questions
Q: Which AI provider should I choose?
A: For best results, we recommend GPT-4o (OpenAI) or Claude 3.5 Sonnet. For local/private use, try Ollama with Llama 3.2.
Q: Can I use GitWhisper without an internet connection?
A: Yes! Install Ollama locally and use it with GitWhisper for completely offline AI-powered commit messages.
Q: Does GitWhisper work with private repositories?
A: Absolutely! GitWhisper works with any Git repository. For GitHub private repos, set up a Personal Access Token for enhanced features.
Q: Can I customize the commit message format?
A: GitWhisper follows conventional commit standards by default. The AI adapts to your project's existing commit style automatically.
Q: Is my code sent to AI providers?
A: GitWhisper only sends git diff information (what changed), not your entire codebase. For maximum privacy, use Ollama (local AI).
Q: How do I change the default AI model?
A: Use GitWhisper: Select Model
command to open configuration.
Q: Does GitWhisper support multiple languages for commit messages?
A: Yes! GitWhisper supports 30+ languages. Use GitWhisper: Set Language
to configure your preferred language.
🛠️ Development
Prerequisites
- Node.js 18+
- pnpm
- VS Code 1.102.0 or higher
Setup
git clone https://github.com/emacliam/gitwhisper-vscode
cd gitwhisper-vscode
pnpm install
Build
pnpm run compile
Watch Mode
pnpm run watch
Package
pnpm run package
Testing
pnpm run test
Development Mode
Press F5
in VS Code to launch a new Extension Development Host window with your extension loaded.
🤝 Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
📄 License
MIT License - see LICENSE file for details.
🙏 Acknowledgments
- Based on the original GitWhisper CLI tool by iamngoni
- Inspired by conventional commit standards
- Built with VS Code Extension API
- Uses multiple AI providers for enhanced flexibility
📞 Support
Happy Committing! 🚀