Last updated: November 16, 2026
The best CLI coding agents for 2027 are Claude Code for the most capable all-round terminal agent, OpenAI Codex CLI for an open-source agent tied to ChatGPT plans, and Gemini CLI for a free, open-source option with a large context window. GitHub Copilot CLI, Cursor CLI, Aider, OpenCode, Goose, Amp and Qwen Code complete the list.
Terminal agents fit how many engineers already work: they read the repo, run commands, edit files and commit, and they script well into CI and automation. Several are open source and model-agnostic. For editor-based tools, see best AI coding agents for 2027.
| Tool | Made By | Pricing | Best For |
|---|---|---|---|
| 1. Claude Code | Anthropic | Claude plans or API usage | Complex, multi-step engineering tasks |
| 2. Codex CLI | OpenAI | ChatGPT plans or API usage | Teams on ChatGPT plans |
| 3. Gemini CLI | Generous free tier | Cost-conscious developers | |
| 4. GitHub Copilot CLI | GitHub | Included in Copilot paid plans | Teams already paying for Copilot |
| 5. Cursor CLI | Anysphere | Uses Cursor plans | Cursor users who also script in the terminal |
| 6. Aider | Open-source project | Free; pay for your own model API | Developers who want git-native, model-agnostic editing |
| 7. OpenCode | Open-source project | Free; bring your own model | Developers who want any model in a modern terminal UI |
| 8. Goose | Block | Free, open source | Teams building custom automations on MCP |
| 9. Amp | Sourcegraph | Usage-based | Developers who want minimal restrictions on the agent |
| 10. Qwen Code | Alibaba Qwen team | Free tier; model usage | Developers using open-weight Qwen coder models |
We compared CLIs on agent capability on real repos, open-source status and model flexibility, permission and sandbox controls, MCP and extension support, scripting and CI use, and pricing. Facts come from official repositories and documentation.
Claude Code offers planning, subagents, hooks, MCP, plugins and skills, with permission modes and a headless mode for CI.
Made by: Anthropic. Pricing: Claude plans or API usage. Best for: Complex, multi-step engineering tasks.
Codex CLI is open source, runs commands in a sandbox with approval modes and connects to Codex cloud for parallel tasks.
Made by: OpenAI. Pricing: ChatGPT plans or API usage. Best for: Teams on ChatGPT plans.
Gemini CLI brings Gemini models to the terminal with MCP support, extensions and a large free usage allowance.
Made by: Google. Pricing: Generous free tier. Best for: Cost-conscious developers.
Copilot CLI brings the Copilot agent to the terminal with GitHub context, MCP support and the same policies as other Copilot surfaces.
Made by: GitHub. Pricing: Included in Copilot paid plans. Best for: Teams already paying for Copilot.
Cursor CLI runs Cursor’s agent in any terminal and in CI, sharing rules and models with the editor.
Made by: Anysphere. Pricing: Uses Cursor plans. Best for: Cursor users who also script in the terminal.
Aider edits code in your git repo and commits changes automatically, working with many models.
Made by: Open-source project. Pricing: Free; pay for your own model API. Best for: Developers who want git-native, model-agnostic editing.
OpenCode supports many model providers, LSP integration and a rich terminal interface.
Made by: Open-source project. Pricing: Free; bring your own model. Best for: Developers who want any model in a modern terminal UI.
Goose is a local, extensible agent built around MCP extensions, usable from the CLI or desktop app.
Made by: Block. Pricing: Free, open source. Best for: Teams building custom automations on MCP.
Amp’s CLI and editor extension share threads and focus on letting strong models work autonomously.
Made by: Sourcegraph. Pricing: Usage-based. Best for: Developers who want minimal restrictions on the agent.
Qwen Code adapts the Gemini CLI approach for Qwen’s coder models, popular with teams preferring open weights.
Made by: Alibaba Qwen team. Pricing: Free tier; model usage. Best for: Developers using open-weight Qwen coder models.
It is an AI agent that runs in your terminal, reading your repository, running commands, editing files and committing changes.
Gemini CLI has a generous free tier, and Aider, OpenCode and Goose are free open-source tools where you pay only for model usage.
Claude Code is not open source, though it is highly extensible. Codex CLI, Gemini CLI, Aider, OpenCode and Goose are open source.
Yes. Most support headless or non-interactive modes for use in CI pipelines.
MCP And AI Coding Agents hub, Claude Code vs Gemini CLI vs Codex CLI, Best AI terminals, Top Claude Code plugins and skills.