Gemini CLI Introduction 2026 — The Free Terminal AI Agent Tested
Gemini CLI Introduction 2026 — The Free Terminal AI Agent Tested
“Claude Code is convenient, but the $20/month Pro contract plus token billing on top adds up.” “Cursor’s subscription is fine but I am a terminal person and the IDE feels heavy.” This fourth article in the series introduces the option that may be the most practical for makers and hardware-leaning engineers: Gemini CLI.
So far the series has covered Gemini 3.1 Pro’s model lineage, prompt design, and NotebookLM integration. Today the ground shifts to assembling those foundations into an open-source agent that lives in your terminal. Gemini CLI is published under the Apache 2.0 license; the full source is at github.com/google-gemini/gemini-cli. Alongside Claude Code (partly OSS) and Codex CLI (OSS), it forms the “terminal AI agent big three” with distinct strengths and weaknesses.
Why You Want a Terminal-Based AI Agent
IDE-integrated AI like Cursor binds tightly to the editor GUI. That suits large project work, but it is overkill for “I need to tweak the Klipper config on the Raspberry Pi over SSH,” “Let me adjust this sysctl value,” or “Quick script inside the Docker container.” Terminal AI agents fill the gap between “I do not want to open the GUI” and “But I still want AI assistance.”
On SSH-connected remotes, in CI/CD pipelines, inside Docker containers, in Vim or Emacs workflows — anywhere the terminal is the primary surface, a CLI agent integrates more cleanly than any GUI tool.
Installation — Two Lines on Most Systems
Node.js 20 LTS or later is the only prerequisite. Install globally:
npm install -g @google/gemini-cli gemini
The first run prompts for authentication. Three options: Google sign-in (uses your AI Pro/Ultra subscription quota), API key (Developer API), or Workload Identity (Enterprise Platform). For individual use on a Google AI Pro plan the sign-in route is best — your existing subscription covers usage without separate billing setup.
Daily Workflow — Five Patterns That Stick
1. Inline Edit Mode
Run gemini inside a project directory. The agent reads files, proposes diffs, and applies them with your approval. Unlike Claude Code’s persistent session model, Gemini CLI defaults to single-task scope, which keeps token usage predictable.
2. Pipe Mode
Pipe data into Gemini for one-shot processing: cat printer.cfg | gemini "Identify any deprecated settings". Combined with jq, grep, and shell loops this turns Gemini into a powerful inline filter.
3. Script Mode (–prompt-file)
For reproducible runs, store the prompt in a file and reference it: gemini --prompt-file analyze.md --output result.json. Excellent for CI workflows where deterministic output is required.
4. MCP Integration
Gemini CLI added MCP (Model Context Protocol) client support in late 2025. Register MCP servers in ~/.gemini/mcp.json and Gemini CLI uses them transparently. This is the same MCP standard Claude Code adopts — write a server once, reuse across agents.
5. Jules Extension
The newest addition: install Jules as a Gemini CLI extension to delegate long-running tasks asynchronously. gemini extensions install https://github.com/gemini-cli-extensions/jules --auto-update. Hand off the refactor to Jules, get back to coding immediately, review the PR when it lands.
Strengths vs Claude Code and Codex CLI
| Dimension | Gemini CLI | Claude Code | Codex CLI |
|---|---|---|---|
| Cost (subscription) | Bundled with AI Pro $19.99 | $20 + $5-200 token bill | Bundled with ChatGPT Plus $20 |
| License | Apache 2.0 (full) | Partial OSS | Apache 2.0 |
| Context window | 1M tokens | 200K tokens | 200K tokens |
| Coding (SWE-bench) | 74.2% | 80.8% | 73.5% |
| Reasoning (ARC-AGI-2) | 77.1% (best) | ~32% | ~28% |
| Pipe-friendly | Excellent | Good | Excellent |
| Long-running tasks | Via Jules extension | Native sessions | Manual workarounds |
Gemini CLI wins on cost transparency (no separate token billing for subscribers), reasoning depth, and context window. Claude Code remains the leader for pure coding fluency. Codex CLI is the lightest install if you live in the ChatGPT ecosystem already.
Concrete Examples for Makers
- printer.cfg cleanup:
gemini "Review printer.cfg, list deprecated parameters, propose modernised replacements". Outputs a diff in under 30 seconds. - Slicer profile diff:
diff old.ini new.ini | gemini "Explain what changed in plain terms". Useful when sharing profiles in maker communities. - Failure-log triage: pipe a Klipper log into Gemini with a prompt that classifies events as critical, warning, info. Pair with a cron job to send a daily digest.
- Documentation generation:
gemini "Write a README for this repo"with an explicit format constraint. The 1M context window lets you fit even large repos in a single pass.
Quotas, Limits, and Gotchas
- AI Pro subscribers get generous per-day quotas, but heavy use can hit a soft cap by late afternoon. The CLI shows the warning; switch to API key mode if you regularly hit the cap.
- Terms of Service: while the code is Apache 2.0, the ToS prohibits using “third-party software” to access the underlying Gemini service. Use the official CLI for production work.
- File modification scope: Gemini CLI defaults to working only in the current directory. Toggle
--workspaceto expand. Be deliberate. - Telemetry is opt-out, not opt-in. Run
gemini config telemetry offon first use if you prefer.
Conclusion — Install Today, Pick Up Speed This Week
If you are already on Google AI Pro, the marginal cost of adopting Gemini CLI is zero. The first week is about replacing one routine task with the CLI equivalent (printer.cfg review or daily log triage). After that, the Jules extension turns the CLI into a launchpad for long-running asynchronous work — the topic of tomorrow’s article.





