Skip to content

The datasheet for every AI agent

Research report · ai-agents

Terminal AI coding agents: open, portable, or locked in?

We verified the license, model portability and pricing of six terminal AI coding agents: Claude Code, Codex CLI, Gemini CLI, Aider, OpenCode and Goose.

Jul 16, 2026updated Jul 24, 20268 min readSource-linked research

Editorial update, 24 July 2026: Google cut off free/personal access to Gemini CLI on 18 June 2026, replacing it with the closed-source Antigravity CLI, after this piece was first verified. The Gemini CLI row and the “free hosted tier” recommendation below are updated to reflect that; see our full Antigravity CLI listing for the successor’s pricing and license.

“Is it open source?” is the wrong first question to ask about a terminal AI coding agent. We pulled the license, model support and billing model for six of the most-used terminal coding agents (Claude Code, OpenAI’s Codex CLI, Google’s Gemini CLI, Aider, OpenCode and Goose) straight from their repositories and pricing pages on 16 July 2026. The result: “open source,” “runs on the model you choose,” and “free to run” are three separate things, and almost every buyer treats them as one.

The one-paragraph answer

Of the six terminal coding agents we checked, five are open source: every one except Anthropic’s Claude Code, which is closed. But only three of them let you point the agent at whatever model you want: Aider, OpenCode and Goose. The other two open-source tools are vendor clients: OpenAI’s Codex CLI is Apache-2.0 licensed yet authenticates against OpenAI, and Google’s Gemini CLI is Apache-2.0 yet runs on Gemini. So the license tells you almost nothing about whether you can bring your own model, avoid a subscription, or run locally for zero inference cost. Those are the questions that actually decide cost and lock-in, and they don’t line up with the open-source badge the way most comparison posts imply.

The matrix (verified 16 July 2026)

Every field below was read from the tool’s own repository, README or pricing page on the date above. Star counts are a rough popularity proxy, not a quality score.

Agent License Runs on How you pay GitHub stars
Claude Code Proprietary (closed) Claude models only Claude Pro / Max subscription, or Anthropic API not applicable (closed)
Codex CLI Apache-2.0 OpenAI models only ChatGPT paid plan, or OpenAI API key 98.8k
Gemini CLI Apache-2.0 Gemini models only Enterprise-only now; free/personal tier ended 18 Jun 2026 106k
Aider Apache-2.0 Any model (bring your own key) Your chosen model’s API, or a local model 47.4k
OpenCode MIT Any provider (bring your own key) Your chosen model’s API, or a local model 186k
Goose Apache-2.0 15+ providers, incl. local Your chosen model’s API/subscription, or a local model 51.3k

Sources per row: claude.com/pricing; github.com/openai/codex and the ChatGPT/Codex pricing docs; the Gemini CLI README; github.com/Aider-AI/aider; github.com/sst/opencode with the OpenCode docs; github.com/block/goose.

Read down the “Runs on” column and the split is obvious. Three tools take whatever model you give them; three run one company’s models. That is the line that matters, and it cuts straight through the license column.

Open source doesn’t mean portable

The clearest example is OpenAI’s Codex CLI. It is genuinely open source: Apache-2.0, 98.8k stars, and about 97% Rust in the repository. You can read every line and fork it. What you cannot do is run it against Claude or a local model: the quickstart signs you in with ChatGPT and the alternative is an OpenAI API key. Google’s Gemini CLI is the same shape: Apache-2.0 and openly developed (546 releases, latest v0.50.0 dated 8 July 2026), but it runs on Gemini.

Meanwhile Anthropic’s Claude Code, the tool many developers reach for by default, is closed source and locks you to Claude. Openness and lock-in are not opposites here; Codex CLI is open and locked at the same time.

The tools that are open and portable are the community-built ones. Aider “can connect to almost any LLM, including local models,” using a bring-your-own-key model. OpenCode’s docs put it plainly: “you can use any LLM provider by configuring their API keys.” Goose “works with 15+ providers — Anthropic, OpenAI, Google, Ollama, OpenRouter, Azure, Bedrock, and more,” and can also ride your existing Claude, ChatGPT or Gemini subscription. If avoiding lock-in is the goal, portability is the column to read, and only these three deliver it.

What “free” actually means, tool by tool

“Free” is doing a lot of quiet work in this category, and it means something different in each row.

  • Free software, you pay the model. Aider, OpenCode and Goose cost nothing to install. Your bill is whatever the model you attach charges, which can be a few dollars of API usage, an existing subscription, or literally zero if you point them at a local model through Ollama.
  • Free tier, hosted by the vendor, but shrinking. Gemini CLI’s README still advertises free inference for a personal Google account (60 requests/minute, 1,000/day on Gemini 3), but Google stopped actually serving those free/personal requests on 18 June 2026, redirecting consumer users to the closed-source Antigravity CLI instead; only Gemini Code Assist Standard/Enterprise license holders still get uninterrupted Gemini CLI access. Antigravity CLI’s own free Individual tier is now the closest like-for-like: $0/month, and it bundles Claude Sonnet & Opus 4.6 alongside Gemini (see our Antigravity CLI listing), though it has no ACP support and no confirmed open-source license.
  • Bundled into a subscription. Claude Code comes with Claude Pro (from $17/month on the annual plan, $20 monthly) or Max (from $100/month), or you pay per token on the Anthropic API. Codex CLI is included with ChatGPT paid plans (Plus is $20/month with CLI access, Pro is from $100/month for 5x–20x more Codex usage), or you use an OpenAI API key and “pay only for the tokens Codex uses.”

So the cheapest path depends entirely on what you already have. If you pay for ChatGPT or Claude anyway, the matching CLI adds no marginal cost. If you want a genuinely free run with no account tie, a local model behind Aider, OpenCode or Goose is the only route to $0. Gemini CLI’s free tier is gone unless you have an enterprise license, and Antigravity CLI’s free Individual tier is the nearest hosted, zero-cost alternative if you don’t mind staying inside Google’s ecosystem on a closed-source tool.

How to choose without reading ten listicles

Three questions settle it, in order:

  1. Do you need to switch models, or avoid depending on one vendor? If yes, you want a portable client: Aider, OpenCode or Goose. None of the three vendor-native CLIs will do this, open source or not.
  2. Are you already paying for ChatGPT or Claude? If yes, Codex CLI or Claude Code respectively is the lowest-friction option: the subscription quota usually beats per-token API pricing for daily work, and there’s nothing extra to buy.
  3. Do you want zero inference cost? Point a portable client at a local model. Gemini CLI’s free hosted tier is no longer an option for personal accounts (Google restricted it to enterprise licenses in June 2026); Antigravity CLI’s free Individual tier is the closest hosted, zero-cost replacement if you accept its closed-source, Google-only lock-in.

Notice what didn’t make the list: the GitHub star count and this week’s benchmark score. Terminal-Bench, the public benchmark for exactly these tools, runs live leaderboards (versions 2.0 and 2.1 are current), and the top spot rotates with each new model release, so a score we printed today would be stale before you finished reading. Check the leaderboard when you care about raw capability; check the “Runs on” column when you care about being stuck.

One more thing worth watching: ask an AI assistant “what’s the best terminal coding agent” and the answer shifts by engine and by month, because which sources each engine cites is its own moving target, the one our sister index CitedIndex tracks.

Methodology & sources

This is a facts-only comparison. Every value in the matrix was read live on 16 July 2026 from the tool’s own repository, README or pricing page: no benchmark estimates, no invented figures. Licenses and star counts come from each GitHub repository; model support comes from each project’s documentation; pricing comes from the vendors’ own pages. Where a fact moves fast (exact prices, model versions, star counts), we date it rather than pin it as permanent, and we describe pricing by its model (subscription, free tier, or bring-your-own-key) because that structure outlasts any single price change. The Gemini CLI “how you pay” cell was corrected on 24 July 2026: its README still describes a free personal tier, but Google’s own transition announcement confirms free/personal requests actually stopped being served on 18 June 2026. That is a case of a primary source (the README) lagging the vendor’s real, live behavior, which is exactly the kind of drift this site re-checks for. This is the same standard we apply to every listing; see how we research AI agents and our methodology.

Primary sources: Claude pricing · OpenAI Codex CLI repo · ChatGPT/Codex pricing docs · Gemini CLI repo · Google’s Gemini CLI → Antigravity CLI transition announcement · Aider repo · OpenCode repo and docs · Goose repo · Terminal-Bench leaderboard.

To see the agents we track sorted and compared on their own pages, start with the index or our best AI agents and side-by-side comparisons.

Get the next report

New agents rankings and fresh data reports. One short email, one-click unsubscribe.