· ai-tools / comparison / claude-code
Gemini CLI vs Claude Code: Which AI Agent Wins? (2026)
Claude Code wins for most devs in 2026: better IDE integration, verified benchmarks, and stable pricing. Gemini CLI loses free access on June 18, 2026.
By Ethan
1,701 words · 9 min read
Pick Claude Code. It has native IDE extensions, a subscription that covers most solo-dev workloads, and an independently verified benchmark score. Gemini CLI had one real edge — a 1-million-token context window — but Google announced on May 19, 2026 that free access ends June 18. After that, Gemini CLI is enterprise-only. If you are reading this after that date, the comparison has already resolved.
If you were already using Gemini CLI on the free tier, this article explains what changed and where to go from here.
Who this is for
Developers who work in the terminal and want an agentic coding assistant — something that can read a codebase, plan a refactor, run tests, and iterate without you hand-holding every step. If you want an IDE-first tool with autocomplete, read Cursor vs Claude Code instead. For a broader roundup of all terminal options, see Best AI Coding CLI in 2026.
Background: one year from launch to enterprise-only
Google released Gemini CLI in June 2025 as an open-source, Apache 2.0 terminal agent. It attracted 104,908 GitHub stars and more than 6,000 merged external contributions in its first year — among the fastest community uptakes of any developer CLI tool.
On May 19, 2026, Google announced the transition to Antigravity CLI, the commercial successor. Free-tier access, Google AI Pro subscriber access, and Google One AI Ultra subscriber access all end June 18, 2026. After that, Gemini CLI requires either a paid API key or a Gemini Code Assist Standard or Enterprise license (enterprise pricing, no public rate card confirmed as of this writing).
The Antigravity CLI repository is live at github.com/google-antigravity/antigravity-cli. It contains a README, a CHANGELOG, and a demo GIF. No source code. Despite the original tool being Apache 2.0 and built largely by the community, the successor has no published source. Community pushback on the closed-source decision has been significant. Google has not responded with a timeline for open-sourcing Antigravity.
That arc matters for the comparison that follows.
Feature comparison
| Feature | Claude Code | Gemini CLI (v0.45.0) |
|---|---|---|
| Context window | Model-dependent | 1M tokens (Gemini 3) |
| IDE extensions | VS Code + JetBrains (native) | Terminal-only |
| Web access | claude.ai/code | — |
| MCP support | Yes | Yes (core, not optional) |
| Open source | No (proprietary) | Apache 2.0 (original); successor closed |
| Shell/fs/web tools | Yes | Yes |
| Google Search grounding | No | Yes |
| SWE-Bench Pro score | 45.9% (Opus 4.5, verified) | No independently verified score |
| Free tier post-June 18, 2026 | Included in Claude Pro ($17/mo) | Enterprise only |
The 1M-token context window was Gemini CLI’s clearest technical lead. A 1-million-token window lets you load an entire mid-sized monorepo into context and ask questions across it without chunking. Claude Code’s context limit depends on which underlying model it routes to — no independent figure has been confirmed. If raw context capacity at scale is your hard requirement, Gemini CLI (when you have access) still wins that row.
The IDE integration gap goes the other direction. Claude Code ships native extensions for VS Code (including Cursor and Devin Desktop forks) and JetBrains. If your team lives in an IDE rather than a pure terminal, that matters. Gemini CLI has no native VS Code or JetBrains extensions as of v0.45.0.
MCP support is table-stakes in 2026 — both tools have it. Gemini CLI treats MCP as a core integration mechanism, not an add-on. Claude Code’s MCP implementation is functional and well-documented.
Claude Code’s proprietary status is worth naming plainly: it is closed source. Gemini CLI’s original Apache 2.0 code is still on GitHub. The Antigravity CLI successor has no published source. If open-source licensing or auditability matters for your company, that decision is already made.
Install and first run
Claude Code
# Install via npm
npm install -g @anthropic-ai/claude-code
# Authenticate
claude auth login
# Start in a project directory
cd your-project
claude
Claude Code authenticates against your Anthropic account. On the Pro plan ($17/month annual), usage is included. You can also run it against the API directly with a key and pay per token.
Gemini CLI (v0.45.0)
# Install via npm
npm install -g @google/gemini-cli
# Authenticate (Google account)
gemini auth login
# Start
cd your-project
gemini
As of June 4, 2026, authentication still works on free accounts. After June 18, a paid API key or enterprise license is required. If you are reading this after that date, skip the free auth flow and configure an API key: GEMINI_API_KEY=your_key gemini.
Both tools start with a natural-language REPL. Both can read files, run shell commands, and iterate on changes. First-run experience is roughly equivalent — the setup time is under five minutes for either.
Pricing
Claude Code
| Plan | Cost | Claude Code |
|---|---|---|
| Pro (annual) | $17/month | Included |
| Pro (monthly) | $20/month | Included |
| Max 5x | $100/month | Included |
| Max 20x | $200/month | Included |
| API (Sonnet 4.6) | $3/MTok in · $15/MTok out | Pay-as-you-go |
| API (Opus 4.5–4.8) | $5/MTok in · $25/MTok out | Pay-as-you-go |
Claude Code Pro at $17/month covers both the Claude assistant and the agentic coding tool. For solo developers, that’s a reasonable consolidation — one subscription, one tool.
Gemini CLI (post-June 18, 2026)
| Tier | Access |
|---|---|
| Free / Google AI Pro / One AI Ultra | Ends June 18, 2026 |
| Paid API key | Access retained; pricing not confirmed |
| Gemini Code Assist Standard | Enterprise — pricing not public |
| Gemini Code Assist Enterprise | Enterprise — pricing not public |
There is no confirmed public pricing for Gemini Code Assist Standard or Enterprise as of this writing. If you need to budget for it, contact Google Workspace sales. The absence of a public rate card makes it impossible to compare directly with Claude Code’s subscription.
Before June 18, Gemini CLI was the clearest win for cost-conscious developers. After that date, the comparison no longer exists at the hobbyist tier.
Benchmarks: what’s verified, what’s not
One benchmark is independently confirmed: Claude Opus 4.5 scored 45.9% (± 3.60%) on SWE-Bench Pro (731 tasks, standardized scaffolding) via the Scale AI SEAL leaderboard.
No independently verified SWE-Bench score exists for Gemini CLI or its underlying models in the context of the CLI tool. Claims from third-party aggregators (morphllm.com, benchlm.ai) were checked during research for this article and could not be verified against primary sources — don’t cite them.
The honest read: Claude Code’s underlying models have a published, peer-reviewed coding benchmark score. Gemini CLI’s do not, at least not one that survives source verification. If you make buying decisions based on benchmarks, one tool has the data and the other doesn’t.
For full context on Claude Code’s model performance across tasks, see our 2026 review.
Real use-case verdict
Solo dev on a TypeScript / Astro / Cloudflare Workers stack
This is the clearest Claude Code scenario today. At $17/month on the Pro plan, you get the agent plus the assistant. The VS Code extension means you don’t have to leave the editor to run it. Gemini CLI free tier was a genuine alternative before June 18. After June 18, the comparison is $17/month (Claude Code) versus enterprise pricing (Gemini CLI). Unless you’re on a team that can justify Gemini Code Assist Enterprise, Claude Code wins by default.
Team use
Claude Code Max plans ($100–$200/month) scale for teams with heavier usage. The JetBrains extension matters here — Java and Kotlin shops are as likely to be using IntelliJ as VS Code.
For teams already paying for Gemini Workspace or Google Cloud, Gemini Code Assist may bundle in ways that make the per-seat math work. Check your existing contracts before comparing raw prices. But if you are starting fresh, Claude Code’s public pricing and tooling breadth make it the lower-friction choice.
Agentic context-window-intensive tasks
If your use case genuinely requires loading an entire large codebase into a single context window — say, 500K+ tokens — Gemini CLI’s 1M-token window was a real technical advantage. Claude Code does not match it on raw context capacity.
After June 18, that advantage is enterprise-gated. If you need it badly enough to justify enterprise pricing, Gemini Code Assist Enterprise is the path. If you don’t, the window size argument stops applying.
Gemini CLI vs Claude Code: Conclusion
Before June 18, 2026: both tools are worth evaluating if you can use Gemini CLI’s free tier — the 1M-token context window is a genuine differentiator for context-heavy tasks.
After June 18, 2026: Claude Code. The IDE integration, the public pricing, the verified benchmarks, and the stable access model all point the same direction. Gemini CLI’s open-source heritage was compelling; the enterprise pivot and the closed Antigravity successor undo most of what made it interesting as a community tool. If you are also weighing Claude Code against OpenAI’s terminal agent, see Claude Code vs Codex CLI.
The GitHub contribution angle deserves to land clearly: Google accepted over 6,000 external pull requests on an Apache 2.0 codebase, then transitioned to an enterprise-only successor with no published source. The community work fed the product. The product went closed. That is worth knowing before betting a workflow on it.
Start with Claude Code: anthropic.com/claude-code Gemini CLI source (Apache 2.0, archived): github.com/google-gemini/gemini-cli
References
- Claude Code product page — Anthropic (fetched 2026-06-04)
- Anthropic pricing — subscription tiers (fetched 2026-06-04)
- Anthropic API pricing — token pricing (fetched 2026-06-04)
- Gemini CLI GitHub (v0.45.0) — feature reference (fetched 2026-06-04)
- Google Developers Blog — Gemini CLI transition announcement — enterprise-only announcement, May 19, 2026
- Antigravity CLI repo — no source code (inspected 2026-06-04)
- Scale AI SEAL leaderboard — SWE-Bench Pro — Claude Opus 4.5 score (fetched 2026-06-04)
- arXiv:2509.16941 — SWE-Bench Pro methodology
- TechTimes — Gemini CLI contributions story — community angle
- Anthropic — Introducing Claude Max — Max 5x ($100/mo) and Max 20x ($200/mo) plan pricing