Production-ready Aider setup with OpenRouter integration, Gemini models, architect mode, and custom fast/smart aliases for efficient AI-assisted coding
Production-grade configuration for Aider AI coding assistant with OpenRouter model routing, Gemini 2.5 integration, and optimized workflow aliases.
Configures Aider with:
1. **Install Aider**:
```bash
pip install aider-chat
```
2. **Get OpenRouter API Key**:
- Sign up at https://openrouter.ai
- Generate API key from dashboard
- Set environment variable:
```bash
export OPENROUTER_API_KEY='your-key-here'
```
1. **Create Aider config directory**:
```bash
mkdir -p ~/.aider
```
2. **Save configuration** to `~/.aider/aider.conf.yml`:
```yaml
chat-language: english
voice-language: english
dark-mode: true
code-theme: monokai
attribute-author: false
attribute-committer: false
architect: true
check-update: true
alias:
- "fast:openrouter/google/gemini-2.5-flash"
- "smart:openrouter/google/gemini-2.5-pro"
model: smart
```
**Start with smart model** (default):
```bash
aider
```
**Use fast model** for quick iterations:
```bash
aider --model fast
```
**Explicit model override**:
```bash
aider --model smart
```
| Alias | Model | Use When |
|-------|-------|----------|
| `fast` | Gemini 2.5 Flash | Quick refactors, simple changes, rapid iterations |
| `smart` | Gemini 2.5 Pro | Complex features, architecture decisions, critical code |
With `architect: true` enabled:
**Feature development** (smart):
```bash
aider --model smart
/add src/api/
Implement user authentication with JWT
```
**Quick fixes** (fast):
```bash
aider --model fast
/add src/utils/helper.js
Fix the date formatting bug in formatDate()
```
**Architecture review**:
```bash
aider --model smart
/add src/
Review the current architecture and suggest improvements for scalability
```
| Setting | Value | Purpose |
|---------|-------|---------|
| `dark-mode` | `true` | Comfortable for terminal use |
| `code-theme` | `monokai` | Syntax highlighting theme |
| `attribute-author` | `false` | Clean git history (no "Co-Authored-By") |
| `architect` | `true` | Enhanced planning mode |
| `check-update` | `true` | Stay current with latest features |
| `model` | `smart` | Default to quality over speed |
**Flash model** (~$0.10 per 1M tokens):
**Pro model** (~$1.00 per 1M tokens):
**Config not loading**:
```bash
aider --show-config-files
cat ~/.aider/aider.conf.yml
```
**Model alias not found**:
```bash
aider --models
aider --model openrouter/google/gemini-2.5-flash
```
**OpenRouter authentication error**:
```bash
echo $OPENROUTER_API_KEY
aider --openrouter-api-key your-key-here
```
**Add more aliases**:
```yaml
alias:
- "fast:openrouter/google/gemini-2.5-flash"
- "smart:openrouter/google/gemini-2.5-pro"
- "cheap:openrouter/meta-llama/llama-3.1-8b-instruct"
- "ultra:openrouter/anthropic/claude-opus-4"
```
**Per-project overrides** (`.aider.conf.yml` in project root):
```yaml
model: fast
auto-commits: false
```
1. **Start with fast**, escalate to smart when needed
2. **Use architect mode** for greenfield projects
3. **Keep config in dotfiles** for reproducibility
4. **Review generated code** before committing
5. **Set git conventions** in project README for Aider context
**Pre-commit hook**:
```bash
#!/bin/bash
aider --model fast --yes-always /lint
```
**CI integration** (review bot):
```bash
aider --model smart --read-only --message "Review this PR for issues"
```
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/aider-enhanced-configuration/raw