gitdotai
v1.0.0
Published
AI-powered git assistant for code reviews and smart commits. Supports OpenAI, Claude, and Google Gemini.
Downloads
20
Maintainers
Readme
gitdotai - AI-Powered Git Assistant 🤖
Supercharge your git workflow with AI-powered code reviews and intelligent commit messages. Supporting OpenAI (ChatGPT), Anthropic (Claude), and Google (Gemini).
Features ✨
- 🔍 AI Code Reviews - Get instant, intelligent feedback on your code changes
- 💬 Smart Commit Messages - Generate conventional commit messages automatically
- 🎯 Multiple AI Providers - Choose from OpenAI, Claude, or Gemini (free tier!)
- 🚀 Simple Setup - Start using in under a minute
- 🔒 Privacy-First - Your code stays local, only diffs are sent for analysis
- 🎨 Beautiful CLI - Intuitive interface with syntax highlighting
Installation
npm install -g gitdotaiQuick Start
1. Initialize with your preferred AI provider:
gitai initChoose from:
- Google Gemini (Recommended - generous free tier)
- OpenAI ChatGPT (Requires API credits)
- Anthropic Claude (Requires API credits)
2. Review your code changes:
# Review staged changes
gitai review
# Review all changes (staged + unstaged)
gitai review --all
# Skip AI analysis (just show diff)
gitai review --no-ai3. Generate commit messages:
# Generate commit message for staged changes
gitai commit
# Stage all changes and generate commit message
gitai commit --all
# Auto-commit without confirmation
gitai commit --yesExamples
Code Review Example
$ gitai review
✔ Found changes to review!
══════════════════════════════════════════════════
Code Review Summary
══════════════════════════════════════════════════
Branch: main
Reviewing: staged changes
Files changed: 2
✓ Staged files:
+ src/index.js
+ README.md
🤖 AI Code Review
══════════════════════════════════════════════════
✅ Good error handling implementation
⚠️ Consider adding input validation for user data
🐛 Potential null reference on line 45
🔒 Ensure API keys are not logged in production
⚡ Consider memoizing expensive calculations
══════════════════════════════════════════════════Commit Message Generation
$ gitai commit
✔ Found staged changes!
Files to commit (2):
✓ src/auth.js
✓ tests/auth.test.js
✔ Commit message generated!
══════════════════════════════════════════════════
Suggested commit message:
feat(auth): add JWT token validation with tests
══════════════════════════════════════════════════
? What would you like to do? › Use this messageSupported AI Providers
Google Gemini (Recommended for Free Tier)
- ✅ 60 requests per minute free
- ✅ No credit card required
- ✅ High-quality code analysis
Get your API key at: makersuite.google.com
OpenAI ChatGPT
- GPT-3.5 and GPT-4 support
- Requires API credits
- Get your API key at: platform.openai.com
Anthropic Claude
- Claude 3 models supported
- Requires API credits
- Get your API key at: console.anthropic.com
Configuration
GitAI stores its configuration in .gitai/config.json in your project root. API keys are stored in your .env file for security.
Environment Variables
# For Gemini
GEMINI_API_KEY=your-api-key
# For OpenAI
OPENAI_API_KEY=your-api-key
# For Claude
ANTHROPIC_API_KEY=your-api-keyPrivacy & Security
- ✅ Local Processing - All git operations happen locally
- ✅ Minimal Data Sharing - Only diffs are sent to AI providers
- ✅ Secure Storage - API keys stored in
.env(gitignored) - ✅ No Tracking - We don't collect any usage data
Requirements
- Node.js >= 14.0.0
- Git repository
- API key for at least one AI provider
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT © vedant jain
Made with ❤️ by developers, for developers
