The AI CLI Landscape
Three tools, three philosophies, one mission: bring AI intelligence into your terminal without breaking your flow. This module maps the entire landscape — who built what, how each works under the hood, and when to reach for which.
Why CLI AI Tools Changed Everything
BEFORE: You hit a cryptic compiler error. You alt-tab to Chrome, type the error into Google, open three Stack Overflow tabs, find a partial answer that targets a different library version, mentally translate it to your specific codebase, switch back to your editor — and discover you've lost your train of thought entirely.
PAIN: Context switching is the developer's silent productivity killer. Every jump to a browser resets your working memory. Research shows it takes an average of 23 minutes to fully regain deep focus after an interruption. Multiply that by every question you Google in a day.
MAPPING: CLI AI tools collapse that loop. The tool already has your files open, knows your project structure, can run your tests to verify a fix, and proposes changes in-place — all without you leaving the terminal. It's not a search engine you query; it's a pair programmer who lives where you work.
The shift from "AI as chatbot" to "AI as terminal agent" happened between 2023 and 2025. GitHub Copilot for the IDE existed since 2021, but the jump to shell-native agents — tools that can read files, write code, execute commands, and iterate on failures — represented a qualitative leap. The three tools in this course represent the state of that landscape as it matures.
We cover Claude Code, Gemini CLI, and GitHub Copilot CLI as CLI/terminal agents. IDE plugins (VS Code Copilot, Cursor, etc.) are related but distinct products with different architectures and are not covered here.
The Three Tools
Each tool was built by a different company, for a slightly different primary use case, and with a different set of bets about what developers actually need from an AI in the terminal.
gh copilot suggest · gh copilot explain · GitHub Actions automation
You now have a mental model of three different products with three different bets:
- Claude Code bets on correctness and depth — slower, more deliberate, high accuracy.
- Gemini CLI bets on context size and speed — 5x larger window, faster iteration, free tier.
- Copilot CLI bets on shell convenience — not an autonomous agent, but a fluent translator for shell commands.
Architecture Deep Dive
Each tool processes your prompts through a distinct pipeline. Understanding these pipelines tells you why each tool behaves the way it does — not just what buttons to press.
gh copilot suggest "..." suggestgh copilot explain "..." explainClaude Code and Gemini CLI are agentic — they can take multi-step actions, spawn subprocesses, and iterate without asking you after every step. Copilot CLI is fundamentally a suggestion engine — it proposes a command and waits for you to run it. This isn't a flaw; it's a deliberate design choice for safety in the shell.
Here is what a basic shell interaction looks like in each tool's syntax — notice how differently they handle the same task:
# Claude Code — start an agentic session in your project
claude
# Then type: "Find all TODO comments, group them by file, and create GitHub issues for the critical ones"
# Claude reads files, groups results, asks for your GitHub token, creates issues.
# Gemini CLI — same task
gemini
# Then type: "Find all TODO comments, group them by file, and create a summary report"
# Gemini reads files (up to 1M tokens), writes report.
# GitHub Copilot CLI — suggest a shell command to find TODOs
gh copilot suggest "find all TODO comments in this repo and print them with file paths"
# Copilot suggests: grep -rn "TODO" . --include="*.py" --include="*.js"
# You press Enter to run it.
# Claude Code — start a session (PowerShell, Windows)
claude
# Prompt: "Find all TODO comments, group by file, create issues for critical ones"
# Gemini CLI — start a session
gemini
# Prompt: "Find all TODO comments and write a summary report"
# GitHub Copilot CLI — suggest a PowerShell command
gh copilot suggest "find all TODO comments in this repo with file paths"
# Copilot suggests: Get-ChildItem -Recurse -Include *.py,*.js |
# Select-String -Pattern "TODO" | Select-Object Path, LineNumber, Line
# You confirm and run.
Real-World Performance
The canonical benchmark for coding agents is SWE-bench Verified. It measures whether an agent can autonomously resolve a real GitHub issue — no hints, no partial credit. It's the closest we have to a standardized measure of "can this thing actually fix my code?"
Note: GitHub Copilot CLI is not designed for autonomous issue resolution and is not benchmarked on SWE-bench. Gemini score from Google's reported figures for Gemini 2.5 Pro in agent settings.
| Metric | Claude Code (Opus 4) | Gemini CLI (2.5 Pro) | Copilot CLI |
|---|---|---|---|
| SWE-bench score | 80.9% ★ | 63.8% | N/A (not agentic) |
| Context window | 200K tokens | 1M tokens ★ | ~128K tokens (varies) |
| Free tier | No (subscription) | 1,500 req/day ★ (Flash) | Requires Copilot plan |
| Open source | No | CLI is Apache 2.0 ★ | No |
| Autonomous multi-step | Yes (subagents) | Yes (Plan Mode) | Limited (suggest only) |
| Google Workspace | Via MCP tools | Native ★ | No |
| GitHub integration | Via gh CLI | Via extensions | Native ★ |
SWE-bench measures autonomous bug-fixing accuracy. But your daily productivity is also shaped by context window size (matters for large monorepos), iteration speed (Flash is fast), free tier generosity (matters for solo devs), and ecosystem integration. The "best" tool depends on your specific workflow — which is exactly what this course helps you determine.
Philosophy Differences
Architecture explains how each tool works. Philosophy explains why it makes the trade-offs it does. These three tools have meaningfully distinct world-views about what a "good" AI coding assistant should be.
Asks before performing destructive operations. Shows its reasoning before acting. Prefers correctness over throughput — it will stop and ask if something seems wrong rather than barrel forward.
Best when: correctness matters more than speed. Production systems, public APIs, code where a mistake costs money.
Optimized for throughput and large-scope operations. Acts with minimal friction by default. Plan Mode gives you oversight when you explicitly want it — but the default is "go."
Best when: you're doing large refactors, batch operations across many files, or need to read a huge codebase all at once.
Not trying to be an autonomous agent. It translates natural language into shell commands, explains commands you don't understand, and makes the terminal feel fluent. Intentionally conservative.
Best when: you mostly need shell command help and already pay for Copilot for your IDE.
Claude Code's "careful collaborator" philosophy is a direct result of Anthropic's Constitutional AI research — the model is trained to be cautious about irreversible actions (deleting files, pushing to main, making API calls that cost money). Gemini's aggressiveness reflects Google's bet that developers want throughput. Neither is wrong — they're different bets on developer preferences.
Context File Comparison
All three tools support a "project instructions" file — a markdown file you drop in your repository that tells the AI about your codebase, coding standards, and preferred behavior. This is one of the most important patterns in AI-assisted development: the AI reads your docs before it reads your code.
| Tool | Project File | Global File | Scope |
|---|---|---|---|
| Claude Code | CLAUDE.md |
~/.claude/CLAUDE.md |
Project + global override |
| Gemini CLI | GEMINI.md |
~/.gemini/GEMINI.md |
Project + global override |
| Copilot CLI | .github/copilot-instructions.md |
Not supported | Project only |
The patterns are nearly identical between Claude Code and Gemini CLI — which means the skills you learn writing one transfer directly to the other. Here's a side-by-side of what a real context file looks like:
# Project: Payment Service
## What this does
Stripe integration for subscription billing.
Python 3.12, FastAPI, PostgreSQL.
## Key rules
- NEVER commit .env files
- All DB migrations must be reversible
- Tests required for every endpoint
- Use pydantic v2 models (not v1)
## Run locally
```
uvicorn main:app --reload
pytest tests/ -v
```
## Deployment
- Staging: push to `develop`
- Prod: PR to `main`, requires 2 reviews
# Project: Payment Service
## What this does
Stripe integration for subscription billing.
Python 3.12, FastAPI, PostgreSQL.
## Key rules
- NEVER commit .env files
- All DB migrations must be reversible
- Tests required for every endpoint
- Use pydantic v2 models (not v1)
## Run locally
```
uvicorn main:app --reload
pytest tests/ -v
```
## Deployment
- Staging: push to `develop`
- Prod: PR to `main`, requires 2 reviews
Because CLAUDE.md and GEMINI.md follow the same conventions, many teams maintain a single "project context" document and symlink it. When you write a good CLAUDE.md, you're also writing a good GEMINI.md. We cover context file best practices in depth in M03.
Decision Framework
Knowing the tools is only useful if you know when to use them. Here's the decision logic distilled from real production teams who have adopted these tools at scale.
- Code correctness is critical — production systems, public-facing APIs, financial logic
- You're doing complex multi-step refactoring with many interdependencies
- You want to understand WHY a change is being made, not just see the diff
- You need subagents for parallel tasks — write tests while writing implementation
- Security and safety guardrails matter more than raw throughput
- Working in a large monorepo (>100K lines) where 200K context isn't enough
- You need Google Workspace automation — Docs, Sheets, Gmail integration
- You want a generous free tier for solo or hobby projects (1,500 req/day)
- Bulk operations across many files: rename, migrate, reformat at scale
- You prefer open-source tooling you can inspect and modify
- You need quick shell command suggestions — "how do I grep for X in Y"
- You're already paying for GitHub Copilot for your IDE
- GitHub Actions, PR automation, and workflow file generation is your focus
- You want minimal setup — already authorized via
gh auth login
- Large codebase: Gemini CLI to read the whole repo, Claude Code to make precise changes
- Mixed team: some devs prefer Claude's explanation style, others want Gemini's speed
- Cost optimization: Gemini's free tier for exploration, Claude for production tasks
- GitHub-heavy workflows: Copilot for PR/Actions, Claude for implementation
You have a complete mental model of the AI CLI landscape. You can now answer:
- What are the three major AI CLI tools and who makes each?
- What is SWE-bench and why does Claude Code lead it?
- What is the difference between an agentic tool (Claude, Gemini) and a suggestion tool (Copilot)?
- When would you reach for each tool in a real team setting?
Next module (M02) covers installation and first-run setup for all three tools — including getting your API keys, configuring your shell, and writing your first CLAUDE.md.
Knowledge Check
Test your understanding of the AI CLI landscape — 6 questions.