I Spent 3 Days with Google Gemini CLI — Here's My Honest Take
Last week I kept seeing Gemini CLI pop up all over Twitter. Google's new terminal-based AI coding agent, free to use, open source, with a 1 million token context window. My first reaction was: seriously, another one? Claude Code and Codex are already slugging it out — is Google showing up late to the party or trying to crash it?
Being the "I won't know until I try it" type, I spent about three days with Gemini CLI. Installation, daily coding, scripts, project-level refactoring — the whole deal. This article is my real experience, warts and all. No fanboy stuff, no haterade.
Why I Bothered Looking at Gemini CLI
Quick context. I've been using Claude Code as my primary tool, with Codex CLI on the side. Claude Code is genuinely powerful, especially for multi-file coordination and complex refactoring (10 Essential Claude Code Skills That Supercharge Developer Productivity). Nobody really touches it in that department. But here's the thing — it's expensive. API costs can easily hit $100-200/month, which stings if you're a solo dev or a small team watching the budget.
Codex CLI is better on that front — it's open source and free to install, but you still need an OpenAI API key and pay per token. ChatGPT Plus users can use it, but $20/month isn't nothing.
Then Google comes along and says: here's Gemini CLI, it's free, 1 million token context, 60 requests per minute, 1000 per day.
Honestly, I didn't buy it at first. There's no such thing as a free lunch, and Google's idea of "free" usually means your data is training their models. But curiosity won, and I installed it.
The Installation Saga
Installation itself is straightforward, but there are a few gotchas worth knowing about.
Basic Setup
Gemini CLI needs Node.js 18 or higher. If you don't have Node yet:
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
Then install Gemini CLI:
| 1 | |
Or with Homebrew on macOS/Linux:
| 1 | |
Verify it worked:
| 1 | |
Pitfall #1: Node Version
My server was running Node 16.x. After installing, I got:
| 1 | |
Straightforward fix, but if you're using nvm, set a default so you don't have to do this every time:
| 1 | |
Pitfall #2: npm Global Permissions
On Linux, global npm installs can hit permission errors:
| 1 | |
Two ways to fix this:
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
Go with option 1. Using sudo for global packages means you'll need sudo for every future upgrade and uninstall too. Annoying.
Pitfall #3: Network Issues
If you're behind a firewall or in a region with limited connectivity, the install might hang. Switch to a mirror registry:
| 1 | |
Authentication
Two ways to authenticate:
Option 1: Google Account (Personal Use)
Just run:
| 1 | |
First launch opens a browser for Google account authorization. Once done, you're good to go.
Free tier: 60 requests/minute, 1000 requests/day. For personal development, this is usually enough. During my heavy testing days, I used about 200-300 requests.
Option 2: API Key (Scripts/Servers)
For CI/CD or headless servers where you can't open a browser:
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
Add it to .bashrc for persistence:
| 1 | |
| 2 | |
Real-World Usage
Alright, it's installed, authenticated, let's see how it actually performs.
Basic Conversation
Starting Gemini CLI gives you an interactive terminal:
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
Gemini CLI generates code and asks if you want to execute it. The interaction is similar to Claude Code, but with one key difference — Gemini CLI doesn't automatically read your project context. You need to explicitly tell it which files to look at.
Code Generation Quality
I tested several common coding tasks:
Task 1: Building a FastAPI service
| 1 | |
The generated code was decent and mostly runnable. But it was textbook-ish — missing real-world details like proper error handling, logging, and input sanitization. Claude Code's output tends to be more production-ready out of the box.
Task 2: Refactoring existing code
This is where I really care about quality. I pointed Gemini CLI at a real project file:
| 1 | |
It read the file, proposed a refactoring plan, created the new file, and updated references. But it missed a couple of import updates, causing test failures. I had to fix two places manually before tests passed.
Typical experience: Gemini CLI handles about 80% of the work, but you need to clean up the remaining 20%.
Task 3: Debugging an error
This is where Gemini CLI actually shined. I pasted an error:
| 1 | |
| 2 | |
Quickly identified it as a Werkzeug version compatibility issue, gave me the fix (downgrade Werkzeug or update Flask), and included the exact pip commands.
Speed: Gemini CLI's Biggest Win
This genuinely surprised me. Gemini CLI is noticeably faster than Claude Code. Where Claude might take 10-20 seconds to start outputting on a complex request, Gemini CLI typically starts in 2-3 seconds.
Of course, speed doesn't equal quality. More on that later.
Context Capability
Gemini CLI uses Gemini 2.5 Pro with its claimed 1 million token context. I tested it on a small project with about 50 files:
| 1 | |
It ingested the entire project and gave a holistic analysis. Similar to Claude Code's agentic search, but the analysis was more surface-level. Claude Code digs deeper into actual code logic.
MCP Integration: Gemini CLI's Secret Weapon
Gemini CLI has something the others don't — built-in MCP (Model Context Protocol) support. This means you can add "tools" that Gemini CLI can call during conversations.
What's MCP?
In short, MCP is a protocol that lets AI agents call external tools. You could have Gemini CLI search documentation, query databases, or call APIs while it's writing code.
I covered MCP in detail in a previous article, What the Heck is MCP? A Full-Stack Dev's Practical Take, so I won't rehash that. Let me focus on how Gemini CLI's MCP integration works.
Setting Up MCP Servers
MCP configuration goes in ~/.gemini/settings.json:
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
Once configured, Gemini CLI can use these tools in conversations:
| 1 | |
It calls the GitHub MCP Server to search issues and returns the results.
Built-in Google Search
Beyond MCP, Gemini CLI has built-in Google Search:
| 1 | |
It searches Google and incorporates the results into its answer. Super useful for checking docs and API changes.
MCP Reality Check
MCP integration is Gemini CLI's differentiator, but it's still early. Configuring MCP Servers is fiddly, and not all servers work reliably. I tried filesystem and GitHub servers — filesystem was solid, GitHub occasionally timed out.
But the direction is right. As the MCP ecosystem matures, this will become increasingly powerful.
Deep Comparison: Gemini CLI vs Claude Code vs Codex
After three days, here's my detailed breakdown.
Code Quality
Claude Code produces the highest quality code. Its output is usually production-ready — error handling, edge cases, code style all considered. For complex multi-file tasks, Claude Code is clearly ahead.
Codex CLI is second. GPT-5.3 performs well on standard coding tasks — its Terminal-Bench 2.0 score is actually higher than Claude's (77.3% vs 65.4%). But for complex multi-step tasks, Claude's agentic capabilities win.
Gemini CLI is the most inconsistent. Sometimes the code is great, sometimes it has obvious bugs. My experience: roughly 50-60% of the time the code works directly, the rest needs manual fixes. Lines up with what other reviewers report.
Speed
Gemini CLI is fastest. Response time is the best of the three — typically 2-3 seconds to start outputting.
Claude Code is middle-of-the-pack. Fast Mode helps a lot, but default mode can be slow on complex requests.
Codex CLI is slowest. Network latency plus OpenAI API processing means 5-10 second waits for simple requests.
Context
Claude Code and Gemini CLI both support 1 million token context. Claude Code also has a Compaction API for "infinite conversations."
Codex CLI has 400K input + 128K output. Smaller but sufficient for most projects.
Tool Integration
Claude Code has the richest built-in tool integration — native Git, CI/CD, IDE plugins, Slack, the works.
Gemini CLI has MCP integration and built-in Google Search. Unique strengths, but the ecosystem is still developing.
Codex CLI is the lightest. Just runs in your terminal without much built-in tooling.
Pricing
- Claude Code: $100-200/month/developer
- Codex CLI: Free install, needs OpenAI API key (pay-per-use) or ChatGPT Plus ($20/month)
- Gemini CLI: Free (1000 requests/day), paid via Vertex AI for enterprise
For solo developers, Gemini CLI's pricing is a knockout.
When to Use What
Based on my experience:
Use Claude Code when:
- Large-scale refactoring
- High-accuracy requirements
- Multi-file coordination
- Enterprise projects
Use Codex CLI when:
- Daily coding assistance
- Interactive debugging
- Rapid prototyping
- You're already in the OpenAI ecosystem
Use Gemini CLI when:
- Budget is tight
- Rapid iteration on prototypes
- You need search integration
- Learning and experimentation
Hands-On: Building a Project with Gemini CLI
Let me walk through a real project I built using Gemini CLI.
Step 1: Project Setup
| 1 | |
| 2 | |
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
Gemini CLI generated about 150 lines across three files: main.py, models.py, database.py. Structure was okay, but missing CORS middleware, no ID collision handling, no logging.
Step 2: Iteration
| 1 | |
It made the changes. Logging config was rough — I tweaked it manually.
Step 3: Tests
| 1 | |
Got an 80-line test file covering create, redirect, and invalid URL scenarios. 3 of 5 tests passed — the other 2 had wrong test data. Quick fix, all green.
Step 4: Docker
| 1 | |
Solid output — multi-stage Dockerfile, docker-compose with environment variables and volume mounts.
Overall
The whole thing took about 1 hour. Faster than doing it myself, but the back-and-forth fixes added up. Claude Code would've been 30-40 minutes with higher quality. But Claude Code's price... yeah, depends on context.
Pro Tips for Better Gemini CLI
After a few days, I picked up some tricks.
Project-Level Configuration
Create a .gemini/ directory in your project root with a GEMINI.md file:
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
Gemini CLI reads this on startup. Way better than explaining your stack every conversation.
System Prompt
In ~/.gemini/settings.json:
| 1 | |
| 2 | |
| 3 | |
Pipe Input
Gemini CLI reads from stdin, which is great for scripting:
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
This is gold for CI/CD. Automated PR review, test failure analysis, changelog generation — all possible.
Batch Operations
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
Test on one file first before going batch. Trust me on this.
Team Use Cases
Code Review Automation
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
Not a replacement for human review, but great for catching obvious issues.
Documentation Generation
| 1 | |
| 2 | |
| 3 | |
Test Generation
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
Typically gets 70-80% coverage. The remaining edge cases are on you.
What's Coming Next
The AI coding agent space is getting competitive fast. A few trends I'm watching:
MCP ecosystem maturity. MCP lets agents call arbitrary tools — a fundamental capability expansion. As more MCP Servers ship, what these agents can do will keep growing.
Local models. Right now all three tools use cloud models. But as local models (Llama, Qwen, etc.) improve, fully local AI coding agents will emerge (Complete Guide to Local AI Deployment: Running Llama, Qwen, and GLM on Your Machine). Privacy-sensitive use cases will benefit first.
Multi-agent workflows. Today it's one agent per session. Tomorrow? Multiple agents collaborating — one writes code, one reviews, one tests. This could be a massive efficiency unlock.
Price war. Google's free strategy is already pressuring the market. I expect Anthropic and OpenAI to lower prices or offer more free tiers. Good for developers.
My Verdict
After three days of deep usage, here's where I land:
Gemini CLI is a genuinely good tool that happens to be free. It's not the best at anything except speed and price, but those two things matter a lot for many developers.
If you're a solo dev, student, or working on open source — Gemini CLI is a no-brainer. The price (zero) and the speed make it ideal for daily coding tasks, prototyping, and learning.
If you're working on production code where quality matters more than cost — Claude Code is still king. Nothing else matches its multi-file coordination and first-try accuracy.
If you want something in between — Codex CLI with a ChatGPT Plus subscription is a solid middle ground.
And if you're like me — install all three, use the right one for the right job. I use Gemini CLI for quick daily tasks (free), Claude Code for important projects (quality), and Codex for variety (different models sometimes give different perspectives).
- Written May 2026, based on the latest Gemini CLI version. AI tools evolve fast — specifics may change with updates.*