Aider and OpenAI Codex are the two names that come up whenever a developer asks for AI coding in the terminal — and they represent two philosophies. Aider is free, open source, and model-agnostic: you bring your own API key and pay only for the tokens you burn. Codex is OpenAI's agent, bundled with your ChatGPT plan, working across the CLI, the cloud, and your IDE.
The choice is really about control versus convenience. Aider gives you total control over models and costs, running entirely on your machine. Codex gives you the full OpenAI stack — autonomous cloud tasks, mobile access, code review — at the cost of model monogamy. This page compares them on the dimensions that matter, using current pricing and documented behavior.
| Aider | OpenAI Codex | |
|---|---|---|
| Price | Free (bring your own API key) | Bundled with ChatGPT Plus $20/mo and up |
| Free tier | Yes — the tool itself is free | Limited Codex access on ChatGPT Free |
| Open source | Yes (Apache 2.0) | CLI is open source; models are closed |
| Model choice | Any LLM, including local models via Ollama | OpenAI models only |
| Interface | Terminal REPL, chat-driven | CLI (full-screen TUI), cloud, IDE extension, mobile |
| Autonomy | Supervised pair programming, one session at a time | Autonomous background tasks in the cloud |
| Git workflow | Auto-commits to your current branch | Creates PRs, reviews code |
| Cost control | You choose the model and budget; can be near $0 | Plan usage limits; API pay-as-you-go also available |
| Privacy | Runs locally; code leaves only via your chosen model API | Code is processed in OpenAI's cloud |
| Setup | pip install + API key | npm install + ChatGPT sign-in |
Open-source AI pair programmer for your terminal.
Free and open source (pay only for your LLM API usage)
Try Aider →OpenAI's software engineering agent: cloud, CLI, IDE, and desktop in one loop.
Bundled with paid ChatGPT plans; API usage billed per token — check of
Try OpenAI Codex →Pick Aider if cost control and model freedom matter more than raw autonomy. It is the cheapest way to get a capable terminal agent — the tool is free, and with a cheap API model or a local model your monthly cost can be near zero. You give up autonomous background runs and multi-surface access; this is pair programming, not a fleet. Pick OpenAI Codex if you're already in the OpenAI ecosystem: the marginal cost is zero on top of ChatGPT Plus, and the cloud agent running tasks while you do other work is genuinely useful. The trade is lock-in to OpenAI's models and sending your code to their cloud. Many terminal-first developers run both: Codex for the batch of background tasks, Aider for the focused session where they want a specific model — or no cloud at all.
The tool is free and open source (Apache 2.0). Your only cost is model API usage from whichever provider you connect — or zero if you run a local model through Ollama. Moderate use with a cheap API model can cost just a few dollars a month.
ChatGPT Free includes only limited Codex access for small exploratory tasks. Meaningful use needs Plus ($20/month) or a higher plan, or API-key billing at OpenAI's per-token rates.
Aider. It runs on your machine and your code only leaves it in API calls to the model provider you chose — and with a local model, it never leaves at all. Codex sends your code to OpenAI's cloud, including the background cloud tasks.