Gemini CLI
Gemini CLI for one-shot Q&A, summaries, and generation. Use Gemini models from the command line.
Tags: ai, llm, gemini, google, generation
Category: AI
Use Cases
- Free AI coding assistance for personal projects
- Research-grounded code generation with Google Search
- Automated PR reviews via GitHub Action
- Quick code explanations and debugging
- Non-interactive scripted generation in CI/CD pipelines
- Exploring unfamiliar codebases with 1M token context
Tips
- Use `npx @google/gemini-cli` for quick one-off use without installation
- Create a GEMINI.md in your project root for persistent context (like CLAUDE.md)
- Use `--non-interactive` for scripted workflows and CI/CD pipelines
- Google Search grounding is the killer feature — use it for research-heavy tasks
- Pair with the GitHub Action for automated PR reviews on your repos
- Use conversation checkpointing to save and resume complex sessions
- For OpenClaw, use as a secondary agent for tasks where real-time search matters
Known Issues & Gotchas
- Free tier has rate limits: 60 requests/min and 1,000 requests/day — may not be enough for heavy use
- Agentic coding quality lags behind Claude Code and Codex — the harness is less mature
- Requires Node.js runtime (npm-based installation)
- Google account login flow requires a browser — may not work in headless environments
- MCP support is still evolving — not all MCP servers work perfectly
- GEMINI.md context files are project-specific — no global config equivalent
- Nightly builds may contain regressions — stick to stable releases for production use
Alternatives
- Claude Code
- Codex CLI (OpenAI)
- Aider
- Oracle (steipete)
Community Feedback
I'm a Principal SWE at my company. We've been heavily using Claude Code and Codex. My boss just got us Ultra Google plans because he believes Gemini CLI will be very very good. I've used it, and tbh it was so buggy and the harness itself was just not engineered very well even though the Gemini models are extremely capable.
— Reddit r/GeminiCLI
Gemini CLI is an open-source AI agent that brings the power of Gemini directly into your terminal. It provides lightweight access to Gemini, giving you the most direct path from your prompt to our model.
— Google Blog
Comparing Codex CLI vs Claude Code vs Gemini CLI — AI coding tools in your terminal. Each has distinct strengths: Codex for auto-building, Claude Code for thoughtful refactoring, Gemini CLI for research-grounded tasks.
— Medium
Gemini CLI stands out with its generous free tier (60 RPM, 1000 RPD), 1M token context, and Google Search integration for real-time info.
— Analytics Vidhya
Configuration Examples
Install and authenticate
# Install globally
npm install -g @google/gemini-cli
# Or use Homebrew
brew install gemini-cli
# First run triggers Google account auth
geminiNon-interactive one-shot
# Quick code generation
gemini --non-interactive "Write a Python function to parse CSV files with error handling"
# With specific model
gemini --model gemini-3-pro --non-interactive "Explain this error: $(cat error.log)"Project context file (GEMINI.md)
# GEMINI.md
## Project: My Web App
- Framework: Next.js 15 with App Router
- Language: TypeScript
- Database: PostgreSQL with Prisma
- Style: Tailwind CSS
## Conventions
- Use server components by default
- Error handling: always use try/catch with typed errorsInstallation
brew install gemini-cliHomepage: https://ai.google.dev/
Source: bundled