Compare 12 CLI coding agents — Claude Code, Aider, OpenAI Codex CLI, Gemini CLI, Plandex and more — by license, model support, pricing, context window, and autonomy. Updated for 2026

CLI Coding Agents — 12 GitHub Copilot Alternatives for the Terminal

CLI coding agents are terminal-resident AI tools that take a natural-language task, plan multi-file edits, run shell commands and tests, and iterate until the task is finished — all without an IDE. They sit between IDE-embedded assistants like GitHub Copilot (which suggest as you type) and cloud agents like Devin (which run remotely on your behalf, often outside your machine entirely). This page compares 12 CLI agents across license, model support, pricing, context window, and autonomy mode, so you can pick the right one for your workflow in one screen.

Last reviewed: April 2026.

Quick verdicts

  • Best overall: Claude Code — the most consistent agentic loop, deep codebase awareness, strong tool-use.
  • Best open-source: Aider — repo-map intelligence, automatic git commits per change, BYOM with any LLM.
  • Best free tier: Gemini CLI — free with a Google account, plus a 1M-token context window for large monorepos.
  • Best for huge codebases: Gemini CLI for raw context size; Plandex for tasks that span dozens of files with a structured plan.
  • Best for plan/execute discipline: Plandex — separates planning from execution, with version-controlled diffs.
  • Best AI-native terminal: Warp — agent capabilities embedded in the terminal itself.

Looking for an autonomous cloud software engineer rather than a CLI tool? See dedicated profiles for Devin and OpenHands. Looking for a self-hosted Copilot-style autocomplete server? See FauxPilot. Those are different categories from the agents covered here.


CLI agents at a glance — 2026 comparison

The matrix below is the buyer cheat-sheet. Each tool is judged on the eight axes that matter for picking a CLI coding agent. Pricing reflects publicly listed plans at the time of review.

Tool License Default model(s) BYOM (your API key) Pricing Context window MCP support Autonomy mode OS
Claude Code Proprietary Claude Opus / Sonnet No Bundled with Anthropic Pro/Max; metered API ~200K Yes Iterative agentic loop macOS, Linux, Windows (WSL)
Aider Apache-2.0 (open-source) Any (Claude, GPT, Gemini, DeepSeek, local) Yes Free (you pay your model API) Model-dependent Partial Pair-programming + auto-commit macOS, Linux, Windows
OpenAI Codex CLI Open-source (Apache-2.0) OpenAI (GPT-5 / o-series) Yes (OpenAI key) Per-token via OpenAI API OpenAI model context Yes Iterative agentic loop macOS, Linux, Windows
Gemini CLI (listing pending) Open-source (Apache-2.0) Google Gemini Pro / Flash Yes (Google API key) Free tier with Google account; metered above quota Up to 1M Yes Iterative agentic loop, search-grounded macOS, Linux, Windows
GitHub Copilot CLI (listing pending) Proprietary GitHub Copilot models (GPT-5, Claude options) Limited Requires Copilot subscription (counts against premium-request quota) Model-dependent Yes Single-shot + agent mode macOS, Linux, Windows
Plandex MIT (open-source) Any (Claude, GPT, others) Yes Free self-hosted; cloud tier optional Model-dependent Partial Plan-first, then execute, with version control macOS, Linux, Windows
Goose Apache-2.0 (open-source) 15+ providers incl. local Ollama Yes Free Model-dependent Yes (native MCP) Iterative agentic loop macOS, Linux, Windows
Warp Proprietary (free tier) Multi-model (Claude, GPT, others) Partial Free tier; paid tiers for teams Model-dependent Yes Inline + agent mode macOS, Linux, Windows
Amp Proprietary (Sourcegraph) Multi-model Limited Subscription Model-dependent Yes "Deep" extended-reasoning mode macOS, Linux, Windows
opencode (listing pending) MIT (open-source) 75+ providers via Models.dev Yes Free Model-dependent Yes Multi-session parallel agents macOS, Linux, Windows
Cursor CLI Proprietary Anthropic / OpenAI Limited Bundled with Cursor subscription Model-dependent Partial Single-shot + agent macOS, Linux, Windows
Amazon Q Developer (CLI) Proprietary (AWS) Amazon Q models No Free tier; Pro at usage tier Model-dependent Limited Agentic, AWS-aware macOS, Linux, Windows

How to read this table. If your priority is offline operation, look at the BYOM column plus any tool that lists local models (Aider, Goose, opencode). If your priority is huge codebases, look at the context window column (Gemini CLI). If you want zero recurring fees, scan License + Pricing for "free" or "open-source" combinations. If you need extensibility (custom tools, internal APIs), MCP support is the right column.


The 12 best CLI coding agents reviewed

Each profile below is structured the same way: one-line definition, a four-field spec block, a "Best for" tag, and a paragraph on the signature feature that distinguishes it from the rest of the pack.

1. Claude Code

Anthropic's terminal-resident agent built on Claude Opus and Sonnet. Targeted at developers who want a single tool to plan, edit, run tests, and iterate without leaving the shell.

  • Models: Claude Opus / Sonnet (Anthropic-only)
  • License: Proprietary
  • Pricing: Bundled with Anthropic Pro / Max plans; metered API access also supported
  • BYOM: No

Best for: Teams already paying for Anthropic, anyone whose primary criterion is "the agent that actually finishes the task without losing the thread."

Signature feature: The strongest sustained agentic loop on the market — Claude Code reads the repo, builds a working plan, edits multiple files, runs tests, reads test output, and corrects course without manual nudging. Users running it through a managed UI may also want Opcode, a desktop GUI for Claude Code sessions.

2. Aider

The flagship open-source CLI pair-programmer. Aider lives inside your repository and treats the AI as a collaborator that commits to git after every accepted change.

  • Models: Any (Claude, GPT, Gemini, DeepSeek, local via Ollama)
  • License: Apache-2.0 (open-source)
  • Pricing: Free — you pay only your model API costs
  • BYOM: Yes (full)

Best for: Open-source maintainers, solo developers, anyone who wants total transparency and per-edit git commits.

Signature feature: The repo map. Aider parses your codebase into a compressed structural representation that lets even mid-tier models reason across files without burning context. Combined with automatic per-change commits, it gives you the cleanest "rewind anything" workflow in this category.

3. OpenAI Codex CLI

OpenAI's open-source terminal agent. Released in 2025 and now positioned as a serious agent rather than a passive autocomplete relic. Runs against real repositories with multi-file edits and shell execution.

  • Models: OpenAI (GPT-5 and o-series reasoning models)
  • License: Open-source (Apache-2.0)
  • Pricing: Per-token via OpenAI API
  • BYOM: Yes (OpenAI key)

Best for: Teams already standardized on OpenAI; anyone who wants OpenAI's reasoning models in an agentic loop with full source-code transparency.

Signature feature: Determinism on multi-step tasks. Developers consistently describe Codex CLI as more "stay-on-rails" than chatty alternatives — useful when you want an agent you can fire at a task and let work, rather than something that lives permanently in the editor.

4. Gemini CLI (listing pending)

Google's open-source CLI agent, with the largest production context window in the category and the most generous free tier.

  • Models: Gemini Pro and Flash (selectable per task)
  • License: Open-source (Apache-2.0)
  • Pricing: Free with a Google account; metered API or Vertex AI for production
  • BYOM: Yes (Google API key, or Vertex AI for enterprise)

Best for: Very large monorepos that exceed 200K-token context budgets; teams already on Google Cloud; experimentation without upfront cost.

Signature feature: A 1M-token context window plus Google Search grounding (the agent can search the web mid-task to verify answers). Combined with conversation checkpointing, it's the only mainstream CLI agent that can hold an entire mid-size codebase in working memory at once.

5. GitHub Copilot CLI (listing pending)

GitHub's terminal companion to its IDE Copilot product, with native repo / issue / pull-request integration.

  • Models: Mix of providers (GPT-5, Claude options) routed via Copilot
  • License: Proprietary
  • Pricing: Requires an active GitHub Copilot subscription; each prompt counts against your premium-request quota
  • BYOM: Limited (no, in practice)

Best for: Teams whose workflow already lives in GitHub Issues + GitHub Actions + Copilot. The native PR experience is genuinely the easiest in this category.

Signature feature: Tight integration with the GitHub graph. The CLI knows about your issues, your branches, your reviewers, and your Actions runs without configuration. If your team is GitHub-centric, it costs nothing extra beyond what you already pay.

6. Plandex

A plan-first CLI agent purpose-built for tasks that span many files and many steps. Where Claude Code and Aider feel like collaborative pair-programmers, Plandex feels like a contractor that writes you a plan first, then executes it.

  • Models: Any (Claude, GPT, and others — model-agnostic)
  • License: MIT (open-source)
  • Pricing: Free for self-hosted use; managed cloud tier available
  • BYOM: Yes

Best for: Migrations, framework upgrades, repo-wide refactors — anything where you want to review the whole plan before any file is touched.

Signature feature: Versioned plans. Every plan is itself a tracked artifact you can branch, rewind, and re-execute. This is the cleanest workflow for tasks where you'd otherwise want a senior engineer's RFC before writing any code.

7. Goose

Block's (formerly Square) open-source agent, Apache-2.0, with native Model Context Protocol (MCP) integration. Runs as a desktop app, a CLI, and an API.

  • Models: 15+ providers, including local Ollama
  • License: Apache-2.0 (open-source, Linux Foundation)
  • Pricing: Free
  • BYOM: Yes (full)

Best for: Privacy-sensitive teams, fully-offline use cases (Ollama), and anyone who wants to extend the agent with custom MCP tools.

Signature feature: Native MCP from day one, paired with the broadest provider support in this category. If you need an offline-capable agent that can also reach into your internal services through MCP, Goose is the cleanest fit.

8. Warp

Warp is an AI-native terminal that re-imagines the shell itself, with agentic capabilities and integrated multi-model intelligence baked into the prompt.

  • Models: Multi-model (Claude, GPT, others)
  • License: Proprietary (free tier available)
  • Pricing: Free tier; paid tiers for teams
  • BYOM: Partial

Best for: Developers who want agent capabilities without a separate CLI binary — Warp blurs the line between "the terminal" and "the agent."

Signature feature: The agent shares state with the terminal itself. Command output, history, and environment variables are first-class context, which removes the friction of feeding logs into a separate agent process.

9. Amp

Sourcegraph's coding agent, available as both a CLI and an IDE plugin. (Note: still served from the legacy /alternative/cody-ai/ URL pending a slug migration.)

  • Models: Multi-model
  • License: Proprietary
  • Pricing: Subscription
  • BYOM: Limited

Best for: Teams already using Sourcegraph for code search and intelligence; complex tasks where extended reasoning helps.

Signature feature: "Deep mode" — an autonomous research-and-solve mode that uses extended reasoning for harder problems, plus a composable tool system that goes beyond plain file editing (code review agent, image generation, walkthrough skills).

10. opencode (listing pending)

A privacy-first, open-source CLI agent with a TUI, multi-session support, and the broadest provider matrix on the market.

  • Models: 75+ providers via Models.dev (Claude, GPT, Gemini, local, free-tier models)
  • License: MIT (open-source)
  • Pricing: Free
  • BYOM: Yes (including auth via existing GitHub Copilot or ChatGPT Plus accounts)

Best for: Developers who want maximum provider flexibility, parallel agent sessions, or a privacy-first design that stores no code.

Signature feature: Multi-session parallel agents. You can run several agents simultaneously on the same project (e.g. "implement the feature" alongside "write the tests"), then merge results. Plus LSP integration that automatically configures language servers for the underlying LLM.

11. Cursor CLI

The terminal companion to the Cursor IDE, designed to bring Cursor's agent into a CLI workflow without forcing you to leave your existing editor.

  • Models: Anthropic, OpenAI, others (selectable)
  • License: Proprietary
  • Pricing: Bundled with a Cursor subscription
  • BYOM: Limited

Best for: Existing Cursor users who want to script agent runs in CI or in environments where the GUI editor isn't available.

Signature feature: Symmetry with the Cursor IDE — same agent, same context handling, same model routing — but headless. Useful for "run the same task in CI that I run interactively in the editor."

12. Amazon Q Developer (CLI mode)

AWS-native AI assistant, primarily an IDE product but with a capable CLI for AWS-centric workflows.

  • Models: Amazon Q models
  • License: Proprietary (AWS)
  • Pricing: Free tier; Pro at usage tier
  • BYOM: No

Best for: Teams running on AWS who want the agent to understand their infrastructure (cost, architecture, networking, deployments) — not just their code.

Signature feature: AWS-aware reasoning. Q can review your infrastructure, generate snippets that match your existing patterns, and diagnose AWS-specific failures (cloud cost spikes, networking issues) in a way no generic CLI agent can match.


CLI agent vs IDE extension vs cloud agent

The fastest way to know whether a CLI agent is what you want is to compare it to the two adjacent categories.

CLI agent IDE extension Cloud agent
Where it runs Your terminal, your machine Inside VS Code / JetBrains / Neovim Remote VM, hosted by the vendor
Primary interaction Natural-language task → multi-step plan Inline suggestions while you type Issue → pull request, asynchronously
Visual feedback Text patches, log output Inline ghost-text, diff overlays PR diff in browser
CI / scripting Native (it's already a binary) Not designed for it Yes, but vendor-controlled
Onboarding cost Higher — terminal-comfortable users only Low — same UX as the editor Low — works through GitHub
Examples This page GitHub Copilot, Cline, Continue Devin, OpenHands, Jules

If you spend most of your day in a graphical IDE and want frictionless inline help, an IDE extension is the right category. If you want a tool that does the work asynchronously and hands you a PR, a cloud agent is the right category. If you want to issue tasks from your shell, run them headless in CI, and stay close to the file system, you want a CLI agent — read on.

Many developers also want a richer GUI on top of an underlying coding model — those people generally end up looking at full AI-native IDEs (Cursor, Windsurf, Zed) or AI app builders for product-level prototyping.


How to choose a CLI coding agent

Use this decision flow rather than a feature checklist. Each branch ends with a concrete recommendation.

1. Do you need to run fully offline?

  • YesAider with Ollama, or Goose with a local model. opencode also supports local providers.
  • No → continue.

2. Is recurring cost the main constraint?

  • Yes, must be free → Gemini CLI (free tier with Google account), Aider or Plandex self-hosted with a cheap model (DeepSeek, Gemini Flash).
  • No → continue.

3. Is your codebase very large (multi-million LOC, big monorepo)?

  • Yes → Gemini CLI for raw 1M-token context. Use Plandex for tasks that span many files but require explicit, reviewable plans.
  • No → continue.

4. Are you already paying a vendor that includes a CLI?

5. Do you care most about extensibility (custom internal tools)?

6. Do you need plan-then-execute discipline?

  • YesPlandex is purpose-built for this.

If two answers conflict (e.g. you want offline and huge context), the offline constraint wins — only Aider+Ollama and Goose+Ollama deliver true offline operation today, and you trade context size for it.


CLI workflow → recommended tool

Workflow Best CLI agent Why
Cross-service refactor (rename API, update all call sites) Plandex Plan-first model surfaces the full blast radius before any file is touched
Library or framework migration Aider The repo map keeps mid-tier models on-task across many files; per-edit commits make rollback trivial
Boilerplate + tests for a new feature Claude Code Strongest sustained loop for "implement, test, fix, retest"
Repo-wide lint / style enforcement OpenAI Codex CLI Deterministic on mechanical multi-file passes
Working spec → working feature Goose MCP lets the agent reach into your internal services and APIs as part of the task
Headless run from CI OpenAI Codex CLI, Aider, Plandex All three have first-class non-interactive modes
AWS infra change + matching code Amazon Q Developer Only agent here that reasons over both your code and your AWS account

What to look for when picking a CLI coding agent

Strip the marketing away and a CLI agent is just five things wired together: a model router, a planner, a shell-execution sandbox, a file editor, and a memory of what it did last. The decisions that actually matter:

  1. Does it support BYOM? If yes, you can swap to whatever model is cheapest or strongest this month without changing tools. If no (Claude Code, Copilot CLI, Amazon Q, Cursor CLI), you're betting on the vendor's model roadmap.
  2. What's the autonomy mode? Some agents take one shot per prompt and stop. Others run an iterative loop until tests pass. Iterative loops are more useful, but burn more tokens — pick consciously.
  3. How does it handle git? Aider auto-commits. Plandex versions the plan itself. Others leave commits to you. For risky work on shared branches, auto-commit per change is a feature, not noise.
  4. Is there a sandbox? Shell execution is the riskiest surface. Look for dry-run, scope-limiting, or command-allowlist features before letting any agent run free in /.
  5. Does it support MCP? If you want the agent to reach into your internal tools (issue tracker, secrets manager, database), native MCP saves you from writing brittle integrations.
  6. What's the context strategy? A 1M-token model that loses focus is worse than a 200K-token model with a good repo-map. Look at how the tool uses context, not just the maximum number.
  7. What's the failure mode? When the agent loops, hallucinates, or over-edits, what does the tool do? Soft caps, retry budgets, and clear logs separate hobby projects from production-ready agents.

When NOT to use a CLI coding agent

This page exists to help you pick the right tool, which means saying when none of these are the right tool.

  • Visual or design work. A CLI agent has no eyes. For UI iteration on Figma exports, pick an AI app builder or an AI-native IDE with screenshot input.
  • Exploratory architecture decisions. Agents are good at executing plans. They're poor at originating them. Use a chat tool (or a senior engineer) for the "what should we even build" stage.
  • Small inline edits while you type. That's what IDE extensions like GitHub Copilot are for. Firing up an agent for a single autocomplete is overkill.
  • Long-running fully-autonomous work. That's a cloud agent job — those run for hours on a remote VM and submit a PR. CLI agents work best with a human nearby.
  • Codebases that ban any external model call. No CLI agent in the proprietary tier here is fully on-prem; only Aider + Ollama, Goose + Ollama, and opencode + a local provider deliver that.

If you recognize your situation in this list, save yourself the integration effort and pick from a different category.


Frequently asked questions

Which CLI coding agent is the cheapest to run?

Pricing splits into three groups. Free + open-source, BYOM: Aider, Plandex, Goose, OpenAI Codex CLI, opencode — the software is free and you pay only your model API costs (which can be near-zero on Gemini Flash or DeepSeek). Subscription with included quota: Claude Code (Anthropic Pro/Max), GitHub Copilot CLI (Copilot subscription), Amazon Q Developer (free / Pro). Free tier with metered upgrade: Gemini CLI is free with a Google account up to a generous quota. For a typical mid-size refactor (~30 file edits, two test cycles) expect $0–$6 in pass-through API costs depending on the model.

Can CLI agents run offline?

Most cannot. Offline operation requires a local model. Aider and Goose run fully offline when paired with Ollama or another local model server, and opencode supports local providers. Claude Code, GitHub Copilot CLI, OpenAI Codex CLI, and Gemini CLI require internet access to call their hosted models.

Which CLI agents are open-source?

Aider (Apache-2.0), Plandex (MIT), Goose (Apache-2.0, under the Linux Foundation), OpenAI Codex CLI (Apache-2.0), Gemini CLI (Apache-2.0), and opencode (MIT) are fully open-source. Claude Code, GitHub Copilot CLI, Amp, Cursor CLI, Warp, and Amazon Q Developer are proprietary.

Can I swap models without changing tools?

Yes, with any open-source CLI agent that supports BYOM (bring-your-own-model). Aider, Goose, Plandex, OpenAI Codex CLI, and opencode all let you point the agent at a different provider via API key. Proprietary tools like Claude Code and GitHub Copilot CLI lock you to their vendor's model roadmap.

Are CLI coding agents safe to run on production code?

Treat any agent as a powerful but unsupervised contractor. Always run on a feature branch, never on main. Use sandbox or dry-run flags where available. Limit shell execution scope when supported. Review every diff before merging. Aider's automatic per-change git commits and Plandex's versioned plans are the cleanest "rewind anything" patterns in this category and reduce the blast radius of mistakes.

Do CLI agents work in CI / CD?

Yes — CLI is the easiest interface to script. OpenAI Codex CLI, Aider, and Plandex all expose non-interactive modes that fit in GitHub Actions, GitLab pipelines, or any cron job. GitHub Copilot CLI integrates particularly cleanly with GitHub Actions if your stack is GitHub-native.

Are these tools language-agnostic?

Mostly yes, with caveats. Most CLI agents work with any language the underlying model handles, which today means strong support for Python, JavaScript / TypeScript, Go, Rust, Java, C#, Ruby, PHP, and reasonable support for almost everything else. Aider's repo map gives the strongest results in Python, JS/TS, Go, and Rust. Gemini CLI's huge context is useful for very large monorepos in any language. Highly idiomatic ecosystems (Elixir, Clojure, Haskell) still benefit from a stronger model regardless of which CLI you pick.

Do CLI agents work on Windows?

All twelve tools support Windows in some form, though many work best under WSL2 (Windows Subsystem for Linux). Claude Code, Aider, Goose, and Warp have native Windows support. If you're on Windows and want frictionless setup, install WSL2 first and run the agent inside it.


Methodology and last reviewed

This page ranks tools by active development (commits in the past 90 days), provider stability, model breadth, autonomy on real multi-step tasks, and community signal (GitHub stars, Reddit and HN discussion through Q1 2026). Pricing reflects publicly listed plans at time of review. We do not accept payment for placement, and the ordering on the page reflects editorial judgment, not vendor relationships. Tools listed as "listing pending" in the comparison table will get full profile pages as the directory expands; in the meantime they appear here because excluding them would mislead readers about what the category actually contains.

If a tool is missing or incorrectly described, please contact the editors.

Last reviewed: April 2026.


Related categories

Filters

Tags