Gemini Commits
Generate conventional commit messages automatically using Google's Gemini AI by analyzing your staged changes.
Features
- 🤖 AI-Powered: Uses Gemini AI to analyze your git diff and generate meaningful commit messages
- 📋 Conventional Commits: Follows the Conventional Commits 1.0.0 specification
- 🌍 Multi-language: Support for English and Spanish commit messages
- ✏️ Editable: Review and edit generated messages before committing
- 🔒 Secure: API keys stored securely using VS Code's SecretStorage
- 🎯 SCM Integration: Quick access button in the Source Control view
Installation
From VS Code Marketplace
- Open VS Code
- Go to Extensions
- Search for "Gemini Commits"
- Click Install
From VSIX File
- Download the
.vsix file
- Open VS Code
- Go to Extensions
- Click the "..." menu → Install from VSIX
- Select the downloaded file
Setup
Get Gemini API Key
- Go to Google AI Studio
- Create a new API key
- Copy the key
- Open Command Palette (F1 or Ctrl+Shift+P / Cmd+Shift+P)
- Run
Gemini Commits: Set API Key
- Paste your API key
Usage
- Stage your changes in the Source Control view
- Click the ✨ sparkle icon in the Source Control title bar
- Review the generated commit message
- Edit if needed
- Click "Commit" to confirm
Method 2: Command Palette
- Stage your changes
- Open Command Palette (F1)
- Run
Generate Commit with Gemini
- Follow the prompts
Configuration
Configure the extension in VS Code settings:
Language
Set the language for generated commit messages:
{
"geminiCommits.language": "en" // or "es"
}
en: English (default)
es: Spanish
Model
Choose the Gemini model to use:
{
"geminiCommits.model": "gemini-2.5-flash"
}
Available models:
-gemini-2.5-flash
-gemini-2.5-pro (default)
-Other Gemini models as they become available
The extension generates commit messages following this format:
<type>[optional scope]: <description>
Types
- feat: New feature (MINOR version bump)
- fix: Bug fix (PATCH version bump)
- docs: Documentation changes
- style: Code formatting
- refactor: Code restructuring
- perf: Performance improvements
- test: Adding or updating tests
- chore: Maintenance tasks
- build: Build system changes
- ci: CI/CD configuration
- revert: Revert previous commit
Scopes
Common scopes include:
- Frontend: components, pages, hooks, utils, styles
- Backend: api, auth, database, models, services
- General: config, deps, docker, scripts
Examples
feat: add user authentication system
fix(auth): resolve JWT token expiration issue
docs(api): update authentication guide
refactor(utils): simplify date formatting functions
perf(database): optimize user queries
chore(deps): update React to v18
Requirements
- VS Code version 1.85.0 or higher
- Git repository
- Gemini API key
Troubleshooting
"No Git repository found"
Make sure you have opened a folder that contains a Git repository.
"No staged changes found"
Stage your changes first using git add or the VS Code Source Control view.
"Invalid Gemini API key"
- Verify your API key is correct
- Check that your API key has not expired
- Run
Gemini Commits: Set API Key to update it
"API quota exceeded"
You've reached your Gemini API usage limits. Check your Google AI Studio quota.
Privacy
- Your API key is stored securely using VS Code's SecretStorage API
- Your code diffs are sent to Google's Gemini API for analysis
- No data is stored or logged by this extension