Aider
Configure Aider, the terminal-based AI pair programmer, to use Revo Mail for powerful code generation and modification.
What This Does
Aider is a command-line tool that lets you edit code through natural language conversations. It can read your codebase, make precise edits, and even commit changes to git. By connecting Aider to Revo Mail, you gain access to powerful models while managing all your AI spending through a single account.
Setup
Step 1: Install Aider
pip install aider-chatOr with pipx for isolation:
pipx install aider-chatStep 2: Set Environment Variables
Aider uses OpenAI-style environment variables. Set them in your shell:
export OPENAI_API_BASE="https://api.revomail.io/v1"
export OPENAI_API_KEY="YOUR_Revo Mail_API_KEY"Replace YOUR_Revo Mail_API_KEY with your actual key from revomail.io/keys.
Step 3: Persist the Configuration
Add the exports to your shell profile for persistence:
Zsh (~/.zshrc):
echo 'export OPENAI_API_BASE="https://api.revomail.io/v1"' >> ~/.zshrc
echo 'export OPENAI_API_KEY="YOUR_Revo Mail_API_KEY"' >> ~/.zshrc
source ~/.zshrcBash (~/.bashrc):
echo 'export OPENAI_API_BASE="https://api.revomail.io/v1"' >> ~/.bashrc
echo 'export OPENAI_API_KEY="YOUR_Revo Mail_API_KEY"' >> ~/.bashrc
source ~/.bashrcStep 4: Launch Aider with Your Model
Navigate to your project directory and start Aider:
cd /path/to/your/project
aider --model kimi-k2.7-codeOr specify a different model:
aider --model deepseek-v4-pro
aider --model minimax-m3
aider --model glm-5.1Step 5: Add Files to the Chat
Once Aider is running, add the files you want to work on:
> add main.py utils.pyThen start chatting naturally about what changes you want.
Recommended Models for Aider
| Task | Model | Rationale |
|---|---|---|
| Code-specialized reasoning | kimi-k2.7-code | Moonshot's code-tuned K2.7 — best for generation and refactoring |
| Frontier code reasoning | claude-opus-4.8 | Anthropic flagship — best at architectural changes and tricky bugs |
| Strong general dev | gpt-5.5 or gpt-5.4 | OpenAI's latest GPT-5 family, 1M context |
| Cost-balanced sessions | claude-sonnet-4.6 | Strong code reasoning at lower cost than Opus |
| General development | deepseek-v4-pro | Optimized for code edits |
| Complex refactoring | kimi-k2.6 | Strong reasoning for architectural changes |
| Large codebases | minimax-m3 or gpt-5.5 | 1M context fits more files |
| Quick fixes | gemini-3.1-flash-lite-preview or glm-5.1 | Fast iteration, low cost |
Command Reference
| Command | Description |
|---|---|
aider --model kimi-k2.7-code | Start with the code-specialized default |
aider --list-models | Show available models |
aider file1.py file2.py | Start with specific files |
aider --auto-commits | Auto-commit changes |
aider --no-auto-commits | Disable auto-commits |
Troubleshooting
"API key not found" error
- Ensure
OPENAI_API_KEYis exported in your current shell - Run
echo $OPENAI_API_KEYto verify it's set
"Model not available" error
- Use the exact model slug from the Models reference
- Try
aider --list-modelsto see what Aider detects
Connection timeout
- Verify
OPENAI_API_BASEis exactlyhttps://api.revomail.io/v1 - Check your network can reach
api.revomail.io
Slow responses on large files
- Use a model with larger context:
minimax-m3 - Add fewer files to the chat context at once
Changes not applying correctly
- Ensure files are added to the chat with
add <filename> - Check that Aider has write permissions in the directory
Notes
- Aider works best when you add relevant files to context before asking for changes
- It integrates with git — commits are created automatically unless disabled
- Use
--dry-runto preview changes without modifying files - All token usage appears in your Revo Mail dashboard immediately
- For sensitive projects, consider using
--no-auto-commitsto review before committing