Generate conventional commits in seconds! โก
AI-powered commit messages using Google Gemini (because it's free! ๐) - No more struggling with commit message format or wording. Just stage your changes, click generate, and get a perfectly formatted conventional commit instantly.
Download for VSCode: https://marketplace.visualstudio.com/items?itemName=shawnchee.vscode-gemini-commit-writer
Download for Cursor | Antigravity: https://open-vsx.org/extension/shawnchee/vscode-gemini-commit-writer
Professional commit messages with a single click using Google's Gemini AI models.
- ๐ค AI-Powered Commit Messages: Generate conventional commits based on your staged changes in seconds
- ๐ Brief or Detailed: Choose between single-line commits or multi-line with body and footer
- ๐ฐ 100% Free: Uses Google Gemini's free tier (no credit card required!)
- โก Multiple Models: Choose from Gemini 2.5 Flash and Flash Lite
- ๐ฏ Conventional Commits: Follows the Conventional Commits specification
- ๐งฉ Modular: Automatically generates focused, single-purpose commits based on staged changes
- ๐ Secure: API keys stored securely in VS Code's Secret Storage
- โจ๏ธ Keyboard Shortcut:
Ctrl+Alt+G(Windows/Linux) orCmd+Alt+G(Mac) - ๐จ Git Integration: Seamlessly integrates with VS Code's Source Control UI
VS Code: Search for "Gemini Conventional Commit Writer" in VS Code Extensions marketplace or install from here.
Cursor IDE: Also available on Open VSX Registry for Cursor, Antigravity, and VSCodium users.
- Visit Google AI Studio
- Click "Get API Key" (no credit card required!)
- Copy your API key
โ ๏ธ Privacy Notice: Google's free tier may use your data for training purposes. If your code contains proprietary information, consider using a paid Gemini API key which offers data protection guarantees. See Google's data usage policy for details.
Option 1: Via Command Palette
- Press
Ctrl+Shift+P(Windows/Linux) orCmd+Shift+P(Mac) - Search for "Gemini Commit: Set API Key"
- Paste your API key
Option 2: Via Source Control UI
- Open the Source Control view
- Click the gear icon (โ๏ธ) in the SCM title bar
- Select "Set API Key"
- Stage your changes in Git
- Click the sparkle icon (โจ) in the Source Control title bar or use
Ctrl+Alt+G/Cmd+Alt+G - Choose commit style:
- Brief Commit: Single-line (e.g.,
feat(auth): add google oauth) - Detailed Commit: Multi-line with body and footer for context
- Brief Commit: Single-line (e.g.,
- Commit message appears instantly in the input box!
Three ways to generate:
- Button: Click the sparkle icon (โจ) in Source Control toolbar
- Keyboard: Press
Ctrl+Alt+G(Windows/Linux) orCmd+Alt+G(Mac) - Command Palette: Run "Gemini Commit: Generate Commit Message"
Then choose your style:
- Brief Commit - Perfect for quick, straightforward changes
feat(api): add user authentication endpoint - Detailed Commit - For complex changes that need context
feat(api): add user authentication endpoint - Implement JWT token generation and validation - Add password hashing with bcrypt - Create user session management This enables secure user authentication and prepares the foundation for role-based access control. Refs: #123
Click the gear icon (โ๏ธ) in Source Control toolbar to access:
- Set API Key: Add or update your Gemini API key
- Clear API Key: Remove stored API key
- Open Settings: Configure extension preferences
Access settings via File > Preferences > Settings > Extensions > Gemini Commit Writer or click the gear icon in Source Control.
| Setting | Default | Description |
|---|---|---|
| Model | gemini-2.5-flash |
Choose your Gemini model (all free!) |
| Temperature | 0.1 |
Control creativity (0.0 = consistent, 1.0 = creative) |
| Max Output Tokens | 500 |
Maximum commit message length (~375 words) |
| Max Diff Length | 5000 |
Maximum git diff size to analyze (characters) |
| Show Timing Info | false |
Display performance metrics after generation |
| Model | Best For | Speed | Quality |
|---|---|---|---|
| gemini-2.5-flash โก | Recommended for most users | Fast | High |
| gemini-2.5-flash-lite ๐ก | High-volume usage | Fastest | Good |
All models are available on Google's free tier!
Generated messages follow this format:
<type>(<scope>): <description>
Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code refactoringperf: Performance improvementstest: Adding or updating testsbuild: Build system changesci: CI/CD changeschore: Maintenance tasks
Examples:
feat(auth): add google oauth integration
fix(api): resolve null pointer exception in user service
docs(readme): update installation instructions
refactor(utils): simplify date formatting logic
Solution: Stage your changes first using git add or the Source Control UI.
Solution: Set your API key via the gear icon (โ๏ธ) in Source Control or Command Palette.
Solution: Google's free tier has usage limits. Wait a few minutes and try again. Consider:
- Using a lighter model (
gemini-2.5-flash-lite) - Reducing
maxDiffLengthin settings - Waiting between requests
Solution:
- Increase
maxOutputTokensin settings (try 500-1000) - Your diff might be too large, reduce
maxDiffLength - Try a different model
Your API key is stored securely using VS Code's Secret Storage API. It's never exposed in settings files or source control.
Found a bug or have a feature request?
- Report Issues: GitHub Issues
- Source Code: GitHub Repository
MIT License - see LICENSE file for details.
- Built with Google Gemini API
- Follows Conventional Commits specification
- Inspired by the developer community's need for better commit messages
Enjoy writing better commits with AI! โญ
If you find this extension helpful, please consider:
- โญ Starring the repository
- ๐ Writing a review
- ๐ Reporting bugs
