Complete guide to setting up and using GitWhisper - the AI-powered Git commit message generator that whispers the perfect commit message for your changes.
GitWhisper analyzes your staged Git changes and uses AI to generate meaningful commit messages following conventional commit format with emojis. It features an interactive confirmation workflow and supports multiple AI models including OpenAI GPT, Claude, Gemini, GitHub Models, and more.
Choose your preferred installation method
Configure your AI provider credentials
Let AI create perfect commit messages
GitWhisper is available as plugins for popular code editors, providing seamless integration with your existing workflow. These plugins allow you to generate commit messages directly within your IDE without switching to the command line.
Developer: Panashe Mushinyi
The VS Code extension provides seamless integration with Visual Studio Code's built-in Git interface, allowing you to generate AI-powered commit messages without leaving your editor.
Or install directly from the marketplace:
View in VS Code MarketplaceDeveloper: Panashe Mushinyi
The JetBrains plugin is compatible with all JetBrains IDEs including IntelliJ IDEA, WebStorm, PhpStorm, PyCharm, RubyMine, CLion, GoLand, DataGrip, and more.
Or install directly from the JetBrains Plugin Repository:
View in JetBrains RepositoryIf you have Dart installed, this is the easiest method:
dart pub global activate gitwhisper
For macOS users with Homebrew:
brew tap iamngoni/homebrew-gitwhisper
brew install gitwhisper
For Debian-based Linux distributions:
echo "deb [trusted=yes] https://iamngoni.github.io/gitwhisper-apt stable main" | sudo tee /etc/apt/sources.list.d/gitwhisper.list
sudo apt update
sudo apt install gitwhisper
For Windows users with PowerShell (run as Administrator):
irm https://raw.githubusercontent.com/iamngoni/gitwhisper/master/install.ps1 | iex
Universal installation script for Unix-based systems:
curl -sSL https://raw.githubusercontent.com/iamngoni/gitwhisper/master/install.sh | bash
gitwhisper --version
to confirm the installation was
successful.
GitWhisper requires an API key from at least one AI provider. Here's how to get and configure API keys for each supported provider:
Want to try GitWhisper without setting up any API keys? Use our free model powered by LLM7.io - no signup, no API key, just works!
# Just use it - no setup needed!
gw commit --model free
# Or set as default
gw set-defaults --model free
# Save API key permanently
gitwhisper save-key --model openai --key "your-openai-key"
# Or set as environment variable
export OPENAI_API_KEY="your-openai-key"
# Save API key permanently
gitwhisper save-key --model claude --key "your-claude-key"
# Or set as environment variable
export ANTHROPIC_API_KEY="your-claude-key"
# Save API key permanently
gitwhisper save-key --model gemini --key "your-gemini-key"
# Or set as environment variable
export GEMINI_API_KEY="your-gemini-key"
# Save GitHub token permanently
gitwhisper save-key --model github --key "your-github-token"
Now that you have GitWhisper installed and your API key configured, let's create your first AI-generated commit message.
First, make some changes to your files and stage them:
# Stage all changes
git add .
# Or stage specific files
git add src/main.dart
git add README.md
Use GitWhisper to analyze your changes and generate a commit message:
# Generate commit with Gemini (free option)
gitwhisper commit --model gemini
# Or use the shorthand
gw commit --model gemini
# Or just use defaults if configured
gw
GitWhisper will analyze your changes and present an interactive confirmation workflow:
🔮 Analyzing your changes...
✨ Generated commit message:
feat: ✨ Add user authentication system
Options:
[A] Apply commit message
[E] Edit commit message
[R] Retry with same model
[M] Try different model
[D] Discard and exit
What would you like to do? (A/e/r/m/d): A
✅ Commit created successfully!
GitWhisper's interactive confirmation workflow gives you full control over your commit messages. After generating a message, you can choose from several options to ensure the perfect commit.
Use the generated commit message as-is and proceed with the commit.
What would you like to do? (A/e/r/m/d): A
✅ Commit created successfully!
Modify the generated message before committing. Opens your default editor.
What would you like to do? (A/e/r/m/d): E
Opening editor to modify commit message...
Generate a new message using the same AI model for different variations.
What would you like to do? (A/e/r/m/d): R
🔮 Generating new message...
Generate a message with a different AI model for varied perspectives.
What would you like to do? (A/e/r/m/d): M
Available models: openai, claude, gemini...
Select model: claude
Cancel the operation and exit without creating a commit.
What would you like to do? (A/e/r/m/d): D
❌ Operation cancelled. No commit created.
Configure GitWhisper to match your preferences
and workflow. All settings are stored in
~/.git_whisper.yaml.
Save your preferred AI model and variant to avoid specifying them every time:
# Set default model and variant
gitwhisper set-defaults --model gemini --model-variant gemini-2.0-flash
# Set default model only
gw set-defaults --model claude
# For Ollama with custom URL
gw set-defaults --model ollama --model-variant llama3 --base-url http://localhost:11434
Enable interactive commit confirmation to review, edit, or regenerate commit messages before applying:
# Enable commit confirmation
gitwhisper set-defaults --confirm-commits
# Disable commit confirmation
gw set-defaults --no-confirm-commits
Control whether emojis are included in commit messages (enabled by default):
# Disable emojis in commit messages
gitwhisper set-defaults --no-allow-emojis
# Re-enable emojis
gw set-defaults --allow-emojis
feat: ✨ Add dark mode
toggle
feat: Add dark mode
toggle
Configure GitWhisper to automatically stage changes before generating commit messages:
# Enable auto-staging
gitwhisper always-add true
# Disable auto-staging
gw always-add false
# Show current defaults
gitwhisper show-defaults
# Clear all defaults
gw clear-defaults
Set your preferred language for AI-generated commit messages and analysis. GitWhisper supports over 20 languages while maintaining conventional commit format compatibility:
# Change language interactively
gitwhisper change-language
# Shorthand
gw change-language
feat: ✨ Agregar funcionalidad
de modo oscuro
(Spanish)
GitWhisper supports generating commit messages and analysis in over 20 languages. Configure your preferred language while maintaining conventional commit format compatibility.
Use the interactive language selector to choose your preferred language:
# Change language interactively
gitwhisper change-language
# Shorthand
gw change-language
The commit type (feat:, fix:, etc.) and emoji remain in English for universal tool compatibility, while the description is generated in your selected language.
The complete analysis response, including headers, explanations, and recommendations, is provided in your selected language.
GitWhisper supports multiple AI models, each with different variants optimized for various use cases.
| Provider | Latest Models | Cost | Best For |
|---|---|---|---|
| Gemini 2.5 Pro/Flash | Free (generous limits) | Getting started, thinking models | |
| GitHub | Various (GPT-4o, DeepSeek, etc.) | Free (rate limited) | Experimentation |
| OpenAI | GPT-5, GPT-4.1, GPT-4o | Paid | High quality, latest AI |
| Anthropic | Claude Sonnet 4.5, Opus 4.1 | Paid | Detailed analysis, coding |
| xAI | Grok 4, Grok Code Fast | Paid | Real-time, agentic coding |
| DeepSeek | DeepSeek V3.2, R1 | Paid | Cost-effective, reasoning |
| Ollama | Self-hosted (Llama, etc.) | Free (your hardware) | Privacy & control |
gw list-variants --model
[provider]
to see all available variants.
# List all available models
gitwhisper list-models
# List variants for a specific model
gw list-variants --model openai
Add ticket numbers or task IDs to your commit messages:
# Add ticket prefix
gitwhisper commit --prefix "JIRA-123"
# Result: fix: 🐛 JIRA-123 -> Fix login validation bug
Automatically push commits to remote repository:
# Commit and push in one command
gitwhisper commit --auto-push
# Shorthand
gw commit -a
Create a git tag alongside your commit for releases and versioning:
# Create a commit with a tag
gitwhisper commit --tag v1.0.0
# Shorthand
gw commit -t v1.0.0
# Combine with auto-push to push both commit and tag
gw commit -t v1.0.0 -a
Get detailed analysis and suggestions for your code changes:
# Analyze staged changes
gitwhisper analyze
# Analyze with specific model
gw analyze --model claude
Problem: GitWhisper requires staged changes to analyze.
Solution:
# Stage your changes first
git add .
# Then run GitWhisper
gitwhisper commit
Problem: No API key configured for the selected model.
Solutions:
# Save API key permanently
gitwhisper save-key --model openai --key "your-key"
# Or provide key inline
gitwhisper commit --model openai --key "your-key"
# Or set environment variable
export OPENAI_API_KEY="your-key"
Problem: You've hit the API rate limits.
Solutions:
Here are real examples of commit messages generated by GitWhisper:
feat: ✨ Add user authentication system
- Implement JWT token generation
- Add login/logout endpoints
- Create user registration flow
- Add password hashing with bcrypt
fix: 🐛 Resolve memory leak in image processing
- Fix improper disposal of image objects
- Add proper cleanup in finally blocks
- Update unit tests for memory management
docs: 📚 Update API documentation
- Add examples for new endpoints
- Fix typos in authentication section
- Update installation instructions
perf: ⚡ Optimize database queries
- Add indexes for frequently queried fields
- Implement query result caching
- Reduce N+1 query problems
A: For beginners, start with Gemini (free with generous limits) or GitHub models (free but rate-limited). For production use, OpenAI GPT-4 or Claude 3 provide excellent results. Ollama is great if you want complete privacy and control.
A: Yes! You can use Ollama with locally hosted models for completely offline operation. You'll need to install and run Ollama with your preferred model first.
A: Costs vary by provider. Gemini and GitHub models are free. OpenAI and Claude are paid services but very affordable for typical usage - usually a few cents per month for individual developers.
A: GitWhisper follows the conventional commit format with emojis by default. The AI models are trained to generate consistent, well-formatted messages. For custom formats, you can always edit the generated message before committing.
A: Only your git diff (changes) are sent to the AI provider for analysis, not your entire codebase. If privacy is a concern, use Ollama with local models for complete data control.