Comprehensive Aider Configuration
Complete configuration template for Aider AI pair programming assistant covering all available settings.
Overview
This configuration file demonstrates all valid Aider settings that can be placed in `.aider.conf.yml` at your home directory or git repository root. Customize these settings to optimize your AI-assisted coding workflow.
Configuration Sections
API Keys & Model Selection
Configure your AI provider API keys and select the primary model:
**OpenAI/Anthropic Keys**: Can be stored in YAML config or `.env` file (recommended for security)**Model Selection**: Choose from GPT-4, Claude Opus/Sonnet, GPT-3.5 Turbo, DeepSeek, or custom models**Model Settings**: Customize API base URL, deployment ID, organization ID, and SSL verification**Weak Model**: Specify a cheaper model for commit messages and summarizationModel Settings & Behavior
Control how Aider interacts with LLMs:
**Edit Format**: Specify the format for LLM edits (model-dependent default)**Repo Map Tokens**: Control context size for repository understanding (default: 1024)**Cache Settings**: Enable prompt caching and keepalive pings for performance**Chat History Tokens**: Limit conversation history length**Model Metadata**: Provide custom settings for unknown models via external filesGit Integration
Configure git repository behavior:
**Auto-commits**: Automatically commit LLM changes (default: enabled)**Dirty Commits**: Allow commits when repo has uncommitted changes**Author Attribution**: Attribute aider changes in git author/committer names**Commit Messages**: Customize commit message generation and prefixes**Gitignore**: Automatically add `.aider*` files to `.gitignore`**Subtree Mode**: Limit operations to current git subtreeHistory & Logging
Manage conversation and command history:
**Input History**: Terminal command history file (`.aider.input.history`)**Chat History**: Conversation log file (`.aider.chat.history.md`)**LLM History**: Log raw LLM interactions for debugging**Restore History**: Continue previous conversations on restartOutput & Formatting
Customize terminal output appearance:
**Color Themes**: Dark mode, light mode, or custom color schemes**Color Customization**: Set colors for user input, tool output, errors, warnings, and assistant messages**Code Themes**: Choose markdown syntax highlighting theme (default, monokai, solarized)**Streaming**: Enable/disable real-time response streaming**Diffs**: Show git diffs when committing changesLinting & Testing
Automate code quality checks:
**Lint Commands**: Specify linters per language (e.g., `python: flake8 --select=...`)**Auto-lint**: Automatically run linters after changes (default: enabled)**Test Commands**: Specify test runner command**Auto-test**: Automatically run tests after changes (default: disabled)**Fix Mode**: Run lint/test and automatically fix problemsFile Management
Control which files Aider can access:
**File List**: Specify editable files (can specify multiple)**Read-only Files**: Add files for context without editing permission**Aiderignore**: Define ignore patterns (`.aiderignore` file)Other Settings
Additional workflow options:
**Voice Language**: Set ISO 639-1 code for voice input (default: auto)**Chat Language**: Override system language for chat interface**VI Mode**: Enable VI editing mode in terminal**Shell Commands**: Enable/disable shell command suggestions**Update Checks**: Automatically check for new Aider versions**Dry Run**: Preview changes without modifying files**Message Mode**: Send single message and exit (non-interactive)Usage Instructions
1. **Create Configuration File**:
- Save as `.aider.conf.yml` in your home directory for global settings
- Or save at git repository root for project-specific settings
2. **Set API Keys** (choose one method):
- In config file: `openai-api-key: sk-...` or `anthropic-api-key: sk-...`
- In `.env` file (recommended): `OPENAI_API_KEY=sk-...` or `ANTHROPIC_API_KEY=sk-...`
3. **Uncomment Desired Settings**:
- All settings shown with `#` prefix are commented examples
- Remove `#` and set your preferred value to activate
4. **Select Model**:
- Use convenience flags: `opus: true`, `sonnet: true`, `4o: true`, etc.
- Or specify directly: `model: gpt-4-turbo-preview`
5. **Configure Git Behavior**:
- Enable auto-commits for seamless workflow: `auto-commits: true`
- Customize commit attribution: `attribute-author: true`
- Set custom commit prompt if needed
6. **Set Up Linting**:
```yaml
lint-cmd:
- "python: flake8 --select=E,W"
- "javascript: eslint --fix"
auto-lint: true
```
7. **Customize Colors** (optional):
```yaml
dark-mode: true
user-input-color: "#00cc00"
assistant-output-color: "#0088ff"
code-theme: monokai
```
8. **Test Configuration**:
- Run `aider --help` to verify settings load correctly
- Use `aider --show-prompts` to debug prompt configuration
- Check `aider --version` for update status
Important Notes
**Security**: Never commit API keys to version control. Use `.env` files and add them to `.gitignore`**Model Costs**: Monitor token usage, especially with `cache-keepalive-pings` enabled**Performance**: Adjust `map-tokens` based on repository size (larger repos may need more tokens)**Compatibility**: Some settings only work with specific models or edit formats**Multiple Values**: Use YAML list syntax for settings that accept multiple values (e.g., `file`, `lint-cmd`)Example Minimal Configuration
```yaml
.aider.conf.yml
model: claude-3-5-sonnet-20240620
auto-commits: true
auto-lint: true
dark-mode: true
lint-cmd:
- "python: ruff check --fix"
- "typescript: eslint --fix"
```
Constraints
OpenAI and Anthropic API keys can only be stored in YAML config; other provider keys require `.env` fileModel metadata warnings enabled by default; disable with `show-model-warnings: false` for custom modelsRepo map refresh defaults to `auto`; manual control available via `map-refresh` settingSSL verification enabled by default; disable only for trusted internal APIs