2 releases
0.1.1 | Nov 16, 2024 |
---|---|
0.1.0 | Nov 16, 2024 |
#914 in Web programming
246 downloads per month
20KB
170 lines
CommitAI
AI-powered git commit message generator using Google's Gemini API.
Installation
cargo install commitai
Setup
-
Get a Google API key from Google AI Studio
-
Create a config file:
Linux/macOS:
mkdir -p ~/.config/commitai
echo "GOOGLE_API_KEY=your_api_key_here" > ~/.config/commitai/config
Windows:
mkdir -p $env:APPDATA\commitai
echo "GOOGLE_API_KEY=your_api_key_here" > $env:APPDATA\commitai\config
Usage
- Stage your changes:
git add .
- Generate commit message:
commitai
- Choose what to do with the generated message:
y
- Use the message and commite
- Edit the message before committingn
- Cancel without committing
Features
- Generates contextual commit messages based on staged changes
- Follows conventional commit format
- Supports message editing with your preferred editor
- Color-coded status messages
- Automatic retry with backoff
License
This project is licensed under the MIT License - see the LICENSE file for details.
Dependencies
~17–30MB
~509K SLoC