Gemini CLI vs Codex CLI: which one to choose in the terminal
Back to the blog
Articlegemini clicodexdev toolscomparativoopenai

Gemini CLI vs Codex CLI: which one to choose in the terminal

MafraNovember 24, 20268 min read

You install Gemini CLI, run gemini, and the first thing it asks about is your Gemini Code Assist license. You install Codex CLI, run codex, sign in with your ChatGPT account, and it starts working. Both are terminal coding agents, both are Apache 2.0, both speak MCP, but as of November 24, 2026 they no longer compete for the same user: one became an enterprise tool for Google Cloud, the other is the terminal for your ChatGPT plan.

Picking the wrong one costs you in a specific way: you spend an afternoon configuring a CLI that official documentation says is not meant for your profile. This guide separates them by account, quota, command, and use case, with every number checked against official documentation today.

Which should you choose in the terminal: Gemini CLI or Codex CLI?

If you code on your own and pay for yourself, use Codex CLI. If your company holds a Gemini Code Assist Standard or Enterprise license, use Gemini CLI. If you want Gemini models as an individual, the path today is Antigravity CLI, not the gemini command.

The rest of this article shows where each of those three answers comes from, so you can check your own account before installing anything.

AttributeGemini CLICodex CLI
MaintainerGoogle[OI]
LicenseApache 2.0Apache 2.0
Version on 2026-11-24v0.71.10.172.0
Installnpm install -g @google/gemini-cli@latestofficial script or npm install -g @openai/codex
AuthenticationGemini Code Assist, Code Assist for GitHub, API key, or Vertex AIChatGPT login or API key
ModelsGemini 3 Pro and Flash, Gemini 3.1 Pro PreviewGPT-6.2 Astra and Sol, GPT-6.1 Sol and Terra, GPT-6 Luna
Usage limit1,000 to 2,000 requests per day, depending on license6 to 3,000 messages per 5 hours, depending on model and plan
Context1,048,576 input tokens on Gemini 3.1 Pro Previewset per model, with remaining context shown as a percentage in the CLI
Context fileGEMINI.mdAGENTS.md
MCPgemini mcp addcodex mcp
Non-interactive modegemini -pcodex exec

Why is Gemini CLI no longer the free option?

Because Google moved the product's target. The official repository README opens with a highlighted notice: Gemini CLI is built for Gemini Code Assist Standard and Enterprise licenses and for Code Assist for GitHub on Google Cloud. Free individual access and the Google AI Pro and Ultra plans were moved to Antigravity CLI on June 18, 2026.

The same transition appears on the Gemini CLI plans page: it states the CLI was replaced by Antigravity CLI on 06/18/2026 for unpaid users and Google One subscribers. Two official sources, the same date.

The README goes further and closes two doors that usually cause confusion:

  • It is not optimized for Gemini 4. The text says the CLI is not tuned for the Gemini 4 series or later generations.
  • It is not for model benchmarks. The recommendation is not to use Gemini CLI to benchmark Gemini models, because the harness produces unrepresentative scores.

If you already have the CLI installed and personal-account sign-in still works, check your account documentation before assuming it still applies. The repository's authentication page still describes signing in with a personal Google account, while the README and the plans page say that path has moved. When a product's docs contradict each other, the most recent date and the highlighted notice are the better signal.

What does each one cost and deliver?

With Codex CLI, access comes from a ChatGPT plan or from an API key billed by usage. The table below uses the prices and local-message ranges per five-hour period published on the Codex pricing page on 2026-11-24.

ChatGPT planPriceCodex in the CLI
PlusUS$ 20 per monthyes
Profrom US$ 100 per month (US$ 100, 200, or 500 tiers)yes, with no five-hour limit
BusinessUS$ 20 per user per month annual, US$ 25 monthlyyes
API keyusage based, per the API price listyes, without cloud features

On the Plus plan, quota is counted in local messages per five hours and varies a lot by model. The published ranges are:

Codex modelMessages per 5 hours on Plus
GPT-6.2 Astra6 to 50
GPT-6.2 Sol17 to 180
GPT-6.1 Sol15 to 160
GPT-6.1 Terra35 to 285
GPT-6 Luna350 to 3,000

Notice the gap between the strongest and the lightest model: on Plus, Astra gives you 6 to 50 messages in the same window where Luna gives you 350 to 3,000. Fast mode consumes 2x quota on Astra and Sol, and ultrafast mode consumes 6x to 8x.

With Gemini CLI, the count is requests per day, per user:

AccessRequests per day
Gemini Code Assist for individuals1,000
Google AI Pro1,500
Google AI Ultra2,000
Code Assist Standard1,500
Code Assist Enterprise2,000
Unpaid API key250, Flash models only

The first two rows are exactly the ones the README says moved to Antigravity CLI. In other words, the quota numbers are still published, but the access path for individuals changed products. For corporate use under Code Assist, the table still applies.

How do you install and authenticate each one?

Gemini CLI installs through npm, and sign-in depends on your license:

npm install -g @google/gemini-cli@latest
gemini

If you hold a Code Assist license, the CLI uses your organization's account and Google Cloud project. To use an API key instead, export the variable before opening the CLI:

export GEMINI_API_KEY="your-ai-studio-key"
gemini

Codex CLI installs with a script on macOS and Linux, with npm and Homebrew as alternatives:

curl -fsSL https://chatgpt.com/codex/install.sh | sh
codex

Sign-in uses the ChatGPT account that holds your plan. If you prefer an API key, the CLI supports that mode, with the caveat that cloud features such as GitHub code review and Slack integration are left out.

In both cases, the first command inside the project creates the context file. In Codex:

/init

That generates AGENTS.md with the repository instructions. In Gemini CLI, the equivalent is GEMINI.md, reloaded with /memory reload when you edit the file mid-session.

What changes day to day?

Command approval. Gemini CLI has an explicit approval mode: --approval-mode default, auto_edit, yolo, or plan. The old --yolo flag is marked deprecated, replaced by --approval-mode=yolo. In Codex CLI, control lives in /permissions, which shows the active sandbox and writable roots.

Automation. Gemini CLI has gemini -p "question" for non-interactive runs and --output-format json or stream-json for pipelines. Codex CLI uses codex exec for the same kind of flow.

Resuming a session. In Gemini CLI, gemini -r "latest" continues the most recent session, and gemini -r "<id>" resumes by identifier. In Codex CLI, codex resume reopens chats from the current repository or searches local chats.

Extensions. Gemini CLI installs Git extensions with gemini extensions install <url>, with an auto-update option. Codex CLI packages repeatable instructions as skills and installs plugins from marketplaces inside the CLI itself.

MCP. The command is similar on both. In Gemini CLI:

gemini mcp add github npx -y @modelcontextprotocol/server-github

In Codex CLI, codex mcp adds local or remote servers, authenticates when needed, and lists the available tools.

Which one fits your case?

  • Individual developer with a ChatGPT subscription: Codex CLI. It is the path with the least authentication friction, and the model you already pay for lives in the same place.
  • Individual developer who wants Gemini: Antigravity CLI. Installing gemini today means using a harness Google says is not tuned for current models.
  • Company with Gemini Code Assist: Gemini CLI. Per-license quota is predictable and the CLI talks to your organization's Google Cloud project.
  • Team that needs to run in CI without interaction: both work, through codex exec or gemini -p. The decision there is quota and model, not interface.

How do you decide with your own code?

Take a real task from your repository, the kind you would do today, and run the same prompt in both CLIs. Measure three things: how many attempts until the test passes, how many messages or requests you spent, and how long it took. In one afternoon you have the answer no benchmark table can give you, because the bottleneck is rarely the model and almost always the combination of quota, speed, and how well the CLI understands your project.

If what decides it is how many attempts you can pay for, Verboo Code becomes the third side of the comparison: unlimited tokens instead of per-message quota, and an [OI]-protocol-compatible endpoint so you can point the client you already use at it. Run the same prompt there and compare it with the two results you just measured.

Enjoyed this article?
Share knowledge with your network.
// Read also

Related articles