🚀 AI Commit Pro
Generate perfect Git commit messages with AI in one click!
AI Commit Pro uses Claude AI (Anthropic) to analyze your staged changes and automatically generate clear, professional commit messages following the Conventional Commits format.

✨ Features
🤖 AI-Powered Commit Messages
- Claude AI Integration: Uses Claude 3.5 Haiku/Sonnet for intelligent analysis
- Conventional Commits: Follows industry-standard format (
feat:, fix:, docs:, etc.)
- Context-Aware: Analyzes your recent commits to maintain consistent style
- Multi-Language: Supports English and Spanish commit messages
🎨 Beautiful UI
- Preview Panel: Edit generated messages before committing
- Real-time Character Count: Visual feedback for message length
- File List Display: See all modified files at a glance
- VS Code Theme Integration: Seamlessly matches your editor theme
⚡ Productivity Boosters
- Keyboard Shortcut:
Ctrl+Shift+C (or Cmd+Shift+C on Mac)
- Auto-Copy to Clipboard: Generated message copied automatically
- One-Click Integration: Button in Git panel for quick access
- Multi-Repo Support: Works with workspaces containing multiple repositories
🛡️ Smart Error Handling
- Specific error messages for API issues (rate limits, auth, network)
- Git validation (repository detection, permissions)
- Retry functionality built-in
📦 Installation
From VS Code Marketplace (Coming Soon)
- Open VS Code
- Go to Extensions (
Ctrl+Shift+X)
- Search for "AI Commit Pro"
- Click Install
From Source
- Clone this repository
- Run
npm install
- Run
npm run compile
- Press
F5 to open Extension Development Host
🔧 Setup
1. Get Your Anthropic API Key
- Go to Anthropic Console
- Sign up or log in
- Create a new API key
- Copy the key
- Open VS Code Settings (
Ctrl+,)
- Search for "AI Commit Pro"
- Paste your API key in
aiCommitPro.apiKey
Or use Command Palette:
- Press
Ctrl+Shift+P
- Type "Preferences: Open Settings (UI)"
- Search "AI Commit Pro"
🎯 Usage
Method 1: Keyboard Shortcut (Recommended)
- Stage your changes (
git add)
- Press
Ctrl+Shift+C (Windows/Linux) or Cmd+Shift+C (Mac)
- Wait for AI to generate the message
- Edit if needed in the preview panel
- Click "Use This Message"
- Commit! 🎉
Method 2: Command Palette
- Stage your changes
- Press
Ctrl+Shift+P
- Type "AI Commit: Generate Commit Message"
- Press Enter
- Stage your changes
- Look for the ✨ sparkle icon in the Git panel toolbar
- Click it
⚙️ Configuration
| Setting |
Description |
Default |
apiKey |
Your Anthropic API key |
"" |
model |
Claude model to use |
claude-3-5-haiku-20241022 |
language |
Language for messages |
spanish |
showPreview |
Show preview panel before inserting |
true |
maxRecentCommits |
Number of recent commits for context |
5 |
autoCopyToClipboard |
Auto-copy message to clipboard |
true |
Model Comparison
| Model |
Speed |
Cost |
Best For |
| Haiku ⚡ |
Fastest |
$1/1M tokens |
Daily use (recommended) |
| Sonnet 🎯 |
Fast |
$3/1M tokens |
Complex commits |
| Opus 🧠 |
Slower |
$15/1M tokens |
Critical commits |
💡 Examples
Before (Your Diff)
+ function calculateTotal(items: Item[]): number {
+ return items.reduce((sum, item) => sum + item.price, 0);
+ }
After (Generated Commit)
feat(utils): add calculateTotal function for item pricing
Implement reduce-based total calculation for shopping cart items
🎨 Preview Panel
The interactive preview panel allows you to:
- ✏️ Edit the generated message
- 📋 Copy to clipboard
- ✅ Accept or ❌ Cancel
- 📊 See character count with visual warnings
- 📂 View all modified files
Keyboard Shortcuts in Preview:
Ctrl/Cmd+Enter: Accept message
Escape: Cancel
🔍 How It Works
1. You stage changes (git add)
↓
2. Press Ctrl+Shift+C
↓
3. Extension reads git diff
↓
4. Sends to Claude AI with context
↓
5. AI generates commit message
↓
6. Preview panel opens (optional)
↓
7. Message inserted into Git
🚨 Troubleshooting
"No staged changes"
Solution: Stage your files first with git add . or use the Git panel
Solution: Add your Anthropic API key in Settings → AI Commit Pro → API Key
"Rate limit exceeded"
Solution: Wait a few minutes. Free tier has limits. Consider upgrading your Anthropic plan.
"No repository detected"
Solution: Make sure you're in a Git repository. Run git init if needed.
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature)
- Commit your changes (
git commit -m 'feat: add some amazing feature')
- Push to the branch (
git push origin feature/AmazingFeature)
- Open a Pull Request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- Anthropic for the amazing Claude AI API
- VS Code Team for the excellent extension API
- Conventional Commits for the commit message standard
📞 Support
🌟 Show Your Support
If you find this extension helpful, please:
- ⭐ Star the repository
- 📢 Share with your team
- 🎉 Leave a review on the VS Code Marketplace
Made with ❤️ by Juan Solórzano | JD Solutions Inc.
Powered by Claude AI 🤖