> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rixapi.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Aider

> AI pair programming in your terminal. Automatically writes code, runs tests, and creates Git commits. Connects to ePhone AI via the OpenAI-compatible interface.

[Aider](https://aider.chat/) is a terminal-based AI pair programming tool that edits code directly in your local repository and automatically creates Git commits.

## Installation

```bash theme={null}
pip install aider-chat
```

Or with pipx (recommended to avoid dependency conflicts):

```bash theme={null}
pipx install aider-chat
```

## Configuration & Launch

### Option 1: Environment Variables (Recommended — persists across sessions)

<Accordion title="Mac / Linux (zsh)">
  ```zsh theme={null}
  echo 'export OPENAI_API_KEY="sk-your-api-key"' >> ~/.zshrc
  echo 'export OPENAI_API_BASE="https://api.ephone.ai/v1"' >> ~/.zshrc
  source ~/.zshrc
  ```
</Accordion>

<Accordion title="Mac / Linux (bash)">
  ```bash theme={null}
  echo 'export OPENAI_API_KEY="sk-your-api-key"' >> ~/.bashrc
  echo 'export OPENAI_API_BASE="https://api.ephone.ai/v1"' >> ~/.bashrc
  source ~/.bashrc
  ```
</Accordion>

<Accordion title="Windows (PowerShell)">
  ```powershell theme={null}
  [Environment]::SetEnvironmentVariable("OPENAI_API_KEY", "sk-your-api-key", "User")
  [Environment]::SetEnvironmentVariable("OPENAI_API_BASE", "https://api.ephone.ai/v1", "User")
  ```
</Accordion>

After setting the variables, navigate to your project and start:

```bash theme={null}
cd your-project
aider --model gpt-4o
```

### Option 2: CLI Arguments (One-off use)

```bash theme={null}
aider \
  --openai-api-key sk-your-api-key \
  --openai-api-base https://api.ephone.ai/v1 \
  --model gpt-4o
```

### Using Anthropic Models

```bash theme={null}
# Set environment variables
export ANTHROPIC_API_KEY="sk-your-api-key"
export ANTHROPIC_BASE_URL="https://api.ephone.ai/anthropic"

# Start with a Claude model
aider --model claude-opus-4-5-20251101
```

### Using a `.aider.conf.yml` Config File

Create `.aider.conf.yml` in your project root to avoid passing flags every time:

```yaml theme={null}
openai-api-key: sk-your-api-key
openai-api-base: https://api.ephone.ai/v1
model: gpt-4o
```

## Common Commands

Inside the Aider interactive session:

| Command         | Description                                |
| --------------- | ------------------------------------------ |
| `/add <file>`   | Add a file to the current editing context  |
| `/drop <file>`  | Remove a file from the context             |
| `/diff`         | Show all code changes made in this session |
| `/undo`         | Undo the last AI-generated Git commit      |
| `/commit`       | Commit current changes                     |
| `/model <name>` | Switch to a different model                |
| `/exit`         | Exit Aider                                 |

## Recommended Models

| Use Case            | Recommended Model          |
| ------------------- | -------------------------- |
| General coding      | `gpt-4o`                   |
| Complex refactoring | `claude-opus-4-5-20251101` |
| Fast iteration      | `gpt-4o-mini`              |

<Note>
  Aider automatically commits all changes to Git by default. Start from a clean Git state so you can easily roll back with `/undo`.
</Note>
