AI coding CLIs — Claude Code · Gemini CLI · Codex CLI · Aider · Plandex · OpenCode
AI coding CLIs — six in one place
Aside from in-IDE assistants, AI coding tools in terminal CLI form are growing on their own track. The motivations are friendliness with shells, SSH, and CI; script automation; and a lighter interface.
1. About these CLIs
Claude Code — Anthropic's official CLI. Released as a research preview in February 2025, then GA. Enter with the single command claude. Uses file edits, test runs, and git commands directly with the user's permissions. Acts as an MCP client.
Gemini CLI — open source from Google released in June 2025. github.com/google-gemini/gemini-cli. Apache 2.0. Default to Gemini, but other model backends are also addressed. The free tier is relatively well-known.
Codex CLI — the official CLI OpenAI released in 2025 (part of the new Codex lineup). openai/codex. Apache 2.0 open source. Tied to ChatGPT subscriptions and API keys.
Aider — open source started by Paul Gauthier in 2023. Site aider.chat. One of the earliest established coding-assistant CLIs. Uses various models (OpenAI · Anthropic · DeepSeek · local) with user-provided keys. Solid git integration makes per-change commits natural.
Plandex — open source released by Plandex AI in 2024. Site plandex.ai. Emphasizes multi-step planning, approval, and rollback. Self-hosting option.
OpenCode (sst/opencode) — open source the SST team released in 2024–2025. sst/opencode. Distinguished by various model integrations and a TUI (terminal UI).
Others:
- GH Copilot CLI — GitHub Copilot's shell helper. GA since 2024.
- shell_gpt · mods (Charm) · llm (Simon Willison) — shell-side place. Closer to shell helpers than coding assistants.
2. Release · license
| Tool | Release | License | Default model |
|---|---|---|---|
| Claude Code | 2025-02 (preview) | Proprietary (Anthropic) | Claude. |
| Gemini CLI | 2025-06 | Apache 2.0 | Gemini. |
| Codex CLI | 2025 | Apache 2.0 | OpenAI models. |
| Aider | 2023 | Apache 2.0 | Multiple (key-bring). |
| Plandex | 2024 | MIT (or OSS) | Multiple. |
| OpenCode | 2024 | MIT (example) | Multiple. |
| GH Copilot CLI | 2023~ | Proprietary | OpenAI series. |
The exact license and default model can shift over time. Check the official repo and docs.
3. Interface · MCP
| Tool | Interface |
|---|---|
| Claude Code | Conversational + commands + slash commands + MCP. |
| Gemini CLI | Conversational + non-interactive one-shot calls + MCP. |
| Codex CLI | Conversational + commands. |
| Aider | Conversational (/add · /diff · /commit). |
| Plandex | Plan → approve → apply, explicitly staged. |
| OpenCode | TUI · multi-pane. |
MCP support — most act as MCP clients or accept registration of external servers via tool integration:
- Claude Code — MCP client.
- Gemini CLI — MCP integration support.
- Codex CLI — MCP or proprietary tool integration.
- Aider — external tools mostly via shell command calls. MCP integration attempts.
- Plandex · OpenCode — proprietary tool model + external integration.
4. Autonomy levels
| Tool | Autonomy grain |
|---|---|
| Aider | Small-unit changes/commits — user-driven. |
| Claude Code | Per-step approval + auto-execute option. |
| Plandex | Plan/approve steps explicit. |
| Codex CLI · Gemini CLI | Mix of non-conversational and conversational modes. |
| OpenCode | Depends on user setup. |
Higher autonomy reduces user burden but amplifies the impact of mistakes. Pair it with the permission model and approval flow.
5. Other paths
Place of shell helpers — tools like shell_gpt, llm, and mods are closer to shell command generation and summarization than coding. Less about understanding a large codebase to change it, more about quickly producing one-line commands, explanations, and summaries with the model.
Non-interactive (headless) mode — for use in CI and scripts you need a mode where the tool is called once and exits without a person. Claude Code, Gemini CLI, Codex CLI, and Aider all have headless invocation options. JSON output options too.
IDE integration — most CLIs come with IDE extensions/plugins, or the CLI exists alone. Checking whether an IDE integration exists for the same tool gives a unified experience.
6. Common shapes
Aider's grain:
$ aider file1.py file2.py
> Tell it in natural language what to change.
Only added files become context. Changes are shown as a git diff and committed. Fast turnaround on small changes.
Claude Code's grain:
$ claude
> /init
> Analyze the current directory's codebase and draft CLAUDE.md.
Long-running work staged with per-step approvals. Combines with MCP and hooks.
Plandex's grain:
$ plandex new
> Describe the change intent → auto-generated plan → apply changes → approve/rollback
Treats large changes like a transaction.
CI automation — auto-review and test-helper at PR stage often use the headless mode. Cost and policy controls needed.
7. Environment variables
# Windows PowerShell
$env:OPENAI_API_KEY = "..."
# macOS · Linux
export OPENAI_API_KEY=...
Most CLIs support all three OSes. Some shell behavior may differ on Windows PowerShell · WSL.
8. Common pitfalls
Cost of auto-apply — misconfiguring a strongly autonomous tool applies unintended changes in bulk. Secure small units, git branches, and rollback.
Context overload — adding a large directory all at once fills tokens fast. Add only what's needed.
Plain-text credentials — keys leak via shell history and config files. Environment variables + secret manager.
Regression on model change — the same prompt behaves differently after switching models. Pin the model and evaluate.
Cost runaway — usage-based pricing balloons in autonomous modes. Quotas and alerts.
Permission ignorance — verify the range of commands the tool auto-executes.
Korean handling differences — Korean response stability differs across model and tool.
Logs and session retention — kept for debugging but may retain sensitive info.
Closing thoughts
The appeal of AI coding CLIs is the trio of headless mode + git integration + shell friendliness. Higher autonomy means stronger automation, but only when paired with the permission model + small units + git branches + cost caps does operational risk drop.
Next
- ai-workflow-tools
- ai-browser-assistants
We refer to Claude Code · Gemini CLI · OpenAI Codex CLI · Aider · Plandex · sst/opencode · llm (Simon Willison) · Charm mods · GitHub Copilot CLI.