Gemini CLI is an Apache 2.0 terminal agent with a genuinely free tier: 60 requests a minute and 1,000 requests a day on a personal Google account, with Gemini 3 models and a 1M token context window. Claude Code has no free tier and starts at $20/mo through Claude Pro, and buys you a deeper harness, more surfaces, and spend ceilings on unattended runs. Gemini CLI is the strongest free option in the category and the right place to start if you are unsure.
- Gemini CLI has a real free tier: 60 requests/min, 1,000/day, no trial clock.
- It is Apache 2.0; Claude Code is proprietary and has no free tier.
- Both now reach 1M tokens of context. That gap closed in 2026.
- Claude Code has the deeper harness: hooks, subagents, skills, MCP, budget ceilings.
- Both run headless with
-p, and both can emit JSON. - There is almost no reason not to have Gemini CLI installed alongside whatever you pay for.
Side by side
Read from each project’s own documentation in August 2026.
| Claude Code | Gemini CLI | |
|---|---|---|
| Cost | $20 to $200/mo | Free tier, then per token |
| License | Proprietary | Apache 2.0 |
| Free allowance | None | 60 requests/min, 1,000 requests/day |
| Context window | 1M tokens on current models | 1M tokens with Gemini 3 |
| Headless | Yes, claude -p | Yes, gemini -p |
| Machine-readable output | --output-format json, --json-schema | --output-format json |
| Spend ceiling per run | Yes, --max-budget-usd | No, the daily cap is the ceiling |
| Extensibility | Hooks, subagents, skills, MCP | MCP, extensions |
| Surfaces beyond the terminal | IDE, desktop app, web, mobile | Terminal, plus IDE integrations |
| Ecosystem maturity | Larger for agent tooling | Very large repository, moving fast |
What the free tier actually gives you
The numbers are published and they are not small. Sign in with a personal Google account and you get 60 requests per minute and 1,000 requests per day, against Gemini 3 models with a 1M token context window.
Gemini CLI authentication routes, from the project README, August 2026.
| Route | Allowance | Best for |
|---|---|---|
| Google account OAuth | 60 requests/min, 1,000 requests/day | Individual developers, no billing setup |
| Gemini API key | 1,000 requests/day with Gemini 3, then usage-based billing | Choosing a specific model, higher limits |
| Vertex AI | Higher limits with a billing account | Enterprise security and compliance |
| Gemini Code Assist license | Per your organization’s plan | Company-provided access |
That still leaves it in a category of one. Everything else with a comparable free allowance is a trial, a completion-only tool, or a rate-limited demo. This is the whole product, with the tool loop, for nothing.
The context window gap closed
For most of 2025, "Gemini has a much bigger context window" was the strongest single argument for Gemini CLI, and it was true. It is no longer a differentiator.
- Gemini CLI reaches 1M tokens of context with Gemini 3 models.
- Claude 4.6 and later models include the full 1M token context window at standard pricing, with no long-context surcharge. Anthropic states that a 900k-token request is billed at the same per-token rate as a 9k-token request.
- Prompt caching applies across the full window on both sides, which matters more than the raw number for a tool loop that re-reads context every turn.
Headless, both ways
Both take a prompt as an argument and both can emit structured output, which makes either one usable in a pipeline. The difference is in the guardrails around the run.
# Gemini CLI: text out
gemini -p "Explain the architecture of this codebase"
# Gemini CLI: structured out
gemini -p "Explain the architecture of this codebase" --output-format json
# Claude Code: structured out with a hard ceiling on cost and turns
claude -p "review the changed files for security issues" \
--output-format json --max-turns 12 --max-budget-usd 2
# Both accept piped input
git diff main --name-only | claude -p "review these files"
- Gemini CLI cannot run away with your money on the free tier, because the daily request cap stops it. That is a real safety property and it is easy to overlook.
- Claude Code needs an explicit ceiling, because a subscription window or an API key will both let a loop keep going.
--max-budget-usdand--max-turnsexist for exactly this. - Check the free tier terms before you automate against them. Terms for unattended or automated use are usually different from interactive use.
What happens when the free tier is not enough
The interesting question is not whether the free tier is good. It is what your next step costs once you outgrow it, and the two products send you in different directions.
| Next step | What it costs | What you get |
|---|---|---|
| Gemini API key | Usage-based billing past 1,000 requests/day | Same CLI, specific model choice, higher limits |
| Vertex AI | Billing account, enterprise rates | Higher rate limits, security and compliance controls |
| Gemini Code Assist license | Set by your organization | Company-provided access and admin controls |
| Claude Pro | $20/mo, or $17 billed annually | Claude Code across terminal, IDE, desktop, web, mobile |
| Claude Max 5x | $100/mo | Five times the Pro usage per session |
| Claude Max 20x | $200/mo | Twenty times the Pro usage per session |
A subscription and a metered key fail in opposite directions, and that is the actual choice here. A metered key never blocks you and never stops billing you. A subscription blocks you at a predictable moment and never surprises you on the invoice. Claude Pro pauses when the five-hour window is spent and reopens on its own; Max subscribers also carry two weekly limits, one across all models and one for Sonnet only, that reset at a fixed time each week.
When free is the right answer
| Situation | Pick |
|---|---|
| Student or learning | Gemini CLI |
| Side projects and occasional use | Gemini CLI |
| Finding out whether agentic coding suits you at all | Gemini CLI |
| A second opinion when your paid agent is stuck | Gemini CLI |
| You cannot expense a subscription | Gemini CLI |
| Daily professional work | Claude Code |
| You want hooks, subagents, skills, and CLAUDE.md | Claude Code |
| Unattended jobs that need a spending cap | Claude Code |
| You want the session to follow you to a desktop app or phone | Claude Code |
| You already pay for Claude | Claude Code, it is included |
Install both in five minutes
Install Gemini CLI
Run it with no install using npx @google/gemini-cli, or install with npm install -g @google/gemini-cli, brew install gemini-cli, or sudo port install gemini-cli.
Sign in with a Google account
The OAuth route is the one with the 60 per minute and 1,000 per day allowance. Skip the API key unless you need to pin a specific model or exceed the daily cap.
Install Claude Code
On macOS, Linux, or WSL: curl -fsSL https://claude.ai/install.sh | bash. On Windows PowerShell: irm https://claude.ai/install.ps1 | iex. It needs a Claude subscription or an Anthropic Console account.
Run both on the same task, in the same repo
Not a toy prompt. Pick something with a test. Then compare the diffs rather than the transcripts, because the transcript is theater and the diff is the product.
Keep the free one installed either way
Even after you pay for something, Gemini CLI costs nothing to leave on disk and covers two cases well: a second opinion when your main agent is looping, and continuing to work when a subscription window is spent.
Running both
There is very little reason not to have Gemini CLI installed even if you pay for something else. It is free, it is a full agent, and it covers the two moments where a single-agent setup hurts: when your main agent is confidently wrong, and when its window is spent and you still have an hour of work left.
Questions people ask
Yes, genuinely. Signing in with a personal Google account gives 60 requests per minute and 1,000 requests per day against Gemini 3 models, with no trial clock. The tool itself is Apache 2.0 licensed. It is the strongest free option among terminal coding agents.
For harness depth, spend ceilings on unattended runs, and surfaces beyond the terminal, yes. Whether that is worth $20 a month depends entirely on how much you use it. For occasional work, Gemini CLI is enough and the difference will not show up in your week.
Neither, as of August 2026. Gemini 3 models give Gemini CLI 1M tokens, and Claude 4.6 and later models include the full 1M token window at standard pricing with no long-context surcharge. This used to be Gemini CLI’s strongest argument and it no longer is.
No. Claude Code requires a paid Claude plan starting at $20/mo for Pro, or an Anthropic Console account billed per token. There is no student rate and no free allowance as of August 2026.
An API call, not a prompt. A single agent turn that reads several files, runs a command, reads the output, and edits code spends more than one request. Plan around 1,000 a day being a real working allowance rather than 1,000 conversations.
Yes, and there is little reason not to. Gemini CLI costs nothing, gives you a second opinion when your paid agent is stuck in a loop, and keeps you working when a five-hour window is exhausted.
Yes. It runs non-interactively with gemini -p "your prompt" and can emit structured output with --output-format json. Check the free tier terms for automated use, which are usually different from interactive use, and consider an API key or Vertex AI for anything scheduled.
Gemini CLI. It is free, it is a real terminal agent rather than a demo, and hitting its ceiling teaches you whether a paid tool is worth buying. Starting with a $20 subscription you cannot evaluate is the more expensive mistake.
Sources
Every figure above was read from these pages on August 2026. Vendors reprice without notice; if you find a stale number, tell us.