Run Aider on a Local Model — Pair-Program Offline on Your Mac

Aider — the terminal pair-programmer — pointed at a model on your own Mac. Two env vars and it reads, edits, and rewrites your files locally. Private, offline, no per-token bill.

Aider is a terminal-first pair-programmer: it reads your file, sends it to the model with a plain-English instruction, and applies the returned edit blocks locally. It drives models through LiteLLM, so any OpenAI-compatible endpoint works — including a rapid-mlx server on your own Mac.

Fourth in the series on running your favorite agent locally (after Claude Code, Cursor, and Codex). About five minutes.

The whole thing

  1. pip install aider-chat
  2. brew install rapid-mlxrapid-mlx serve qwen3.6-35b-4bit
  3. export OPENAI_API_BASE=http://localhost:8000/v1

1 · Install Aider + rapid-mlx

pip install aider-chat
brew install rapid-mlx    # in Homebrew core — no tap, no trust

2 · Serve a model that fits your Mac

rapid-mlx serve qwen3.6-35b-4bit
Your Mac Model Good for
16 GB qwen3.5-4b Quick single-file edits
32 GB gpt-oss-20b All-round
48 GB+ qwen3.6-35b-4bit The coding sweet spot

3 · Point Aider at it

Set two env vars, then run Aider on a file:

export OPENAI_API_BASE=http://localhost:8000/v1
export OPENAI_API_KEY=not-needed

aider --model openai/qwen3.6-35b-4bit main.py

Prefer per-invocation flags instead of env vars? That works too:

aider \
  --model openai/qwen3.6-35b-4bit \
  --openai-api-base http://localhost:8000/v1 \
  --openai-api-key not-needed \
  main.py

Keep the openai/ prefix on the model name — Aider drives LiteLLM, which uses it to route to the OpenAI-shape provider. And the base URL ends in /v1. Both are easy to drop and both cause confusing errors.

4 · Pair on it

> add input validation to parse_config() and a test for the bad-path

Aider reads main.py, proposes the edit as a diff, and applies it in place — locally.

Honest expectations

A model on your Mac isn't a frontier cloud model, but Aider's plain-text edit format is unusually tolerant — it leans on the model rewriting code, not on brittle tool-call JSON. Great for private/offline edits and the everyday 80%; point --model back at a cloud provider for the hard 20%.

Where to go next


Run this yourself. rapid-mlx is an open-source, OpenAI-compatible inference server for Apple Silicon. pip install rapid-mlx, then rapid-mlx serve <alias>. Browse every supported model on the family docs or pick one by your Mac's RAM at models.rapidmlx.com.