Skip to the content.

Gemini CLI Alternatives: Terminal AI Coding Agents Compared (Claude Code, Codex CLI, OpenCode, Aider and More)

An independent, regularly reviewed comparison of terminal AI coding agents: Gemini CLI, Claude Code, OpenAI Codex CLI, OpenCode, Aider, GitHub Copilot CLI, Qwen Code, Goose, Crush, Kilo CLI, Mistral Vibe, Cursor CLI, Antigravity CLI and others. For each: who makes it, whether it is open source, which models it runs, how you pay, how to install it, and what it is best at, plus decision guides, a feature matrix, benchmark caveats and safety notes.

For developers choosing a CLI coding agent, teams standardizing on one, and anyone looking for a Gemini CLI alternative after Google moved free and consumer-plan access to Antigravity CLI.

Last reviewed: December 2026. Facts were checked against each project’s repository or official docs at review time. Prices, plans and models change monthly, so pricing is described as a model (“subscription”, “API pay-as-you-go”, “bring your own key”) with links rather than numbers. Not affiliated with any vendor listed.


Table of Contents


Read this first: what changed with Gemini CLI

On June 18, 2026, Google moved free individual access and Google AI Pro / Ultra (Google One) access from Gemini CLI to Antigravity CLI (Google’s announcement). The Gemini CLI repository now describes the tool as maintained for enterprise Gemini Code Assist Standard / Enterprise and Code Assist for GitHub on Google Cloud, plus paid API keys, and notes it is not tuned for the newest Gemini model generation.

What that means for you:

You used Gemini CLI with… Now
A free personal Google account Move to Antigravity CLI, or pick an alternative below
Google AI Pro / Ultra Antigravity CLI is the supported Google option
Gemini Code Assist Standard / Enterprise, or a paid Gemini API / Vertex key Gemini CLI still works for you
Gemini models but want a vendor-neutral tool OpenCode, Aider, Goose, Crush, Kilo CLI or Cline can call Gemini through an API key

Quick picks

If you want… Pick Why
The most capable all-round agent with a deep feature set Claude Code Mature permissions, hooks, subagents, skills, plugins, many surfaces
An open-source agent with strong sandboxing, included in ChatGPT plans Codex CLI OS-level sandbox modes, codex exec for CI, Apache-2.0
Free or Google-plan access to Gemini models in a terminal Antigravity CLI Google’s supported path for free and AI Pro/Ultra users
One open-source TUI for any model provider OpenCode Provider-agnostic, MIT, very active
Git-first pair programming with automatic commits Aider Every change is a commit you can review or undo
You already pay for GitHub Copilot GitHub Copilot CLI Included with Copilot plans, GitHub-native
Open-source agent tuned for Qwen models Qwen Code Apache-2.0, Gemini CLI-derived UX
A general agent that also automates beyond code Goose Extensible with MCP, Apache-2.0, now under the Linux Foundation’s AAIF
A polished, stylish TUI with any provider Crush Charm’s terminal UX; source-available license
Mistral models in a minimal CLI Mistral Vibe Apache-2.0, small and focused
Local models only, nothing leaves the machine OpenCode, Aider, Goose, Codex --oss First-class local provider support

The big comparison table

Agent Maker Source Models How you pay Install (one option)
Claude Code Anthropic Proprietary (public repo for issues/plugins) Claude models; third-party cloud providers supported Claude subscription or Anthropic Console API curl -fsSL https://claude.ai/install.sh \| bash
Codex CLI OpenAI Apache-2.0 OpenAI models; local via --oss; custom providers ChatGPT plan or API key npm install -g @openai/codex
Gemini CLI Google Apache-2.0 Gemini models Code Assist Standard/Enterprise, or paid Gemini/Vertex API npm install -g @google/gemini-cli
Antigravity CLI Google See product page Gemini models Free tier and Google AI Pro/Ultra, or Google Cloud Download from antigravity.google
OpenCode Anomaly (repository formerly under sst) MIT Many providers, local models Bring your own key or subscriptions it supports curl -fsSL https://opencode.ai/v2/install \| bash
Aider Aider community Apache-2.0 Many providers, local models Bring your own key python -m pip install aider-install && aider-install
GitHub Copilot CLI GitHub Proprietary license Models offered in Copilot Copilot subscription brew install copilot-cli
Qwen Code Alibaba Qwen team Apache-2.0 Qwen models, OpenAI-compatible APIs Account sign-in or API key npm install -g @qwen-code/qwen-code@latest
Goose AAIF (Linux Foundation), originally Block Apache-2.0 Many providers, local models Bring your own key see docs
Crush Charm FSL-1.1-MIT (source-available, converts to MIT later) Many providers Bring your own key brew install charmbracelet/tap/crush
Kilo CLI Kilo MIT Many providers Kilo account or own keys npm install -g @kilocode/cli
Cline Cline Apache-2.0 Many providers Bring your own key or Cline account see docs
Mistral Vibe Mistral AI Apache-2.0 Mistral models Mistral API / plans uv tool install mistral-vibe
Kimi Code Moonshot AI see repo Kimi models Kimi plans or API see repo
Cursor CLI Cursor Proprietary Several vendors’ models Cursor plans curl https://cursor.com/install -fsS \| bash
Amp Amp Proprietary Curated frontier models See site see site
Factory Droid Factory Proprietary Several vendors’ models Factory plans see docs
Auggie Augment Code Proprietary license Augment-selected models Augment plans see repo

“Bring your own key” tools are free software, but you pay the model provider per token (or use a local model).


How you pay: four pricing models

Model Examples Good when Watch out for
Subscription with usage limits Claude Code with a Claude plan, Codex CLI with a ChatGPT plan, Copilot CLI with Copilot, Antigravity CLI with Google AI plans Daily heavy use; predictable monthly cost Rate limits reset on windows (hours or weeks); heavy agent use hits them
API pay-as-you-go Any agent with an API key Spiky or automated use (CI), teams with budgets per project Long agent sessions can cost more than you expect; set spend limits
Bring your own key, multi-provider OpenCode, Aider, Goose, Crush, Kilo, Cline Switching models freely, using cheaper models for simple tasks You manage keys, limits and model choice
Local models OpenCode, Aider, Goose, Codex --oss, others via OpenAI-compatible servers Privacy, offline work, zero marginal cost Quality on long multi-step tasks trails frontier models; needs strong hardware

Cost-control tips that work with every agent:

  1. Start sessions with a clear, scoped task; long wandering sessions burn tokens.
  2. Use project instruction files so the agent does not rediscover setup every time.
  3. Compact or reset context between tasks.
  4. Use a smaller or faster model for routine edits and a stronger one for planning and debugging.
  5. In CI, cap turns and time, and run read-only where possible.

Where to check current prices

Plans and limits change often, so check the source before you decide:

Product Pricing page
Claude Code (Claude plans) claude.com/pricing
Anthropic API anthropic.com/pricing
Codex (ChatGPT plans, credits) Codex pricing
OpenAI API openai.com/api/pricing
Antigravity CLI antigravity.google/pricing
Gemini Code Assist (Gemini CLI for enterprises) Gemini Code Assist
Gemini API Gemini API pricing
GitHub Copilot (Copilot CLI) Copilot plans
Cursor (Cursor CLI) cursor.com/pricing
Kilo kilo.ai/pricing
Mistral (Vibe) mistral.ai/pricing
Many models through one key (for BYOK agents) OpenRouter models

Scenarios: what we would pick and why

1. Solo developer, mostly TypeScript web apps, already pays for ChatGPT Plus. Codex CLI signed in with ChatGPT. Zero extra cost to start, good sandboxing, codex review before pushes. Add OpenCode with a second provider if you want a second opinion.

2. Startup team of 8, heavy daily agent use, wants the most capable agent. Claude Code on team plans, a shared AGENTS.md/CLAUDE.md, hooks for formatting and tests, GitHub Actions for review. Keep Codex CLI installed for cross-model review of risky changes.

3. Enterprise on Google Cloud with Gemini Code Assist Enterprise. Gemini CLI remains supported for you. Evaluate Antigravity CLI for newer Gemini models, and keep policies in Code Assist admin settings.

4. Regulated company, code must not leave the network. OpenCode, Aider or Goose with local models served by vLLM or llama.cpp on internal GPUs; or Codex CLI with --oss. Accept lower autonomy on long tasks; invest in good instruction files and tests.

5. Open-source maintainer triaging issues and PRs. A CI-friendly headless agent (claude -p, codex exec, Copilot’s agent) running read-only to draft triage comments and summaries, with a human posting them.

6. Student or hobbyist on a tight budget. Antigravity CLI’s free tier for Gemini models, or a BYOK agent (OpenCode, Aider) with an inexpensive model via OpenRouter, or a local model on your laptop.

7. Data scientist working in notebooks and scripts. An agent with good Python tooling and a read-only default (Codex CLI read-only for exploration), plus Jupyter-native AI for notebook cells.

8. Platform team building internal agents for other teams. Agent SDKs (Claude Agent SDK, OpenAI Agents SDK, Google ADK) rather than end-user CLIs, with MCP servers exposing internal tools and a gateway for budgets and logging.


Agent profiles

Claude Code

OpenAI Codex CLI

Gemini CLI

Antigravity CLI

OpenCode

Aider

GitHub Copilot CLI

Qwen Code

Goose

Crush

Kilo CLI

Cline

Mistral Vibe

Kimi Code

Cursor CLI

Amp, Factory Droid, Auggie and Warp

Commercial agents worth evaluating:

OpenHands and Continue

Historical note: Plandex (MIT) pioneered large-task planning in the terminal but shows little activity since late 2025, and Roo Code’s repository was archived in 2026. Check activity before adopting any tool.


Feature matrix

“Yes” means documented by the project at review time; “see docs” means the capability may exist but we did not verify it. Features ship fast, so treat this as a starting point.

Capability Claude Code Codex CLI Gemini CLI OpenCode Aider Copilot CLI Goose
Open source No Yes Yes Yes Yes No Yes
Multiple model vendors Via cloud providers Custom providers, local No Yes Yes Within Copilot Yes
Local models see docs Yes (--oss) No Yes Yes No Yes
MCP servers Yes Yes Yes Yes see docs Yes Yes
Headless / scripting mode Yes (-p) Yes (exec) Yes Yes Yes (--message) Yes Yes
OS-level sandbox for commands Yes (sandboxing option) Yes (default) Yes (optional) see docs No (git-based undo) see docs see docs
Subagents / parallel agents Yes Yes see docs Yes No see docs see docs
Hooks Yes Yes see docs see docs No see docs see docs
Skills / reusable workflows Yes Yes Yes (extensions) see docs No see docs Yes (recipes)
IDE integration VS Code, JetBrains IDE extension IDE companion see docs Watch mode VS Code (Copilot) Desktop app
Reads AGENTS.md Yes (in place of CLAUDE.md) Yes Configurable Yes Via --read Yes see docs

Project instruction files

Every agent reads a Markdown file of project rules at session start. Use them; they are the cheapest quality boost available.

Agent Default file Notes
Claude Code CLAUDE.md Hierarchical (user, project, folders); can read an existing AGENTS.md
Codex CLI AGENTS.md Global ~/.codex/AGENTS.md plus root-to-cwd chain; AGENTS.override.md
Gemini CLI GEMINI.md File name configurable (for example to AGENTS.md)
OpenCode AGENTS.md  
Qwen Code QWEN.md Configurable like Gemini CLI
Aider any file Pass conventions with --read CONVENTIONS.md or in .aider.conf.yml
Copilot CLI AGENTS.md, .github/copilot-instructions.md  

Portability tip: keep one canonical AGENTS.md (the convention) and point other tools at it (configure the context filename, or keep a one-line CLAUDE.md/GEMINI.md that tells the agent to read AGENTS.md). One source of truth beats four drifting copies.

What to put in it: exact build, test and lint commands; how to run one test; code conventions the linter does not enforce; directories never to touch; the definition of done.


Safety and permission models

All of these agents run commands on your machine. They differ in how they contain that.

Approach Used by What it protects
OS-level sandbox (filesystem and network limits enforced by the OS) Codex CLI by default; optional in Claude Code and Gemini CLI Commands cannot write outside allowed paths or reach the network unless permitted
Approval prompts and allow/deny rules Nearly all You confirm risky commands and edits
Git as the safety net Aider (auto-commits), all others with clean working trees Easy review and rollback of file changes, but not of command side effects
Container or VM isolation Any agent, run inside Docker, a devcontainer or a VM Everything, if the container has no real credentials

Rules of thumb:

  1. Start in the most restrictive mode and loosen per project.
  2. Never use “skip all permissions” or “yolo” modes on a machine with real credentials; use them only inside disposable containers.
  3. Keep network access off for commands unless the task needs it: prompt injection in a README, issue or dependency can steer an agent with network access to leak data.
  4. Do not put secrets in instruction files or prompts; scope API keys in CI to the agent step only.
  5. Review every diff before merging; protect your main branch.

Running local models

Local models keep code on your machine and cost nothing per token. Typical setup:

  1. Run a local server: Ollama, LM Studio, llama.cpp llama-server, or vLLM.
  2. Point the agent at it:
    • Codex CLI: codex --oss with oss_provider = "ollama" or "lmstudio".
    • OpenCode, Aider, Goose, Crush, Kilo, Cline: add an OpenAI-compatible or Ollama provider in their config.
    • Qwen Code: an OpenAI-compatible endpoint serving a Qwen coder model.
  3. Pick a model that is good at tool calling and has a long enough context window; agentic coding stresses both.

Expectations: on a strong workstation, current open-weight coding models handle focused edits, explanations and tests well. Long autonomous refactors are where frontier hosted models still pull ahead. Measure on your own tasks.


Benchmarks: how to read them

Benchmark Measures Link
SWE-bench (and variants such as Verified) Resolving real GitHub issues in Python repositories with tests swebench.com
Terminal-Bench Completing tasks in a real terminal environment tbench.ai
Aider’s leaderboards Model performance in Aider’s code-editing tasks aider.chat

Caveats:


How to choose: a decision guide

Do you already pay for a plan that includes an agent?
├── Claude plan ─────────────► Claude Code
├── ChatGPT plan ────────────► Codex CLI
├── Copilot ─────────────────► Copilot CLI
├── Google AI Pro/Ultra/free ► Antigravity CLI
└── None / want flexibility
      │
      ├── Must be open source?
      │     ├── Any model provider ─────► OpenCode, Goose, Kilo CLI, Cline, Aider
      │     ├── Strong sandboxing first ─► Codex CLI (works with API keys or --oss)
      │     └── Specific model family ──► Qwen Code, Mistral Vibe, Gemini CLI (paid/enterprise)
      │
      ├── Must run fully local? ───────► OpenCode, Aider, Goose, Codex --oss
      │
      └── Want git-commit-per-change control? ► Aider

Also weigh: team policy (enterprise controls, SSO, data retention), CI needs (headless mode, structured output), your editor (some agents pair with IDE extensions), and how much customization (hooks, skills, plugins) you will actually use.


Run your own bake-off in an afternoon

  1. Pick 6 to 10 real tasks from your backlog: a small bug, a test to add, a refactor across files, a config change, a “explain this module” question, a failing CI fix.
  2. Write the same AGENTS.md for all agents (or equivalents) with build and test commands.
  3. Run each task in each agent from a clean branch, with similar permission levels and a time cap.
  4. Score: task completed (tests pass), number of interventions you needed, diff quality (would you merge it?), time, and cost (tokens or plan usage).
  5. Repeat the top two on three more tasks before deciding.

Template scoring sheet:

Task Agent Done? Interventions Merge-ready? Time Cost Notes
Fix flaky date test              
Add pagination to /orders              

Using two agents together

Many developers keep two agents and use each where it is strongest:


Migrating off Gemini CLI

If you are moving from Gemini CLI to another agent, three things carry over with little effort:

1. Project instructions. Rename or copy GEMINI.md to AGENTS.md (read by Codex CLI, OpenCode, Copilot CLI and others). For Claude Code, keep a CLAUDE.md that points to AGENTS.md, or rely on its ability to read AGENTS.md when no CLAUDE.md exists. Remove Gemini-specific wording (“use the Google Search tool”) and keep the build, test and convention rules.

2. MCP servers. The server definitions are the same idea in every tool; only the config syntax differs:

// Gemini CLI: ~/.gemini/settings.json (or .gemini/settings.json in the project)
{ "mcpServers": { "playwright": { "command": "npx", "args": ["-y", "@playwright/mcp@latest"] } } }
// Claude Code: .mcp.json in the project root (or `claude mcp add`)
{ "mcpServers": { "playwright": { "command": "npx", "args": ["-y", "@playwright/mcp@latest"] } } }
# Codex CLI: ~/.codex/config.toml (or `codex mcp add playwright -- npx -y @playwright/mcp@latest`)
[mcp_servers.playwright]
command = "npx"
args = ["-y", "@playwright/mcp@latest"]

Other agents use similar fields (command, args, env, or a URL for remote servers); check each tool’s MCP docs.

3. Scripts and CI. Replace gemini -p "<task>" with the target tool’s headless mode, and adjust output parsing:

Need Gemini CLI Claude Code Codex CLI
Interactive session gemini claude codex
One-shot, non-interactive gemini -p "task" claude -p "task" codex exec "task"
JSON output --output-format json --output-format json --json (JSONL events) or --output-schema
Continue last session see /chat and resume options claude -c codex resume --last
Scaffold an instructions file /init /init /init
Add an MCP server edit settings.json claude mcp add codex mcp add
Project instructions file GEMINI.md CLAUDE.md (reads AGENTS.md too) AGENTS.md

If you want to keep Gemini models but leave the Gemini CLI, use a provider-agnostic agent (OpenCode, Goose, Aider, Crush, Kilo, Cline) with a paid Gemini API key, or move to Antigravity CLI for Google-account access.


Team adoption playbook

Rolling an agent out to a team works best in stages:

  1. Pilot (2 weeks): three to five volunteers, two candidate agents, a shared doc of wins and failures.
  2. Standardize instructions: one AGENTS.md per repository with commands, conventions and boundaries; reviewed like code.
  3. Set permission defaults: sandboxed, network off, approvals for anything outside the workspace. Document when to loosen them.
  4. Pick a billing model: seats on a subscription for daily users, API keys with budgets for CI and occasional users.
  5. CI integration: start with read-only jobs (review comments, release notes), then allow edits that produce pull requests, never direct pushes.
  6. Security review: which data may be sent to which provider; secrets handling; approved MCP servers and plugins.
  7. Measure: cycle time, review load, defect rate, and developer satisfaction before and after. Agents that create more review work than they save are not a win.
  8. Share patterns: a short internal page with prompts and workflows that worked.

Glossary


FAQ

What is the best free alternative to Gemini CLI? For Google’s models, Antigravity CLI is Google’s supported free option. For open source with your own API key or local models, OpenCode, Aider and Goose are the most common choices. Codex CLI is open source and works with local models via --oss.

Is Gemini CLI discontinued? No. Google says it continues to support Gemini CLI for enterprise Gemini Code Assist customers and paid API keys. Free and consumer-plan access moved to Antigravity CLI on June 18, 2026.

Which terminal coding agent is best? It depends on your models, budget and workflow. Claude Code and Codex CLI are the most feature-complete vendor agents; OpenCode is the most popular provider-agnostic open-source option. Run a short bake-off on your own tasks.

Is Claude Code open source? No. Its GitHub repository hosts documentation, plugins and issue tracking, but the tool itself is proprietary. Codex CLI, Gemini CLI, OpenCode, Aider, Goose, Qwen Code, Kilo, Cline and Mistral Vibe have open-source licenses.

Can I use these agents with local LLMs? Yes for OpenCode, Aider, Goose, Codex CLI (--oss) and most bring-your-own-key tools. Choose a local model with good tool calling.

Are these agents safe to run on my work laptop? With restrictive permissions, network off for commands, no secrets in prompts and review of every diff, risk is manageable. Run autonomous “skip permissions” modes only in disposable containers.

Do subscriptions or API keys work out cheaper? For daily interactive use, plan subscriptions are usually more economical. For occasional or automated use, pay-as-you-go APIs can be cheaper. Track a week of usage before deciding.

Can these agents work in CI? Yes. Claude Code (claude -p), Codex CLI (codex exec), Gemini CLI, Kilo (kilo run --auto) and others have non-interactive modes. Give the agent job read-only repository permissions and open pull requests from a separate step.

What is AGENTS.md? A plain Markdown convention for project instructions that many coding agents read. See agents.md.

How do I switch agents without losing my setup? Keep instructions in AGENTS.md, define MCP servers in each tool’s config (most use similar fields), and keep scripts tool-agnostic.


Where to go next


Contributing

PRs are welcome: new agents (with links to an official repository or docs and the license), corrections when products change plans, licenses or install commands (please include a source link), and bake-off results with methodology. Keep entries factual and neutral; no affiliate links or marketing copy.

License

This content is licensed under CC BY 4.0.

If this helped you, a star helps others find it.

More free resources

Part of the Ralpberry Labs open-source collection. See also Top 100 Open Source.