Three-way comparison

Claude Code vs Codex vs Gemini: the three CLI coding agents compared

Updated November 17, 20268 min read

Claude Code vs Codex vs Gemini is really a question about three companies: Anthropic, OpenAI and Google, each with an AI agent that works in your terminal. The Google side changed in 2026, when most Gemini CLI users were moved to the new Antigravity CLI. The matrix below shows all three as of November 2026, followed by a short profile of each, what the Gemini change means for you, and how to run all three on one project.

Claude Code vs Codex vs Gemini CLI: the matrix

Claude CodeCodex CLIGemini CLIAntigravity CLI
CompanyAnthropicOpenAIGoogleGoogle
Commandclaudecodexgeminiagy
ModelsClaude modelsOpenAI GPT modelsGemini modelsGemini and other agent models listed by Google
Free useNoCodex desktop app onlyNo longer for free accountsYes, Individual plan with weekly limits
Plans that include itClaude Pro $20, Max $100, Ultra $200, TeamChatGPT Plus $20, Pro from $100, BusinessPaid Gemini API key, Code Assist Standard or EnterpriseFree, Google AI Pro, Google AI Ultra, Google Cloud business
Open sourceNoYes, Apache-2.0YesNot stated by Google
Rules fileCLAUDE.md (or AGENTS.md when there is no CLAUDE.md)AGENTS.mdGEMINI.mdAGENTS.md or GEMINI.md
WindowsNative, PowerShell installerNative, with Windows sandboxNativeNative
Mac and LinuxYesYesYesYes
Status, November 2026ActiveActiveKept for API key and enterprise usersGoogle's main CLI agent

Prices are per month for one person, as of November 2026. A few things in this table surprise people. Codex's free and $8 Go plans cover the desktop app, and OpenAI lists the CLI from Plus upward. Gemini CLI is still alive, but it no longer serves free personal accounts. And the rules files are converging. Codex and Antigravity CLI read AGENTS.md, and Claude Code reads it too when a project has no CLAUDE.md.

Installing each one

# Claude Code (Windows PowerShell)
irm https://claude.ai/install.ps1 | iex
# Claude Code (Mac, Linux)
curl -fsSL https://claude.ai/install.sh | bash

# Codex CLI
npm install -g @openai/codex

# Gemini CLI (for paid API key users)
npm install -g @google/gemini-cli

Antigravity CLI comes from Google's official download page at antigravity.google. After installing any of them, open a new terminal so your computer finds the new command, go to your project folder and type the command name from the table.

Claude Code: the most settings to tweak

Claude Code is Anthropic's agent. It runs in the terminal, in VS Code and JetBrains editors, in the Claude desktop app and on the web, and they all share your settings and CLAUDE.md file. It has no free plan; Pro starts at $20 a month ($17 billed yearly) as of November 2026.

Where it shines is control. Plan mode has it explore and write a plan before touching files. Hooks run your own checks before or after its actions. Subagents are helper agents for focused jobs. Six permission modes, from Manual to Bypass, set how often it asks you. It is at its best on long, multi-step features where a careful plan pays off.

The weak spots are cost of entry and that the CLI is closed source, so you can't read exactly how it works. A good first task to judge it by: ask it, in plan mode, to add a feature that touches three or four files, and see whether the plan makes sense before it edits.

Codex CLI: open source and bundled with ChatGPT

Codex is OpenAI's agent. The CLI is open source on GitHub under the Apache-2.0 licence, which means anyone can read the code. It comes with ChatGPT Plus ($20 a month) and higher as of November 2026, and the desktop app is available on the Free and Go plans too. Paid plans also run tasks in the cloud, so work continues while your computer is off.

Codex is careful by default. In a git project it starts in Auto mode, writing inside your project and asking before going further, and network access starts switched off. Its rules live in AGENTS.md. Our Codex CLI guide walks through setup and the main commands.

The weak spot is fewer ways to customise its behaviour than Claude Code, and you are tied to OpenAI's models. A good first task: a small, clear fix, such as a broken link or an error message, where its quick start shows well. Then try a cloud task and check the result from your phone.

Gemini CLI and Antigravity CLI: Google's terminal agents

Google now has two terminal agents. Gemini CLI is the open-source tool that was famous for its free tier in 2025. Antigravity CLI, started with agy, is its replacement for most people. It sits next to the Antigravity desktop app, which Google built for running several agents at once.

Antigravity's free Individual plan is the main reason to choose Google's side: as of November 2026 it costs $0 with weekly limits, and Google AI Pro or Ultra subscribers get more. Antigravity reads rules from either an AGENTS.md or a GEMINI.md file in your project. More in our Google Antigravity guide.

The weak spots are limits that Google does not publish as numbers, and a product that is still young after the switch. A good first task: hand it routine work you would otherwise spend paid usage on, like writing tests for an existing file, and watch how far the free weekly allowance stretches.

What changed with Gemini CLI in 2026

If you search "gemini cli vs claude code" you will find many posts written before mid-2026, when Gemini CLI was the obvious free pick. Those posts are out of date. Here is what Google announced, in order:

  1. May 19, 2026: Google announced Antigravity CLI and made it available to everyone.
  2. June 18, 2026: Gemini CLI and the Gemini Code Assist editor extensions stopped serving Google AI Pro and Ultra subscribers and people on free Gemini Code Assist for individuals.
  3. Still working: Gemini CLI with paid Gemini API keys, and for companies with Gemini Code Assist Standard or Enterprise licences.
  4. Carried over: skills, hooks, subagents and extensions, with extensions now called Antigravity plugins. Google said not every feature would match on day one.

What to do if you were a free Gemini CLI user: install Antigravity CLI from the official site and sign in with the same Google account. Your GEMINI.md notes file keeps working, because Antigravity reads it. Renaming it to AGENTS.md is optional, but then Codex and Cursor can read the same file. If you pay for a Gemini API key, you can keep using Gemini CLI as before:

npm install -g @google/gemini-cli
gemini

Windows users can follow our Gemini CLI on Windows page for the install and common errors. Source for the dates above: the Google Developers Blog.

Codex vs Gemini CLI, and Claude Code vs Gemini CLI

Codex vs Gemini CLI

Both are open source, so if reading the code matters to you, either works. For a personal account, though, the real comparison today is Codex against Antigravity CLI. Codex needs ChatGPT Plus for the CLI; Antigravity CLI has a free plan. Codex starts with network access off and a strict sandbox. Antigravity's strength is its tie-in with the Antigravity App for running agents side by side.

Claude Code vs Gemini CLI

Claude Code costs money from day one and gives you the most control. Google's agent costs nothing on the free plan and gives you less to tune. One sensible split is to let the free Google agent handle routine jobs and save Claude Code for big features where planning matters. Keep your rules in AGENTS.md for the Google agent, and start your CLAUDE.md with the line @AGENTS.md so Claude Code reads the same rules.

Best CLI coding agent overall

Our pick, November 2026

For depth and control, Claude Code. For an open-source CLI that comes with ChatGPT, Codex. For spending nothing, Antigravity CLI. If you code every day, install two of them so a usage limit never stops your work.

Running all three CLI agents side by side

Three agents in one project folder will trip over each other, because two of them may edit the same file at once. The fix is a git worktree for each agent (a separate linked copy of the project, so each one has its own files to change). Here is the manual way:

# from your project folder
git worktree add ../site-claude -b claude-work
git worktree add ../site-codex -b codex-work
git worktree add ../site-google -b google-work

# then open three terminals
cd ../site-claude; claude
cd ../site-codex; codex
cd ../site-google; agy

When an agent finishes, you review its branch and merge the good parts back. Our worktrees guide explains merging in plain steps.

Doing this by hand means juggling several terminal windows and remembering which one needs you. VibeCodingDeck does the copy-per-agent setup for you and shows Claude Code, Codex, Gemini and Antigravity in one grid, each pane with its own status light. When one agent gets stuck you can hand the job to another, and a swarm can put Claude in charge as the lead while Codex workers take parts of the job. The AI agent orchestration page goes deeper.

More on the three CLI agents

Is Gemini CLI still free?

+

Not for personal accounts. Since June 18, 2026, Gemini CLI no longer serves free Gemini Code Assist users or Google AI Pro and Ultra subscribers. Those users moved to Antigravity CLI, which has a free plan. Gemini CLI still works with a paid Gemini API key.

Which is the best CLI coding agent?

+

Claude Code for control on big jobs, Codex for an open-source CLI inside ChatGPT, and Antigravity CLI if you want to pay nothing. Many people install two and switch when one hits a limit.

Can one rules file work for all three agents?

+

Mostly. Codex and Antigravity CLI read AGENTS.md. Claude Code reads it when there is no CLAUDE.md, or when your CLAUDE.md includes the line @AGENTS.md. Gemini CLI uses GEMINI.md. Put shared rules in AGENTS.md and keep tool-specific extras in each tool's own file.

Do all three work on Windows without WSL?

+

Yes. Claude Code installs from PowerShell, Codex supports native Windows with its own sandbox, and Google's agents run on Windows too. See our Claude Code on Windows page for setup help.

Is Claude Code open source like Codex and Gemini CLI?

+

No. Claude Code's CLI is closed source. Codex CLI is Apache-2.0 on GitHub and Gemini CLI is open source. Google has not said whether Antigravity CLI is open source.

Sources

Run up to 12 AI coding agents in one window.

Claude Code, Codex, Gemini, Grok and more, side by side. Windows and Mac. From $29 a month.

Get started

Keep reading