What it is
Gemini CLI is Google's official command-line agent for the Gemini model family. Released open source under Apache-2.0 in 2025, it gives you a terminal-resident agent that can read files, run shell commands, browse the web through Google Search, and ship Google's own first-party extensions on top — Stitch, Google Workspace, Code Review, Postgres, Vertex AI and more.
It's the tool to reach for when:
- You want a generous free tier — Gemini CLI ships with a free Gemini API quota that comfortably covers daily coding loops.
- You already live in Google Cloud / Workspace and want first-party MCP into Vertex, BigQuery, Drive, Calendar.
- You want a terminal agent that's also good at multimodal — Gemini 2.5 / 3 handles images and video natively, and the CLI exposes that.
Why it stands out
| Feature | What it gives you |
|---|---|
| Free tier | Real free Gemini API quota — not a 14-day trial |
| 10 official extensions | Stitch, Workspace, Code Review, Postgres, Vertex AI, Cloud Run, Firebase, BigQuery, Maps, Calendar |
| Native multimodal | Drop screenshots, PDFs, video clips into the prompt — Gemini 3 reads them |
| MCP client | Connects to any MCP server, same as Claude Code |
| Long context | Gemini 2.5 / 3 with 1M-2M token windows for huge codebases |
| Search grounding | Google Search built in — agent can fetch live docs and citations |
| Apache-2.0 | Fully open source, vendor-pinning is your choice |
How to install
# macOS / Linux / WSL
npm install -g @google/gemini-cli
# Or via Homebrew
brew install gemini-cli
After install, run gemini in any project. The first run prompts for a Google account login or a GEMINI_API_KEY env var. Free tier kicks in immediately; switch to Vertex for SSO and audit logs in enterprise contexts.
What to install in Gemini CLI
Gemini CLI has its own extension manifest (~/.gemini/extensions.json) plus generic MCP support. Three TokRepo packs to start:
- MCP Server Stack — Postgres / GitHub / Filesystem servers that work cross-tool
- Google Cloud MCP Toolkit — Vertex AI, BigQuery, Cloud Run wired into Gemini CLI
- Multimodal Workflow Pack — image-to-Stitch, video transcript pipelines optimized for Gemini 3
Install with tokrepo install and you have parity with what Google's own internal teams have been demoing.
Common pitfalls
- Forgetting to pin the model — Gemini CLI defaults to "latest" which can move without warning. Set
GEMINI_MODEL=gemini-2.5-proor similar in.envfor reproducible runs. - Free tier rate limits during long agent loops — burst-throttle hits at ~60 req/min. Add backoff or switch to a paid Vertex project.
- Mixing OAuth login with CI — interactive login won't work in headless. Use a service-account key and
GEMINI_API_KEY. - Extension permission scope — Workspace and Calendar extensions read your full inbox / calendar. Audit
~/.gemini/extensions.jsonbefore sharing the directory. - Search grounding cost — every grounded response counts against the Search API quota separately from Gemini tokens.
- Vertex region defaults — Vertex projects default to
us-central1. If your data residency requires EU or APAC, setGOOGLE_CLOUD_LOCATIONbefore any agent run.
Relationship to other tools
Gemini CLI is Google's answer to Claude Code and Codex CLI. The three-way differentiator: Claude Code wins on pure agent quality (Opus 4.7 with the most mature subagent ecosystem and hooks system); Codex CLI wins on AGENTS.md convention adoption and tight ChatGPT integration; Gemini CLI wins on free tier, native multimodal, and Google Cloud integration. Most senior devs in 2026 keep all three installed and pick by task — Gemini for spec-from-screenshot or video transcript work, Claude for long refactors that need depth, Codex when paired with a ChatGPT Pro subscription. Because all three speak MCP, the same TokRepo packs configure all three with one command.
Most-installed for Gemini CLI
10 assets that work with Gemini CLI
Frequently asked questions
Is Gemini CLI free?
Yes. Gemini CLI itself is Apache-2.0 open source and the default Gemini API tier includes a free quota that covers most individual developer usage. You only pay if you exceed the free quota or move to Vertex AI for enterprise features (SSO, audit, regional residency).
What does Gemini CLI cost at scale?
Beyond the free tier, Gemini 2.5 Pro is roughly $1.25 per 1M input tokens and $5 per 1M output (subject to change — check ai.google.dev/pricing). Gemini 3 is priced higher. Vertex pricing matches the API but adds enterprise features.
Does Gemini CLI work with MCP servers?
Yes. As of late 2025 Gemini CLI is a full MCP client — any MCP server that works with Claude Code or Codex CLI also works here. You configure them in the same mcpServers block format. This is what unlocks portability of TokRepo packs across the three CLIs.
Gemini CLI vs Claude Code — which should I pick?
If you're price-sensitive or already on Google Cloud, start with Gemini CLI. If you need the most mature agent harness with the deepest subagent / hooks ecosystem and 1M-context Opus, pick Claude Code. They're not mutually exclusive — both speak MCP, so configs port over.
Can Gemini CLI run headless in CI?
Yes. Use gemini --print with a service-account key (GEMINI_API_KEY env var) and the CLI runs non-interactively. Common pattern: GitHub Actions job that runs Gemini CLI to do PR review using the Code Review extension.
Browse every tool on the home page
8 tools curated · favicon-fetched logos · type-aware bundles
Back to all tools