Best CLI coding agents in October 2026: 12 terminal agents compared

Twelve terminal coding agents compared on license, models, price, undo, parallel agents and Windows support, from their docs as of October 2026.

Updated October 2026

The best CLI coding agent depends on what you already pay for and how much you need to undo. For Claude subscribers it is Claude Code; for ChatGPT subscribers, Codex CLI; for open source with your own keys, OpenCode or Pi; for 250+ models on one plan with risk-scored approvals and undo that covers shell commands, Darce.

Last checked: October 2026. This page is published by the makers of Darce. Everything about other tools comes from their official docs, repositories and pricing pages as of October 2026, not from benchmark runs, so check each tool's docs before you decide.

How we evaluated these tools

We read each tool's current documentation, README, pricing page and, where the docs were silent, its source code. We only included tools that ship a terminal agent today: something you run in a project folder that reads code, edits files and runs commands. We looked at six things that matter day to day:

  • License: can you read and fork the code?
  • Models: one vendor, your own keys, or a bundled plan?
  • Price model: subscription, pay per token, or free tool plus provider costs.
  • Undo: can you roll back the agent's work, and does that include files a shell command created, changed or deleted?
  • Parallel agents: can it split work across several agents at once?
  • Windows: native support, or WSL only?

We are not neutral: we build Darce. We have tried to say plainly where other tools are better, and where a feature isn't documented we say "not documented" rather than guess.

The comparison table

ToolOpen sourceModelsPrice modelUndo / checkpointsParallel agentsWindows
Claude CodeNo (proprietary)Claude onlyClaude Pro, Max, Team or Enterprise plan, or API billing/rewind per prompt; does not track files changed by Bash commandsSubagentsNative (PowerShell or CMD) and WSL
Codex CLIYes, Apache 2.0OpenAI by default; other providers configurableChatGPT plan or OpenAI API keyNo /undo command in the current CLI; sandbox plus gitSubagents, /worktreeNative, with a Windows sandbox
OpenCodeYes, MITMany providers; your keys, subscriptions or local modelsFree tool; pay providers, or optional Zen (pay as you go) or Go ($10 or $40/month)/undo and /redo via whole-worktree git snapshots, so shell-made file changes are includedMultiple sessions and agentsNative installs; WSL recommended
Antigravity CLI (replaced Gemini CLI)Public repo; license not statedGemini, plus other "agent models" depending on planFree individual tier with weekly limits; Google AI Pro or Ultra; Google Cloud for business/rewind (alias /undo) rolls back conversation history; file restore not documentedBackground subagents, /fork, multi-agent teams on paid plansNative (PowerShell or CMD installers)
AiderYes, Apache 2.0Most LLMs via your own keys, local modelsFree tool; pay providersCommits each edit; /undo reverts its last commit; shell effects not coveredSingle sessionNative
Cline CLIYes, Apache 2.0Cline provider or your own keys; local modelsFree tool; pay providers or ClineExtension snapshots after every tool use, commands included; CLI checkpoints not documentedKanban board runs agents in separate git worktreesNative
Kilo Code CLIYes, MIT (OpenCode fork)Hundreds of models; your keys or Kilo GatewayFree with your keys; Gateway at provider rates (5% card fee); optional Kilo Pass from $19/month/undo and /redo per messageSessions, /fork, Orchestrator modeNative
PiYes, MIT15+ providers; API keys or subscription loginFree tool; pay providersNo file undo documented; /tree branches the conversationNone built in (tmux or extensions)Native (PowerShell installer)
CrushSource available, FSL-1.1-MITMany providers, local models; Charm's Hyper providerFree tool; pay providers or HyperNot documentedNot documentedNative (PowerShell) and WSL
Qwen CodeYes, Apache 2.0Alibaba ModelStudio, third-party providers, local modelsCoding Plan, Token Plan or API key; free OAuth tier ended April 2026Optional checkpoints (off by default) before file-writing tools; /restoreSubAgents, Agent TeamsNative (PowerShell installer)
GooseYes, Apache 2.015+ providers; keys or existing Claude, ChatGPT or Gemini subscriptionsFree tool; pay providersNot documentedSubagents in parallelNative (Git Bash, MSYS2 or PowerShell)
DarceYes, MIT250+ models via OpenRouter through your Darce plan (no own keys)Free daily allowance; $15 or $65/month/undo and /rewind before every step, including files shell commands changed (git repo needed)/swarm (2 to 4 agents), /derby (3 models)Native

Claude Code

What it is. Anthropic's terminal agent for Claude models. It also has a desktop app and IDE extensions. It requires a Pro, Max, Team, Enterprise or Console account; the free claude.ai plan doesn't include it. It also runs through Amazon Bedrock, Google Cloud and Microsoft Foundry.

Best for. People who already pay for a Claude plan and want the first-party agent for those models, with subagents, skills and a large ecosystem.

Watch-outs. Claude only, and not open source. Its checkpointing docs say rewind "does not track files modified by Bash commands", and most subagent edits aren't restored. On native Windows its sandboxing isn't supported; you need WSL 2 for that. More detail on what rewind misses: Claude Code rewind vs Darce undo, or the full Claude Code alternative comparison.

OpenAI Codex CLI

What it is. OpenAI's open source (Apache 2.0) terminal agent. Sign in with a ChatGPT Plus, Pro, Business, Edu or Enterprise plan, or use an API key. It runs natively on Windows with its own sandbox.

Best for. ChatGPT subscribers who want OpenAI's models in a first-party agent, and anyone who values OS-level sandboxing of commands. It has subagents, /worktree for working in a separate git worktree, and a handoff to the desktop app.

Watch-outs. We found no /undo or rewind command in the current CLI's slash command list (checked in the source, October 2026); safety comes from the sandbox and approvals, and you revert with git. It is built around OpenAI's models. See Darce vs Codex CLI.

OpenCode

What it is. A popular MIT-licensed terminal agent that works with many providers: your own API keys, existing subscriptions, local models, or OpenCode's own Zen (pay as you go) and Go ($10 or $40 per month) model plans.

Best for. Developers who want an open source, highly configurable agent with full control over providers. Its /undo reverts "any file changes" from the last message, using git snapshots of the whole working tree kept outside your repo, so it catches shell-made changes too.

Watch-outs. You manage providers and billing yourself. On Windows the docs recommend WSL for the best experience. Approvals are per-tool permission rules rather than per-command risk scoring. See OpenCode alternatives and Darce vs OpenCode.

Antigravity CLI (formerly Gemini CLI)

What it is. Google announced on May 19, 2026 that Gemini CLI is transitioning to Antigravity CLI (agy), a Go-based terminal agent that shares its engine with the Antigravity 2.0 desktop app. Gemini CLI stopped serving Google AI Pro, Ultra and free individual users on June 18, 2026. The Gemini CLI repo stays available under Apache 2.0 and still works with paid API keys and enterprise licenses.

Best for. Google users who want a free tier with weekly limits, Gemini models, and background multi-agent workflows. It has subagents, /fork for parallel sessions, a terminal sandbox setting and permission policies.

Watch-outs. Its /rewind (alias /undo) is documented as rolling back conversation history; the reference doesn't say it restores files. No feature parity with Gemini CLI at launch, and free limits have changed several times. If you still use Gemini CLI, its checkpointing is off by default and covers file-writing tools. See Darce vs Gemini CLI.

Aider

What it is. One of the original terminal AI pair programmers (Apache 2.0). You add files to the chat, it edits them and commits each change to git.

Best for. A git-native workflow where every AI edit is a commit you can inspect, with tight control over which files are in context and a very wide range of models via your own keys.

Watch-outs. /undo reverts Aider's last commit, not what shell commands did. It is a pair programmer more than an autonomous agent. Its last tagged release was v0.86.0 in August 2025, and commits have slowed in 2026. See Darce vs Aider.

Cline CLI

What it is. The terminal version of the Cline agent (Apache 2.0), installed with npm i -g cline. It works with the Cline provider, your own keys, or local models, and runs on macOS, Linux and Windows.

Best for. Teams already using Cline in the editor, and people who want a kanban board that runs several agents in parallel, each in its own git worktree.

Watch-outs. Headless auto-approve defaults to on, and the CLI has no allow or deny list for shell commands; you need a hook to block them. Cline's checkpoints (a shadow git repo updated after every tool use, commands included) are documented for the editor, not the CLI. See Darce vs Cline.

Kilo Code CLI

What it is. Kilo's terminal agent (MIT), a fork of OpenCode. It has Architect, Ask, Debug and Orchestrator modes and per-tool allow, ask and deny rules.

Best for. Kilo users who want the same agent in the terminal, and people who want hundreds of models at provider rates through Kilo Gateway.

Watch-outs. /undo and /redo work per message, but Kilo's docs don't describe how changes are snapshotted. Gateway credit purchases carry a 5% processing fee.

Pi

What it is. A deliberately minimal MIT-licensed agent harness, created by Mario Zechner and now developed under Earendil. A small core, with extensions, skills and packages for everything else. Log in with a subscription or an API key across 15+ providers.

Best for. Developers who want to build their own workflow on a small, hackable core, with tree-shaped sessions you can branch with /tree.

Watch-outs. By design there are no permission prompts (run it in a container or add your own), no built-in subagents and no plan mode. File undo isn't documented. See Darce vs Pi.

Crush

What it is. Charm's terminal agent, with a polished TUI, LSP-enhanced context, MCP support and many providers including local models. It runs on macOS, Linux, Windows (PowerShell and WSL) and BSDs.

Best for. People who care about a good-looking terminal UI and want to switch models mid-session.

Watch-outs. It is source available under FSL-1.1-MIT (it converts to MIT later), not OSI open source today. Undo and checkpoints aren't covered in its README. --yolo skips all permission prompts; Charm's own advice is "be very, very careful".

Qwen Code

What it is. The Qwen team's open source (Apache 2.0) terminal agent. It started from Gemini CLI v0.8.2 and has developed independently since, adding subagents, agent teams and support for OpenAI, Anthropic, Gemini and Qwen APIs, plus local models.

Best for. Qwen model users and teams on Alibaba ModelStudio, or anyone who wants an open source agent that also connects to third-party providers.

Watch-outs. The free Qwen OAuth tier was discontinued on April 15, 2026, so you now need a Coding Plan, Token Plan or API key. Checkpointing is off by default and is documented for file-writing tools.

Goose

What it is. An open source (Apache 2.0) agent originally from Block, now part of the Agentic AI Foundation at the Linux Foundation. It has a CLI, a desktop app and an API.

Best for. General automation beyond code, with 15+ providers, existing Claude, ChatGPT or Gemini subscriptions through ACP, and subagents that run in parallel.

Watch-outs. Undo and checkpoints aren't documented. It is a general-purpose agent, so coding-specific features are thinner than in tools built only for code.

Darce

What it is. Our open source (MIT) terminal agent. It uses 250+ coding models through OpenRouter on one plan: Claude, GPT, Gemini, Qwen, DeepSeek, Kimi, GLM and Grok. Try it with npx darce-cli, no account needed.

Best for. People who want to switch models mid-task, race models with /derby, split work with /swarm, and undo everything. /undo and /rewind snapshot your working tree before every step, so files a shell command created, changed or deleted come back too. Every command is risk-scored, and effects undo can't reverse (deploys, migrations, releases) always ask first.

Watch-outs. You can't bring your own provider keys or run local models; models come through your Darce plan (Free, $15 or $65 per month, see pricing). Shell-effect undo needs a git repository, undo history lasts for the session, and gitignored files like node_modules aren't snapshotted. Prompts and files read during a task go through api.darce.dev to the model provider. It is built by one developer, so it is younger and has a smaller community than most tools here.

Others we looked at

Amp is now centered on cloud agents ("orbs") with a CLI alongside. It is proprietary, chooses models for you, and has a free Hobby tier, a $20/month Individual plan and bring-your-own-key. We left it out of the table because its manual doesn't document undo or Windows support for the CLI.

Cursor is an editor first, so we compare it separately: Darce vs Cursor.

How to choose

  • Best free option: Antigravity CLI's free individual tier if you're happy with Google's weekly limits. If you want an open source tool, OpenCode with its limited-time free models, or Darce's free daily allowance with no card.
  • Best open source: OpenCode for breadth and community; Pi if you want a tiny core to build on; Codex CLI if you want OpenAI's models with a sandbox.
  • Best for Claude users: Claude Code if you have a Pro or Max plan. If you want Claude alongside other vendors, OpenCode, Pi or Goose can use your Claude access, and Darce includes Claude Sonnet and Opus on its Builder plan.
  • Best for safety and undo: Codex CLI and Claude Code (on WSL 2, macOS or Linux) for OS sandboxing. For undoing what happened, OpenCode and Darce both snapshot the whole working tree, so shell-made changes come back; Darce adds per-command risk scores and asks before effects it can't reverse. Read our guide to coding agent checkpoints and when YOLO mode is reasonable.
  • Best for multi-model work: OpenCode or Kilo if you want to use your own keys. Darce if you want one plan for 250+ models, switch with Shift+Up and Shift+Down, or race three of them with /derby. Browse the model directory or read how model selection works.

New to this category? Start with getting started with Darce or our explainer on what a coding agent is.

Sources

Frequently asked questions

What is the best CLI coding agent in 2026?

There isn't one winner. Claude Code fits Claude subscribers, Codex CLI fits ChatGPT subscribers, OpenCode and Pi suit people who want open source with their own keys, and Darce suits people who want 250+ models on one plan with undo that covers shell commands.

What is the best open source coding agent?

OpenCode (MIT) is the most widely used open source terminal agent and works with almost any provider. Codex CLI (Apache 2.0), Pi (MIT), Cline (Apache 2.0), Goose (Apache 2.0), Qwen Code (Apache 2.0) and Darce (MIT) are also open source.

Is Gemini CLI still available?

Google moved individual users to Antigravity CLI. Gemini CLI stopped serving Google AI Pro, Ultra and free individual users on June 18, 2026, but the Apache 2.0 repo remains and it still works with paid API keys and enterprise licenses.

Which coding agents can undo changes made by shell commands?

Claude Code's rewind does not track files changed by Bash commands. OpenCode and Darce snapshot the whole working tree, so files a shell command changed come back on undo, and Cline's editor checkpoints run after commands too. No agent can undo remote effects like deploys or database migrations.

Is there a free CLI coding agent?

Most open source agents are free to run but need a model provider. Antigravity CLI has a free individual tier with weekly limits, OpenCode Zen offers some limited-time free models, and Darce has a free daily allowance with no card.

Do CLI coding agents work on Windows?

Most now run natively on Windows, including Claude Code, Codex CLI, Antigravity CLI, Cline, Kilo, Pi, Crush, Qwen Code, Goose and Darce. OpenCode recommends WSL for the best experience, and Claude Code's sandboxing needs WSL 2.

Related guides