Claude Code vs Codex vs Gemini CLI: Which to Use in 2026
Claude Code, OpenAI Codex and Gemini CLI compared: prices, free options, where each runs, and why Gemini CLI users now move to Antigravity CLI.

Claude Code, OpenAI Codex and Gemini CLI are the three best-known AI coding agents that work in your terminal: you describe a task in plain English, and the agent reads your project, edits files and runs commands. They look similar, but they differ a lot in price, where they run and who can still use them. Gemini CLI changed the most this year.
Here’s how they compare in November 2026, using each company’s own pricing and documentation pages.
New to coding with AI? Start with our guide to AI coding for beginners.
The short answer
- You already pay for Claude: use Claude Code. It’s included on Pro and higher plans and runs in the terminal, your editor, the desktop app and the browser.
- You already pay for ChatGPT Plus: use Codex. Plus includes the Codex CLI, IDE extension, web and iOS app.
- You don’t want to pay yet: try Antigravity CLI, Google’s replacement for Gemini CLI, which gives accounts without a paid plan a weekly quota.
- Your company uses Google Cloud: Gemini CLI still works with Gemini Code Assist Standard or Enterprise licenses and paid API keys.
Side-by-side comparison
| Claude Code | OpenAI Codex | Gemini CLI / Antigravity CLI | |
|---|---|---|---|
| Made by | Anthropic | OpenAI | |
| Cheapest way in | Pro, $20/month ($17/month billed annually) | ChatGPT Free or Go (desktop app only); Plus at $20/month for the CLI | Antigravity CLI with a quota that refreshes weekly, no paid plan needed |
| Heavier-use plans | Max from $100/month (5x Pro usage) | Pro at $100, $200 or $500/month | Google AI Pro and Ultra (quota refreshes every five hours) |
| Pay per use | API credits via Anthropic Console | API key, billed at API prices | Gemini API key or Vertex AI |
| Where it runs | Terminal, VS Code, Cursor, JetBrains, desktop app, web, mobile | Terminal, IDE extension, web, desktop and mobile apps, Codex Cloud | Terminal; Antigravity CLI shares its agent with the Antigravity 2.0 desktop app |
| Open source | No | Yes (Apache-2.0) | Gemini CLI yes (Apache-2.0); Google hasn’t stated a license for Antigravity CLI |
Prices are in US dollars, exclude tax, and come from each vendor’s pricing page in November 2026.
Claude Code
Claude Code is Anthropic’s coding agent. According to Anthropic’s documentation, it “reads your codebase, edits files, runs commands, and integrates with your development tools,” and it runs in the terminal, VS Code and Cursor, JetBrains IDEs, the Claude desktop app and the browser at claude.ai/code. You can start a long task on the web or your phone and pick it up in your terminal later.
What stands out:
- One agent everywhere. Your project instructions file (CLAUDE.md, or an existing AGENTS.md), settings and connected tools work across every surface.
- Customization. Skills package repeat workflows, hooks run commands before or after the agent acts, and subagents can split a job into parallel parts. Browse ready-made skills in our Claude Skill Finder.
- Automation. GitHub Actions, GitLab CI/CD, automatic GitHub code review, Slack and scheduled tasks that keep running in the cloud when your computer is off.
Watch out for: there’s no free option, and Claude Code shares usage limits with your regular Claude chats. Heavy coders either move up to Max or switch to pay-as-you-go API credits.
OpenAI Codex
Codex is OpenAI’s coding agent, and it comes with ChatGPT plans. OpenAI’s pricing page lists Codex on ChatGPT Free and Go in the desktop app only, using GPT-6 Luna and “subject to rollout.” Plus ($20/month) adds the web, CLI, IDE extension and iOS app, with the GPT-6.1 Sol and GPT-6 Luna models. Pro plans start at $100 a month, and OpenAI says Pro “currently” has no five-hour limit.
What stands out:
- Open-source CLI. The Codex CLI is on GitHub under the Apache-2.0 license, so you can read the code or adapt it. Install it with
npm install -g @openai/codexor Homebrew, runcodex, and sign in with ChatGPT. - Cloud tasks and code review. Codex Cloud runs tasks without your computer, and it can review GitHub pull requests.
- Flexible billing. Plus and Pro users can buy extra credits, and Business and Enterprise teams can use API keys.
Watch out for: OpenAI gives usage as wide estimates rather than fixed numbers. On Plus, for example, it estimates 15 to 160 local messages per five hours with GPT-6.1 Sol, depending on the task. Cloud tasks and faster modes use more of your allowance.
Gemini CLI, now Antigravity CLI
Gemini CLI was the free favorite for much of 2025, but that changed in 2026. On 19 May, Google announced it was “transitioning Gemini CLI to Antigravity CLI.” On 18 June 2026, Gemini CLI and the Gemini Code Assist IDE extensions stopped serving requests for Google AI Pro and Ultra subscribers and for free use through Gemini Code Assist for individuals.
Who can still use Gemini CLI: companies with Gemini Code Assist Standard or Enterprise licenses through Google Cloud, and anyone with a paid Gemini API key or Vertex AI. The open-source repository stays available.
What Antigravity CLI offers: Google says it’s built in Go and is “snappier and more responsive,” runs multi-agent tasks in the background, and carries over Gemini CLI’s skills, hooks, subagents and extensions (now called Antigravity plugins). Google’s plans page says the CLI is included on every plan:
- Accounts without Pro or Ultra: “a meaningful quota, refreshed weekly.”
- Google AI Pro: a quota refreshed every five hours, up to a weekly limit.
- Google AI Ultra: the highest quota, plus access to third-party models.
Watch out for: Google says Antigravity CLI didn’t launch with full feature parity with Gemini CLI, and that limits can change based on capacity. If you followed an older Gemini CLI tutorial, check Google’s migration guide before you start.
Which should you choose?
- Start with the subscription you already have. All three are capable, and the plan you already pay for costs you nothing extra.
- Test on your own project for a week. Benchmark scores vary by source and version; a short trial on a real bug or feature tells you more.
- Choose Codex if open source matters. Its CLI is open source and available on ChatGPT Plus.
- Choose Claude Code if you want one agent on every device, plus scheduled cloud tasks and GitHub code review.
Use any coding agent safely
- Work in a git repository so you can see and undo every change.
- Keep approvals on until you trust the agent, especially for commands that delete files or push code.
- Never paste API keys or passwords into prompts. Keep secrets in environment files the agent doesn’t need to read.
- Review the diff before you merge. Agents can write code that looks right but fails in edge cases.
Our AI privacy checklist covers what to keep out of any AI tool.
Key takeaways
- Claude Code needs a paid Claude plan (from $20/month) and runs in the terminal, IDE, desktop app and browser.
- Codex comes with ChatGPT; Plus ($20/month) unlocks the open-source CLI and IDE extension.
- Gemini CLI stopped serving free, Google AI Pro and Ultra users on 18 June 2026; they now use Antigravity CLI.
- Antigravity CLI is the cheapest place to start; your existing subscription is usually the best place to stay.
Want the bigger picture? Read ChatGPT vs Claude vs Gemini, or see the latest model releases in our AI news roundup.
Sources: Claude plans and pricing · Claude Code overview · OpenAI: Codex pricing · OpenAI Codex on GitHub · Google Developers Blog: Transitioning Gemini CLI to Antigravity CLI · Gemini CLI: Quotas and pricing · Google Antigravity plans
Frequently asked questions
Is Gemini CLI still free?
Not for most individuals. On 18 June 2026, Google stopped serving Gemini CLI requests for free Gemini Code Assist for individuals and for Google AI Pro and Ultra subscribers, and moved them to Antigravity CLI. Gemini CLI still works with paid Gemini API keys and Gemini Code Assist Standard or Enterprise licenses. Antigravity gives accounts without Pro or Ultra a quota that refreshes weekly.
Can I use Claude Code for free?
No. Claude's pricing page includes Claude Code on the paid plans only: Pro ($20 a month, or $17 a month billed annually), Max, Team and Enterprise. You can also pay per use with API credits through an Anthropic Console account.
Do I need ChatGPT Plus to use Codex?
For the Codex CLI and IDE extension, yes, or an API key. OpenAI's pricing page lists Codex on ChatGPT Free and Go in the desktop app only, subject to rollout, while Plus at $20 a month adds the web, CLI, IDE extension and iOS.


