---
slug: aider
kind: runbook
status: docs-checked
sh: https://insidethemachine.ai/install/aider.sh
ps1: https://insidethemachine.ai/install/aider.ps1
json: https://insidethemachine.ai/install/aider.json
page: https://insidethemachine.ai/setups/aider
---

# Install: Aider

AI pair programming in your terminal that edits your git repo, and it works with local models.

**Run status: Not run: commands checked against the official docs only.** The listing's pip line is replaced by the uv line from the coding recipe (macOS has no bare python/pip).

**This script:** The wrapper scripts are generated from the site data. Every .sh passed bash -n and shellcheck and ran in plan mode on Linux (Debian 13). Every .ps1 passed the PowerShell parser and chat.ps1 ran in plan, verify and rollback mode under PowerShell 7 on Linux with Windows calls mocked. Not run on macOS or real Windows.

## One command

```bash
curl -fsSL https://insidethemachine.ai/install/aider.sh | bash
```

Windows (PowerShell):

```powershell
irm https://insidethemachine.ai/install/aider.ps1 | iex
```

Actions: `| bash -s -- plan` (print only), `verify`, `rollback --yes`. Env: ITM_RAM. Read the script first: `curl -fsSL https://insidethemachine.ai/install/aider.sh | less`.

Lines marked YOU RUN are not run by the script (servers, interactive apps, your own files). The script prints them at the end, in order.

## Steps

### macOS

Install:

1. **Install Aider**
   - run (macOS only): `brew install uv`
   - run: `uv tool install --force --python python3.12 --with pip aider-chat@latest`
2. **Configure (your choices)**
   - YOU RUN (a setting you choose): `export OLLAMA_API_BASE=http://127.0.0.1:11434`
   - YOU RUN (per Aider's Ollama docs; raises context to 8k): `OLLAMA_CONTEXT_LENGTH=8192 ollama serve`
   - YOU RUN (docs recommend ollama_chat/ over ollama/): `cd /path/to/your/project && aider --model ollama_chat/<model>`

Verify:

- `aider --version` → expect: prints a version
- by hand: `aider --model ollama_chat/<model> --message 'list the files in this repo' ` → expect: completes one turn against the local model and exits

Rollback:

- run: `uv tool uninstall aider-chat`

### Linux

Install:

1. **Install Aider**
   - run: `uv tool install --force --python python3.12 --with pip aider-chat@latest`
2. **Configure (your choices)**
   - YOU RUN (a setting you choose): `export OLLAMA_API_BASE=http://127.0.0.1:11434`
   - YOU RUN (per Aider's Ollama docs; raises context to 8k): `OLLAMA_CONTEXT_LENGTH=8192 ollama serve`
   - YOU RUN (docs recommend ollama_chat/ over ollama/): `cd /path/to/your/project && aider --model ollama_chat/<model>`

Verify:

- `aider --version` → expect: prints a version
- by hand: `aider --model ollama_chat/<model> --message 'list the files in this repo' ` → expect: completes one turn against the local model and exits

Rollback:

- run: `uv tool uninstall aider-chat`

### Windows (PowerShell, not run by us)

Install:

1. **Install Aider**
   - run: `uv tool install --force --python python3.12 --with pip aider-chat@latest`

Verify:

- `aider --version` → expect: prints a version
- by hand: `aider --model ollama_chat/<model> --message 'list the files in this repo' ` → expect: completes one turn against the local model and exits

Rollback:

- run: `uv tool uninstall aider-chat`
