Aider Configuration Template
Complete configuration file template for Aider AI pair programming tool. This template documents all available configuration options for customizing Aider's behavior through `.aider.conf.yaml`.
Instructions
This skill provides a comprehensive reference for configuring Aider through YAML configuration files. Use this when setting up Aider for a project or customizing its behavior.
Configuration File Locations
Aider searches for configuration files in this order:
1. Git repository root (`.aider.conf.yaml`)
2. Current working directory
3. Home directory (`~/.aider.conf.yaml`)
Key Configuration Sections
**Authentication & API Keys:**
OpenAI and Anthropic API keys can be stored in YAML configOther API keys should use `.env` files (see `env-file` option)Use `openai-api-key` and `anthropic-api-key` for direct configuration**Model Selection:**
Specify main chat model with `model` optionQuick shortcuts available: `opus`, `sonnet`, `4o`, `4-turbo`, `35turbo`Configure fallback model with `weak-model` for summaries and commit messages**Model Settings:**
Customize API endpoints with `openai-api-base`Configure deployment settings for Azure/custom providersControl context window with `map-tokens` and `max-chat-history-tokens`Set edit format preferences with `edit-format`**Git Integration:**
Auto-commit enabled by default (`auto-commits: true`)Configure commit attribution with `attribute-author` and `attribute-committer`Control .gitignore management with `gitignore` optionSet up .aiderignore for excluding files**History & Logging:**
Chat history saved to `.aider.chat.history.md` by defaultInput history in `.aider.input.history`Enable LLM conversation logging with `llm-history-file`Restore previous sessions with `restore-chat-history`**Linting & Testing:**
Configure automatic linting with `auto-lint` and `lint-cmd`Set up test commands with `test-cmd`Enable auto-testing with `auto-test`**Output Customization:**
Color themes for dark/light terminalsCustomize colors for user input, assistant output, tool messagesControl streaming with `stream` optionShow git diffs with `show-diffs`Common Configuration Patterns
**Basic Project Setup:**
```yaml
model: claude-3-5-sonnet-20240620
env-file: .env.local
auto-commits: true
dark-mode: true
```
**Testing Integration:**
```yaml
test-cmd: npm test
auto-test: true
lint-cmd: "python: ruff check ."
auto-lint: true
```
**Custom API Configuration:**
```yaml
openai-api-base: https://your-api-endpoint.com
verify-ssl: true
model-settings-file: .aider.model.settings.yml
```
**History Management:**
```yaml
chat-history-file: .aider.chat.history.md
restore-chat-history: true
llm-history-file: .aider.llm.history
```
Important Notes
Only OpenAI and Anthropic keys go in YAML; use `.env` files for other providersEnvironment file defaults to `.env` in git root; override with `env-file`Most boolean options default to `true` for convenience featuresUse `--help` flag to see current defaults for your Aider versionConfiguration cascades: CLI args override config file settingsSecurity Considerations
Never commit API keys in configuration filesUse `.env` files for sensitive credentialsAdd `.aider.conf.yaml` to `.gitignore` if it contains secretsUse environment variables for CI/CD pipelinesDebugging Options
`show-repo-map`: Print repository map without starting chat`show-prompts`: Display system prompts for inspection`verbose`: Enable detailed logging output`llm-history-file`: Log full LLM conversations for debugging