Codex CLI vs Gemini CLI: an independent comparison for dev teams (November 2026)
Updated · 14 min · by Nick Schäfer- Verdict: Codex CLI is the easier start today: sign in with a ChatGPT plan from $20 a month or an API key. Gemini CLI fits teams that already buy Gemini Code Assist or pay for Gemini API or Vertex AI, because free and Google AI Pro access ended on June 18, 2026.
- Where Codex CLI leads: The sandbox is on by default, with network access off and writes limited to the workspace. It reads AGENTS.md natively.
- Where Gemini CLI leads: Google Cloud terms for Code Assist Standard and Enterprise state that prompts are not used to train models, and a Standard seat costs $19.00 a month on a 12-month term. Sandboxing offers Seatbelt, Docker and Podman.
- The number that decides: June 18, 2026: the day Gemini CLI stopped serving free users and Google AI Pro and Ultra subscribers. Only Code Assist Standard or Enterprise seats and paid API keys remain.
- Check before choosing: Ask where your prompts go and under which contract (Article 28 GDPR), and turn on a sandbox in Gemini CLI before the first team session. Neither vendor publishes a benchmark that compares the two.
Codex CLI from OpenAI and Gemini CLI from Google are both open source coding agents that run in your terminal, read your repository, edit files and run commands. The decision turns on who can sign in, what a team pays, what the sandbox does by default and under which contract your code is processed.
On October 30, 2026 I read both repositories, license files, documentation and price pages, plus 8 open GitHub issues, 33 sources in all. I did not install or run either tool, so this page makes no claim about speed or code quality, and I found no independent benchmark that compares the two. Read how we review. ai-toolfinder is paid by neither vendor. Our directory lists 7 tools in the terminal agent category. Searches for these two often add Claude Code, which I did not compare here.
Codex CLI or Gemini CLI: the verdict
Pick Codex CLI if you want to start with a ChatGPT account or an API key, need a sandbox that is on by default, or want the same agent in the cloud, the IDE and GitHub reviews under one login.
Pick Gemini CLI if your company already has Gemini Code Assist Standard or Enterprise, or pays for Gemini API or Vertex AI, and you want Google Cloud terms for your prompts and a choice of container sandboxes. Do not pick it as a free personal tool any more.
Codex CLI vs Gemini CLI: comparison table
| Codex CLI | Gemini CLI | |
|---|---|---|
| Best for | Individuals and teams on a ChatGPT plan or API key | Organizations on Gemini Code Assist or Google Cloud |
| Maintainer | OpenAI | |
| Code license | Apache 2.0 | Apache 2.0 |
| Sign-in options | ChatGPT account or OpenAI API key | Google account with Code Assist license, Gemini API key, Vertex AI |
| Free use today | Pricing page names the CLI from Plus at $20; Free and Go list the app only | README: no free tier. Docs still list an unpaid API key tier |
| List price per user and month | Business $20 (annual) or $25 (monthly) | Code Assist Standard $19.00 (12 months) or $22.80 (monthly) |
| Higher tier | Pro from $100; Enterprise on request | Code Assist Enterprise $45.00 (12 months) or $54.00 |
| Sandbox out of the box | On: network off, writes limited to workspace | Opt-in: enable with -s, GEMINI_SANDBOX or settings |
| Approval modes | read-only, on-request, never, full access | default, auto_edit, plan, yolo (flag only) |
| Project instructions | AGENTS.md; other names via fallback list | GEMINI.md; other names via context.fileName |
| Platforms | macOS, Linux, Windows with native sandbox | macOS 15+, Windows 11 24H2+, Ubuntu 20.04+, Node.js 20+ |
| Training on your prompts | Business: not by default. API key: your API org settings | Code Assist Standard and Enterprise: no. Paid Gemini API: no |
Compare all fields side by side, including certifications and hosting →
Access: Codex CLI runs on ChatGPT plans, Gemini CLI now needs a Google Cloud contract or an API key
Both programs are open source under Apache 2.0. GitHub classifies each repository as Apache-2.0, OpenAI's license file is the Apache License 2.0 text, and Google's README names Apache 2.0 and links the same text. The license is not what separates these tools. The service behind the program is.
Codex CLI signs in with a ChatGPT account or with an OpenAI API key. The README recommends signing in with ChatGPT to use Codex as part of a Plus, Pro, Business, Edu or Enterprise plan. OpenAI's pricing page lists the CLI on Plus at $20 a month and above, and on Business at $20 per user and month when billed annually for two or more users, or $25 when billed monthly. The Free and Go cards on that page name only the desktop app. With an API key you pay API token rates, and cloud features such as GitHub code review are not included.
Gemini CLI changed on June 18, 2026. Google announced on May 19, 2026 that on that date Gemini CLI would stop serving Google AI Pro and Ultra subscribers and people using it free through Gemini Code Assist for individuals, and pointed them to Antigravity CLI. Access stays for organizations with a Gemini Code Assist Standard or Enterprise license or Code Assist for GitHub on Google Cloud, and for paid Gemini API and Vertex AI keys. The README says the same and adds that the program is not tuned for the Gemini 4 series.
Two Google pages disagree. The quota page still lists 1,000 requests a day for Google account users and 250 for an unpaid API key, but its banner says the unpaid tier was replaced on June 18, and the README says there is no free tier. I treated the banner and README as current and corrected our directory entry, which still showed a free plan.
What this means for you: a developer without a Google Cloud contract can start with Codex CLI today and cannot start with Gemini CLI. For a company that already runs on Google Cloud, Gemini CLI is a normal add-on to the seats it may already own.
Cost for 5 and 25 people over one year: the flat seat prices are within $300 of each other
This is an assumption, not a measurement. I assume every person gets one seat on a flat-rate plan for 12 months, nobody buys extra credits, and nobody uses an API key. Prices are the vendors' list prices in US dollars as of October 30, 2026. The pages I read show no euro prices.
Codex CLI through ChatGPT Business costs $20 per user and month on an annual term: $1,200 a year for 5 people and $6,000 for 25. Billed monthly at $25 it is $1,500 and $7,500. Pro starts at $100 a month ($6,000 and $30,000), and Enterprise is on request.
Gemini CLI through Gemini Code Assist Standard costs $19.00 per user and month on a 12-month term: $1,140 for 5 people and $5,700 for 25. Google lists the price per hour, $0.026027397, and I multiplied it by 730 hours a month. On a monthly term the hourly price is $0.031232877, or $22.80 a month: $1,368 and $6,840. Enterprise costs $45.00 on a 12-month term ($2,700 and $13,500) and $54.00 on a monthly term ($3,240 and $16,200). Google says Enterprise adds code customization on private repositories and higher Gemini CLI limits.
Limits are not comparable. Google gives 1,500 requests per user and day on Standard and 2,000 on Enterprise. OpenAI gives estimates of local messages per five-hour window, for example 15 to 160 on GPT-6.1 Sol and 350 to 3,000 on GPT-6 Luna for Plus and standard Business, and says they are not fixed limits. Paid API keys bill per token on both sides, and I do not estimate that cost.
What this means for you: at 5 people the annual seat prices differ by $60 a year, and at 25 by $300, so the price will not decide. Access, sandbox defaults and the data contract will.
Sandbox and approvals: Codex CLI ships with protection on, Gemini CLI asks you to switch it on
Codex CLI runs with network access off by default. OpenAI's documentation says an operating-system sandbox limits what the agent can touch, typically the current workspace, and an approval policy decides when it must ask. In the Auto preset, which is the workspace-write sandbox with on-request approvals, Codex reads files, edits and runs commands in the working directory without asking, and asks before editing outside the workspace or running commands that need network access. The /permissions command switches to read-only mode. The flag --dangerously-bypass-approvals-and-sandbox, alias --yolo, removes sandbox and approvals together, and OpenAI marks that as not recommended.
Gemini CLI has four approval modes. Default asks before tool use, auto_edit approves edit tools on its own, plan is read-only, and YOLO, which approves everything, can only be set on the command line. An administrator setting can disable YOLO. Sandboxing is a separate switch: the -s flag, the GEMINI_SANDBOX variable or a setting in settings.json. The options are macOS Seatbelt, whose default profile confines writes to the project directory but allows network access, Docker or Podman containers, a Windows native sandbox, and gVisor or LXC on Linux. Trusted folders, which ask you to approve a folder before the program loads its project configuration, MCP servers and hooks, are disabled by default.
On Windows both have a native sandbox. Codex documents three implementations, with mxc recommended, and WSL as an alternative. Gemini CLI's Windows sandbox sets a low integrity level with icacls on the files it writes, and those changes stay on the files after the session ends.
What this means for you: with Codex CLI a new team member is inside a sandbox from the first run. With Gemini CLI the team has to decide on a sandbox method, turn on trusted folders and write that into its setup guide, or it works with plain approval prompts.
Data flow: what leaves your machine, and what each vendor says about training
Both agents run on your computer, but the model runs at the vendor, so the files the agent reads travel as part of the prompt. That is my reading of how the tools work. What happens next depends on how you sign in.
For Codex CLI, OpenAI's documentation says that with a ChatGPT sign-in usage follows your ChatGPT workspace permissions and the Enterprise retention and residency settings, and that with an API key it follows your API organization's retention and data-sharing settings. The Business card promises no training on your business data by default. Enterprise and Edu list retention and residency controls. I tried to read OpenAI's help article on training for individual plans, got an HTTP 403 and did not work around it, so I state no default for Plus or Pro.
For Gemini CLI, the terms depend on the sign-in. With a Code Assist Standard or Enterprise license, the Google Cloud Platform Terms and the Cloud Privacy Notice apply, and Google Cloud says Gemini does not use your prompts or responses as data to train its models. With a paid Gemini API key, Google states it does not use prompts and responses to improve its products, processes them under its data processing addendum and logs them for a limited time to detect abuse. With an unpaid key, Google uses the content to improve its products and human reviewers may read it, and tells users not to submit confidential information.
For teams in Germany, Austria and Switzerland the question is the contract. Article 28 of the GDPR requires processing by a processor to be governed by a contract that sets out the subject matter, duration, purpose and the obligations of both sides. If your repositories hold personal data, such as test fixtures with real customer rows, you need such a contract with whichever vendor you pick. I found no statement in either CLI's own documentation that promises processing only inside the EU. Codex Enterprise lists data residency controls, and Google lists supported locations for Code Assist. Ask each vendor for the region commitment in writing. This is not legal advice.
What this means for you: for confidential code, use the business routes on both sides, ChatGPT Business or Enterprise for Codex and Code Assist Standard or Enterprise or a paid key for Gemini. Do not run either on a free or personal account.
What users complain about, from public GitHub issues
These points come from open issues I read on October 30, 2026. They show recurring pain, not how often it happens, and reaction counts favor the larger community: Codex has about 131,600 stars on GitHub, Gemini CLI about 108,600. All eight were open when I checked.
Codex CLI: a user asked to bring back /undo after Codex deleted files that git did not track (issue 9203, opened January 14, 2026, 541 reactions). A request for a /rewind command notes that the Esc rewind only rewinds the conversation and does not revert Codex's code edits (issue 11626, February 12, 2026, 231 reactions). Since version 0.157.0 an interactive session starts a persistent background daemon that updates itself, and the reporter wants it opt-in (issue 48195, September 25, 2026, 206 reactions). In plan mode Codex accepts its recommended answer after 60 seconds, and a user asks for a setting to turn that off (issue 28969, June 18, 2026, 221 reactions).
Gemini CLI: an Enterprise customer says the newest Flash models were not reachable although Google promised Standard and Enterprise users the latest models, and a commenter saw the same with a plain API key (issue 28625, August 2, 2026, 69 reactions). A report says non-trivial instructions in GEMINI.md and AGENTS.md are ignored (issue 13852, November 26, 2025, 17 reactions). A request asks for a setting to limit the run time of a tool call (issue 3375, July 6, 2025, 9 reactions). Another reports that the generalist subagent hangs on simple tasks (issue 21409, March 6, 2026, 8 reactions).
What this means for you: with Codex, keep work in git and commit before each task. With Gemini CLI, check which models your license reaches and test your instruction file on a real task before you roll it out.
Switching checklist: instructions and MCP move by hand, permissions do not map one to one
Instruction files move with two settings. Codex reads AGENTS.md at the global level and walks from the project root to the working directory, with a combined limit of 32 KiB by default. It accepts other file names through project_doc_fallback_filenames in config.toml, so GEMINI.md can be added there. Gemini CLI reads GEMINI.md by default, and its context.fileName setting accepts a list such as AGENTS.md, CONTEXT.md and GEMINI.md. Each setting is documented separately; combining them is my conclusion, and I did not run it.
MCP servers need to be rewritten. Codex keeps them in config.toml as [mcp_servers.name] tables, or you add them with codex mcp add, and supports stdio and streamable HTTP servers. Gemini CLI keeps them under mcpServers in settings.json and supports stdio, SSE and streamable HTTP. The formats are TOML and JSON, so each server entry is retyped. I did not time a migration; for a repository with a few servers and one instruction file I would plan half a day, which is my estimate.
Permissions do not map one to one. Codex combines a sandbox mode with an approval policy. Gemini CLI separates approval mode from an optional sandbox. Read-only in Codex is close to plan mode in Gemini CLI, and the full-access flags exist on both sides. Write the rules down again for the new tool.
What you lose depends on direction. Leaving Codex CLI, you give up Codex cloud tasks started with codex cloud, the GitHub code review that comes with a ChatGPT plan and the same login in the desktop app and IDE extension. Leaving Gemini CLI, you give up its extensions, checkpointing and trusted folders, and you stay on Gemini models that Google says are not tuned for the Gemini 4 series. Keep the old tool installed until a real task has gone through the new one.
Neither? Mistral Vibe CLI for another open source terminal agent, Antigravity CLI for Google's successor
Mistral Vibe CLI from Mistral AI is Apache 2.0 according to GitHub. Its README says it works on Windows but that Mistral officially supports and targets UNIX environments. Mistral's pricing page lists a Pro plan at $14.99 a month, not including taxes, as of October 30, 2026. It suits teams that want a European vendor and work on macOS or Linux.
If you used Gemini CLI free or with Google AI Pro, Google's own answer is Antigravity CLI, which the transition post describes as built in Go. It is not in our directory yet, so I link no profile.
Who should pick Codex CLI and who Gemini CLI
- You are an individual or a small team and want to start with a ChatGPT account or an API key today.
- You want a sandbox that is on from the first run, with network access off.
- You want AGENTS.md read without extra settings.
- Your company already buys Gemini Code Assist Standard or Enterprise, or pays for Gemini API or Vertex AI.
- You want Google Cloud terms and its data processing addendum behind your prompts.
- You want container sandboxes (Docker, Podman) or macOS Seatbelt profiles, and are ready to set them up.
Codex CLI vs Gemini CLI: frequently asked questions
Is Gemini CLI still free?
For individuals, no. On June 18, 2026 Gemini CLI stopped serving free users and Google AI Pro and Ultra subscribers, and the README says there is no free tier. Google's quota page still lists an unpaid API key tier with 250 requests a day, but its own banner contradicts it, so check the page before relying on it.
Which is cheaper, Codex CLI or Gemini CLI?
On flat seats they are close. Codex through ChatGPT Business is $20 per user and month on an annual term, and Gemini Code Assist Standard is $19.00 on a 12-month term, as of October 30, 2026. For 25 people that is $6,000 against $5,700 a year.
Is Codex CLI better than Gemini CLI for a company team?
I found no independent benchmark that compares them, so I cannot rank code quality. The differences I could document are access (a ChatGPT plan against a Google Cloud contract), the sandbox default (on against off) and the data terms.
Can Codex CLI and Gemini CLI share the same AGENTS.md?
Codex reads AGENTS.md natively. Gemini CLI reads GEMINI.md by default, but its context.fileName setting accepts AGENTS.md. Both settings are documented; I did not run the combination.
Do Codex CLI and Gemini CLI send my code to the cloud and train on it?
Both send the text they read to the vendor's model. Business routes state no training: ChatGPT Business by default, Code Assist Standard and Enterprise, and paid Gemini API keys. An unpaid Gemini key allows human review and product improvement. I did not verify the default for ChatGPT Plus.
The bottom line
Start with Codex CLI if you have no Google Cloud contract or want protection on from the first run. Start with Gemini CLI if Gemini Code Assist or Vertex AI is already in your contract and you accept the work of setting up a sandbox. Either way, get the data processing terms in writing and run one real task from your own repository before the team starts.
Sources
- Codex CLI README, GitHub (as of October 30, 2026)
- Codex CLI license file, Apache 2.0
- OpenAI, Codex pricing (as of October 30, 2026)
- OpenAI, Codex authentication
- OpenAI, Codex agent approvals and security
- OpenAI, Codex AGENTS.md guide
- OpenAI, Codex and MCP
- OpenAI, Codex on Windows
- Gemini CLI README, GitHub (as of October 30, 2026)
- Gemini CLI license file, Apache 2.0
- Google Developers Blog, Transitioning Gemini CLI to Antigravity CLI (May 19, 2026)
- Gemini CLI, Quotas and pricing (last updated June 18, 2026)
- Gemini CLI, License, terms of service and privacy notices
- Gemini CLI, Installation and system requirements
- Gemini CLI, Sandboxing
- Gemini CLI, Trusted folders
- Gemini CLI, Configuration reference (approval mode, context file names)
- Gemini CLI, GEMINI.md context files
- Gemini CLI, MCP servers
- Google Cloud, Gemini Code Assist pricing (as of October 30, 2026)
- Google Cloud, How Gemini products use your data
- Google, Gemini API Additional Terms of Service
- Codex issue 9203, missing undo
- Codex issue 11626, rewind without code revert
- Codex issue 48195, background daemon by default
- Codex issue 28969, 60-second auto-answer
- Gemini CLI issue 28625, newer models for Enterprise
- Gemini CLI issue 13852, GEMINI.md instructions ignored
- Gemini CLI issue 3375, tool call timeout
- Gemini CLI issue 21409, generalist agent hangs
- Mistral Vibe CLI repository, GitHub
- Mistral AI, Pricing (as of October 30, 2026)
- GDPR Article 28, EUR-Lex
Independent comparison: neither vendor paid for it or reviewed it before publication. How we review

