# Codex, Gemini CLI and Aider

> What a coding agent in the terminal does. How Codex, Gemini CLI, Aider and Claude Code differ. Why git is your undo button.

**Course:** [AI Apps and Tools](https://learn.benibix.com/learn/ai-ai-tools)  
**Time:** 12 min

**After this lesson you can:**

- Say why an agent suits the terminal
- Tell Codex, Gemini CLI and Aider apart
- Keep an easy undo before an agent starts

## What a coding agent in the terminal does

A terminal coding agent runs in the text window where coders type commands. You start it in a project folder and describe a job. It reads files, edits code and runs tests. OpenAI's Codex CLI came out in April 2025. Gemini CLI and Aider are two more that are open source. Claude Code works the same way.

The terminal suits an agent, because it works by typed commands, and so does the agent. It can run the tests, read the error and try again. No person has to copy text across. It also works when you log in to a server far away, where there is no editor at all.

OpenAI Codex is the agent you start by typing codex. The same account also works in a code editor, in a desktop app and in the cloud. In the cloud, Codex works on its own copy of your code. Then it sends back the changes for you to check. Old articles use the name for a 2021 model, which is a different thing.

Gemini CLI is Google's, and you start it by typing gemini. On June 18, 2026, Google moved free users and Google AI Pro users to a newer tool. That tool is the Antigravity CLI, and you start it by typing agy. Gemini CLI is still open source. It is now meant for firms on Google's paid Code Assist plans.

Aider is a free AI pair programmer for the terminal. It works with many models and over 100 coding languages. Its rule is simple. After each change, it saves a git commit with a clear note. Each AI edit is then one entry in your history, and typing /undo takes it back.

Claude Code, from Anthropic, works the same way. A goal goes in, and edits and test runs come out. You say yes to the risky steps. Each of these agents can run a command that deletes or breaks things. That is why each one asks before it acts, unless you tell it not to.

The common mistake is to run an agent in a folder with no git history. Then a bad edit across 12 files has no easy undo. Save your work with git before you start. Let the agent work. Then read its changes, as you would read a pull request, before you keep them.

```bash
cd my-app
codex "add a test for the login page"
```
Start the agent in the project folder and give it the job in plain words. It reads, edits and runs the tests from there.

## The terminal coding agents

| Tool | Made by | Start it with | Known for |
| --- | --- | --- | --- |
| OpenAI Codex | OpenAI | codex | Terminal, editor, desktop app and cloud in one account |
| Gemini CLI | Google | gemini | Now for firms on a paid Code Assist plan |
| Aider | An open source project | aider | A git commit after every change |
| Claude Code | Anthropic | claude | Asks before risky steps, many ways to extend it |

![One Codex account in the middle, labelled OpenAI's coding agent, links to four places to work: the terminal, marked open source, a code editor, a desktop app, and the cloud, where it works on its own copy of your code. Below, a terminal line reads codex, add a test for the login page.](https://learn.benibix.com/diagrams/at-openai-codex.svg)

### Example: Jack undoes one bad step

Jack asks Aider to tidy up his billing code. It makes 3 changes, and each one becomes its own git commit with a short note.

His tests pass after the first two and fail after the third. He types /undo, the third commit is gone, and the first two stay. The whole fix takes him under a minute.

**Words in this lesson:** [Terminal](https://learn.benibix.com/term/infrastructure/terminal), [OpenAI Codex](https://learn.benibix.com/term/ai/openai-codex), [Gemini CLI](https://learn.benibix.com/term/ai/gemini-cli), [Git](https://learn.benibix.com/term/development/git), [Aider](https://learn.benibix.com/term/ai/aider), [Claude Code](https://learn.benibix.com/term/ai/claude-code)

> **Save first, then let it work.** Each terminal agent can edit many files fast. Save a git commit before it starts. Then any bad edit is quick to undo.

**Question:** Where should free users of Gemini CLI go now?

**Answer:** To the Antigravity CLI, started by typing agy. On June 18, 2026, free and Google AI Pro users moved to the Antigravity CLI. Gemini CLI is still open source, but it now serves firms on a paid Code Assist plan.

---

Source: https://learn.benibix.com/learn/ai-ai-tools/codex-gemini-cli-and-aider
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
