· ai / coding / cli

Gemini CLI review 2026: the honest verdict before it shuts down

Gemini CLI offered the largest context window in its class and the only meaningful free tier for terminal AI coding. Google killed it on June 18, 2026. Here is what it delivered and where to go next.

By

2,014 words · 11 min read

Gemini CLI was the best free terminal AI coding agent available in 2026. It had a 1-million-token context window, 1,000 requests per day at zero cost, and Apache 2.0 source code anyone could read or fork. Google announced on May 19, 2026 that free access ends June 18. The replacement — Antigravity CLI — is proprietary.

If you are evaluating Gemini CLI today, don’t pick it. If you’ve been using it, you have until June 18 to migrate. This review covers what Gemini CLI actually delivered, where it fell short, and what comes next.

Who this is for

Developers who ran Gemini CLI and want an honest post-mortem before choosing a replacement. Or developers who missed it and want to understand the community anger around the shutdown. For a current comparison of all terminal AI coding tools, read Best AI Coding CLI in 2026.

What we tested

Gemini CLI v0.45.2 (released June 5, 2026 — the last stable version before sunset), running on macOS Sequoia, authenticated via a Google AI Pro API key. Default model: Gemini 3 Flash. For code quality and speed comparisons we draw from a published Express.js refactor benchmark and publicly available SWE-bench Verified scores.

Installation

Four methods, all requiring Node.js 18+ or a package manager — no standalone binary:

# No install required
npx @google/gemini-cli

# Permanent global install
npm install -g @google/gemini-cli

# macOS/Linux via Homebrew
brew install gemini-cli

# macOS via MacPorts
sudo port install gemini-cli

First launch walks you through authentication: Google OAuth (free tier) or a Gemini API key from Google AI Studio.

The 1M context window: what it actually changes

The headline spec is real and it matters. Gemini 3 Flash and Gemini 2.5 Pro both offer 1 million tokens of context. Claude Code has 200K. Codex CLI has 128K–200K.

One million tokens is roughly 3–4 million characters of source code. That is enough to ingest most monorepos in a single prompt — without chunking, without selective context management, without building a retrieval layer on top. For log analysis, large codebase exploration from scratch, or drafting against a dense spec document, the context advantage is concrete.

In practice, the question is whether the model uses that context effectively at scale. For short tasks the difference is invisible. For tasks that require coherence across 80+ files — “refactor this module to match the interface conventions used across the whole codebase” — the 1M window is a real advantage.

How it performed

Benchmarks

ToolSWE-bench Verified
Claude Code (Sonnet 4)80.9%
Codex CLI69.1%

No published SWE-bench score exists for Gemini CLI as a product — the CodeAnt AI benchmark explicitly notes “No publicly detailed benchmark scores” for Gemini CLI. Model-level scores for Gemini 2.5 Pro or Gemini 3 Flash in generic agentic configurations are not equivalent to a CLI-product score and are not included here. Claude Code’s 80.9% score is sourced from the same CodeAnt AI benchmark.

Real task: Express.js refactor

A published benchmark ran an Express.js refactor across the three major terminal agents (source):

ToolTimeCorrections required
Claude Code1h 17m0
Codex CLI1h 41mMid-task adjustments
Gemini CLI2h 04m3

Gemini finished the task. It took 47 minutes longer than Claude Code and required three manual corrections. On a daily-use basis, that difference compounds.

Where Gemini CLI had a genuine edge

Google Search grounding

This is unique. Gemini CLI can run live web searches during coding tasks. Claude Code cannot. Ask it to “implement the Stripe webhook handler following the current docs” and it will fetch the current Stripe documentation rather than working from training data. For API integrations with fast-moving libraries — or anything where the answer might have changed since the model’s cutoff — this is a real workflow improvement.

Windows native support

Gemini CLI runs natively on Windows without WSL2. Claude Code also has native Windows support. Codex CLI requires WSL2. That matters on mixed-OS teams.

Open source and auditable

Apache 2.0 means you can read the code, fork it, and understand exactly what it does to your files and shell environment before trusting it. The community contributed substantially to the codebase in the first year — an unusual level of external engagement for a developer tool of that age.

GEMINI.md: project context files

The direct equivalent of Claude Code’s CLAUDE.md. Create a GEMINI.md or AGENT.md at your project root and Gemini CLI loads it with every prompt. Supports style guides, architecture notes, disallowed patterns, and custom tool instructions. Follows the same hierarchy: project root, subdirectory overrides, global ~/.gemini/GEMINI.md. If you are already using CLAUDE.md, the mental model transfers.

MCP support

Full MCP (Model Context Protocol) support, configured in ~/.gemini/settings.json. Supports stdio, SSE, and HTTP streaming transports. MCP servers can expose tools, resources, and prompts. If you’ve built MCP servers for Claude Code, most will work with Gemini CLI after a config-file change.

Where it fell short

Code quality on complex tasks

Claude Code produces cleaner, more idiomatic code across most languages. The gap shows up clearly on complex multi-file refactors, where Gemini CLI required more corrections and follow-up prompts to reach the same result. The gap widens with architectural consistency tasks — where the agent needs to match conventions from 20 different call sites, not satisfy one test.

Session reliability

Multiple users documented 15-minute hangs with no output, requiring repeated Ctrl+C. Claude Code has its own reliability issues, but its long-task behavior is significantly more predictable. In scripted or CI usage this is worse than it sounds: a hanging session can block a pipeline indefinitely.

File corruption on non-English Windows locales

A documented incident (GitHub Discussion #24725): on a Windows system with a non-English locale, Gemini CLI used PowerShell instead of native file tools, causing large-scale comment corruption in source files. The root cause was an encoding assumption. If you run Windows with a non-English locale, this is a known failure mode.

Security: a CVSS 10.0 RCE in the CI integration

On April 24, 2026, a maximum-severity remote code execution vulnerability was patched in Gemini CLI v0.39.1 (GHSA-wpqr-6v78-jr5g). The attack vector:

  1. An external contributor submits a PR containing a malicious .gemini/ configuration file.
  2. Your CI runner has Gemini CLI configured to run on incoming PRs.
  3. Headless mode auto-trusted the workspace folder; --yolo mode bypassed tool allowlists.
  4. Prompt injection in the config triggered arbitrary shell command execution on the runner.
  5. Attacker executes code on your CI runner and exfiltrates secrets.

Reported by Pillar Security between April 16–20, 2026, patched within four days. The response was fast. But a CVSS 10.0 vulnerability in the CI integration of a tool that was actively recommended for automated pipelines is a signal worth taking seriously. If you ran Gemini CLI in headless mode on a CI runner and haven’t audited your runner logs since April, you should.

v0.45.2 (the final release) is patched. v0.39.0 and earlier are not.

Pricing: what the free tier actually looked like

OAuth / Google Account (free tier, active until June 18)

LimitValue
Requests60/min, 1,000/day
Models availableFlash and Flash-Lite
Gemini 2.5 Pro50 requests/day

1,000 requests/day covers a professional developer’s normal daily workload. The Pro model cap (50/day) was tight for heavy use but sufficient for spot checks. Both limits end June 18, 2026.

API key (pay-as-you-go)

ModelInput (≤200K ctx)Input (>200K ctx)Output (≤200K ctx)Output (>200K ctx)
Gemini 2.5 Pro$1.25/M tokens$2.50/M tokens$10.00/M tokens$15.00/M tokens
Gemini 2.5 Flash$0.30/M tokens$2.50/M tokens

Source: Gemini API pricing. Context caching reduces input costs ~90% for repeated content. Batch API cuts 50% with 24-hour processing.

vs. Claude Code

Claude Code requires a $20/month Max subscription — no separate API billing for CLI usage, no free tier. Gemini CLI’s 1,000 req/day free tier was the only meaningful way to use a capable terminal AI agent at zero cost. That option ends June 18.

The bait-and-switch: what happened

Google launched Gemini CLI as Apache 2.0 open source in June 2025. The community engaged quickly: external contributors submitted improvements to the codebase through the first year. Those contributions improved Google’s product.

On May 19, 2026, Google announced the transition to Antigravity CLI. Antigravity CLI is proprietary — not open source, not forkable, not auditable. External contributors cannot follow their work into the successor.

Apache 2.0 doesn’t require Google to keep anything open. That’s not the point. The point is that the developers who contributed expecting a persistent open-source tool got a commercial product instead, with no path to follow their contributions.

Antigravity CLI: what you get when you migrate

FeatureGemini CLIAntigravity CLI
Agent skillsYesYes
HooksYesYes
SubagentsYesYes
Plugins (formerly extensions)NoYes
Background / async multi-agentNoYes
Built inNode.jsGo
Open sourceApache 2.0No
Free tier (individual)Yes (until June 18)No
Enterprise (Code Assist plans)YesYes

Background orchestration — multiple agents running in parallel on a task — is a genuine new capability. Antigravity CLI is built in Go, which Google claims makes it “snappier and more responsive.”

For enterprise teams already on Google Cloud: the transition is probably smooth. For individual developers and open-source contributors: the deal changed.

If you have GEMINI.md files, review them — Antigravity CLI uses the same format. If you have MCP server configurations, check compatibility; the config schema is similar but not guaranteed identical across the major version boundary.

Verdict

Gemini CLI delivered on its core promise: a 1M-token context window, meaningful free access, Google Search grounding during coding tasks, and Apache 2.0 source. In the Express.js refactor benchmark it trailed Claude Code by 47 minutes and required three manual corrections. It had real reliability problems on long sessions and a CVSS 10.0 RCE in its CI integration.

If you were using it on the free tier: it was worth it while it lasted. Migrate before June 18.

For your next terminal AI coding agent:

  • Claude Code — the current benchmark leader, $20/month subscription, best code quality on complex tasks. No free tier. The strongest all-around choice for most developers.
  • Antigravity CLI — the direct successor for Google Cloud enterprise teams. Proprietary, no individual free tier.
  • Codex CLI — if you want OpenAI models in the terminal. Open source, sandboxed execution (which Gemini CLI lacked), no free tier.

The free terminal AI agent for individual developers is gone. That is the deal now.

Caveats

Benchmark numbers (SWE-bench Verified, Express.js refactor timing) are from published third-party sources — we did not re-run them independently. The CVSS 10.0 RCE analysis is based on public security advisories. Gemini CLI shipped weekly updates; behavior on versions older than v0.45.2 may differ. toolchew has no financial relationship with Google.

References