# Aider

## Install

```bash
pip install aider-chat
pipx install aider-chat
```

## Authenticate

Set the API key for your model:

```bash
export ANTHROPIC_API_KEY="sk-ant-..."

export OPENAI_API_KEY="sk-..."
```

See [aider.chat/docs/llms.html](https://aider.chat/docs/llms.html) for other providers.

## Launch

Aider runs in a standard terminal — open one with <KeyCombo keys={["⌘", "⌥", "1"]} />, then type `aider`.

<TerminalPreview lines={[
  { type: "command", text: "aider --model claude-3.5-sonnet" },
  { type: "output",  text: "Aider v0.50.0" },
  { type: "output",  text: "Models: claude-3.5-sonnet with diff edit format" },
  { type: "output",  text: "" },
  { type: "command", text: "Add dark mode toggle to the settings page" },
  { type: "success", text: "Applied edit to src/settings.tsx" }
]} />

<Toggle title="Useful flags">

| Flag | Description |
|------|-------------|
| `--model <model>` | Choose the AI model |
| `--auto-commits` | Commit after every edit (default on) |
| `--no-auto-commits` | Disable automatic commits |
| `--yes` | Auto-accept all proposed changes |
| `--lint` | Run linter after each edit |

Full reference: [aider.chat/docs](https://aider.chat/docs)

</Toggle>
