Gemini CLI vs Claude Code: The Shell Chore Receipt
01 / One shell chore, two explicitly priced setups
A log summary should not require a subscription decision. Neither should drafting a file-renaming script or diagnosing a failed backup. For these chores, compare the bill for a completed, verified task—not just the price beside a model name.
This comparison pairs Gemini CLI with Gemini 2.5 Flash and Claude Code with Claude Haiku 4.5. Google's published standard text rates are $0.30 per million input tokens and $2.50 per million output tokens, including thinking. Anthropic lists $1 input and $5 output for its model. These are provider reference prices, not quoted CheapRelay rates. ([ai.google.dev](https://ai.google.dev/gemini-api/docs/pricing?sid=4323e669-367d-4e2f-b0be-2b51d68ae70f&utm_source=openai))
The receipts below are hypothetical budgets, not measured runs. They assume paid API usage, no cache hits, and no additional services. Free allowances and subscription entitlements are outside this comparison.
02 / The receipt for a 20,000-token shell task
Imagine asking either tool to inspect selected backup logs, identify the failure, and draft a corrected command without executing it. Budget 20,000 total input tokens and 2,000 billable output tokens across the entire agent run. Those totals must include every request, not merely your opening prompt.
- ■ Gemini input: 20,000 / 1,000,000 × $0.30 = $0.006.
- ■ Gemini output: 2,000 / 1,000,000 × $2.50 = $0.005.
- ■ Gemini total: $0.011, or 1.1 cents.
- ■ Claude input: 20,000 / 1,000,000 × $1 = $0.020.
- ■ Claude output: 2,000 / 1,000,000 × $5 = $0.010.
- ■ Claude total: $0.030, or 3 cents.
At these published rates, 1,000 identical token budgets would cost $11 versus $30. The $19 difference is arithmetic, not evidence that either tool completes the same work with the same tokens or accuracy. ([ai.google.dev](https://ai.google.dev/gemini-api/docs/pricing?sid=4323e669-367d-4e2f-b0be-2b51d68ae70f&utm_source=openai))
03 / Retries and oversized logs change the receipt
If every task needed one complete retry with the same token budget, the totals would double to $22 and $60 per 1,000 tasks. A retry that carries additional history would need its own calculation. Claude's documentation explains that conversation history and files already read contribute to subsequent input. ([support.claude.com](https://support.claude.com/en/articles/14552983-models-usage-and-limits-in-claude-code?utm_source=openai))
Now assume local filtering reduces aggregate input from 100,000 to 20,000 tokens while output stays unchanged. The calculated saving is $0.024 per task for Gemini and $0.080 for Claude: $24 or $80 across 1,000 tasks. Filter locally with grep, jq, or a bounded tail before asking an agent to interpret the result. These are conditional savings, not observed results. ([ai.google.dev](https://ai.google.dev/gemini-api/docs/pricing?sid=4323e669-367d-4e2f-b0be-2b51d68ae70f&utm_source=openai))
04 / What each CLI gives a shell wrapper
Gemini CLI supports noninteractive prompts through -p and JSON output through --output-format json; its JSON response includes usage statistics. That makes it a practical candidate for a wrapper that stores both the answer and its token receipt. ([geminicli.com](https://geminicli.com/docs/cli/headless/?utm_source=openai))
Claude Code also supports -p, structured output, and tool allowlists. Its CLI exposes --max-budget-usd for noninteractive runs. These controls are useful when a chore involves inspecting files and iterating, rather than producing one standalone command. They do not establish a quality advantage. ([code.claude.com](https://code.claude.com/docs/en/headless))
For either tool, my default would be read-only inspection, a proposed change, then explicit approval. Validate renamed-file counts, backup exit status, or parsed JSON locally; a confident explanation is not an acceptance test.
05 / Cache charges belong on separate receipt lines
Do not price every input token as fresh when usage records report cache activity. Anthropic lists separate cache-write and cache-read rates. Google likewise lists cached-input pricing and explicit cache-storage charges. Apply only the categories actually reported by your route; do not assume every repeated prompt receives a discount. ([platform.claude.com](https://platform.claude.com/docs/en/models/haiku-4-5/overview?utm_source=openai))
06 / Use CheapRelay to compare actual completed-task bills
CheapRelay offers one key for both model families and works with both CLIs, with pay-as-you-go billing for actual tokens, including cache reads and writes, and no monthly subscription. Use its applicable rates and billing records rather than treating these provider-price examples as a relay quote.
Sign up for CheapRelay, run ten representative chores through each setup, and divide total charges by verified successes. Record retries and manual corrections separately. My starting choice would be Gemini for tightly bounded, price-sensitive chores; I would retain Claude wherever the trial demonstrates fewer corrections. Let the completed-task receipt decide.
S'inscrire Testez les prix, crédit d’inscription inclus.
Pour continuer
| Date | Rayon | Langue | Titre |
|---|---|---|---|
| 2026-10-25 | Agents de code à petit prix | EN | Coding Assistant Habits That Double Your Bill A receipt-style breakdown shows how oversized prompts and verbose answers turn a $0.60 coding session into $1.20, before retries. |
| 2026-10-25 | Agents de code à petit prix | EN | Three AI CLIs, One Desktop, a $30 Budget A receipt-style plan for running Claude Code, Codex and Gemini CLI together, with a $30 usage budget and no invented token prices. |
| 2026-10-25 | Agents de code à petit prix | EN | Coding Agents in CI: A $0.50 Pipeline Budget Build a receipt for every coding-agent run, reserve spend before requests, and stop retries before they turn a small fix into a large bill. |
| 2026-10-25 | Agents de code à petit prix | EN | Claude Code on Windows: A PowerShell Cost Receipt Configure Claude Code with PowerShell environment variables, then audit a four-line token receipt without confusing example rates with real prices. |
| 2026-10-25 | Agents de code à petit prix | EN | Cheap First, Escalate Later: A Coding Cost Receipt A worked token receipt shows how cheaper-first pair programming can cut API spending, with clear rules for escalating without wasting developer time. |
| 2026-10-25 | Agents de code à petit prix | EN | Coding Agent Memory Files: Show Me the Receipt A concrete cost breakdown of coding agent memory files: repeated input, cache reads, maintenance, and the point where useful instructions pay off. |