AI Setup (Gemini)
argo-rs integrates with Google’s Gemini AI for generating commit messages and PR descriptions.
Getting an API Key
- Visit Google AI Studio
- Sign in with your Google account
- Create a new API key
- Copy the key
Configuring argo-rs
# Set your API key
argo config set gemini-key YOUR_API_KEY
# Verify it's configured
argo config get gemini-key
Selecting a Model
Choose which Gemini model to use:
# Set the model
argo config set gemini-model gemini-2.5-flash
# Check current model
argo config get gemini-model
Available Models
| Model | Description |
|---|---|
gemini-2.0-flash | Fast, efficient responses |
gemini-2.5-flash | Default - Balanced performance |
gemini-3-flash-preview | Latest features (preview) |
Using AI Features
AI Commit Messages
Generate a commit message from your staged changes:
# Stage files first
git add .
# Generate and commit
argo commit --ai
# Or stage all and generate
argo commit -a --ai
AI PR Descriptions
Generate a PR title and description from your branch commits:
argo pr create --ai
How It Works
- argo-rs analyzes your changes (diff for commits, commits for PRs)
- Sends context to Gemini API
- Returns a formatted message following conventional commit style
- Shows you the result for confirmation before applying
Troubleshooting
“API key not configured”
Run argo config set gemini-key YOUR_KEY with your API key.
“Rate limit exceeded”
Wait a moment and try again. Free tier has usage limits.
Poor quality suggestions
Try a different model with argo config set gemini-model gemini-3-flash-preview.