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
- Quick picks
- The big comparison table
- How you pay: four pricing models
- Where to check current prices
- Scenarios: what we would pick and why
- Agent profiles
- Feature matrix
- Project instruction files
- Safety and permission models
- Running local models
- Benchmarks: how to read them
- How to choose: a decision guide
- Run your own bake-off in an afternoon
- Using two agents together
- Migrating off Gemini CLI
- Team adoption playbook
- Glossary
- FAQ
- Where to go next
- Contributing
- License
- More free resources
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 | Apache-2.0 | Gemini models | Code Assist Standard/Enterprise, or paid Gemini/Vertex API | npm install -g @google/gemini-cli |
|
| Antigravity CLI | 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:
- Start sessions with a clear, scoped task; long wandering sessions burn tokens.
- Use project instruction files so the agent does not rediscover setup every time.
- Compact or reset context between tasks.
- Use a smaller or faster model for routine edits and a stronger one for planning and debugging.
- 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
- What: Anthropic’s agentic coding tool for the terminal, also in VS Code, JetBrains, a desktop app, the web and mobile. (docs)
- Install: native installer (
curl -fsSL https://claude.ai/install.sh | bash), Homebrew (brew install --cask claude-code), WinGet, and Linux package managers. - Pay: Claude subscription or Anthropic Console (API); third-party cloud providers are supported for the CLI and IDE plugins.
- Strengths: permission modes and fine-grained allow/deny rules, hooks, subagents and parallel background agents, skills and plugins, MCP, headless mode (
claude -p) for scripts and CI, GitHub Actions and GitLab integration,CLAUDE.mdmemory (and it can read an existingAGENTS.md). - Trade-offs: Claude models only (through Anthropic or supported cloud providers); not open source.
- Best for: complex multi-file work, teams that want deep customization and automation.
OpenAI Codex CLI
- What: OpenAI’s open-source (Apache-2.0) Rust terminal agent; shares config with the Codex IDE extension and desktop app. (repo, docs)
- Install:
npm install -g @openai/codex,brew install --cask codex, or the standalone installer. - Pay: sign in with a ChatGPT plan (usage limits by plan) or use an API key.
- Strengths: OS-level sandbox modes (
read-only,workspace-write,danger-full-access) with approval policies,codex execwith JSONL events and JSON Schema output for CI,codex review, AGENTS.md, MCP, local models with--oss, cloud hand-off. - Trade-offs: tuned for OpenAI models; custom providers possible but not the main path.
- Best for: security-conscious local use and automation pipelines.
Gemini CLI
- What: Google’s open-source (Apache-2.0) terminal agent. (repo, docs)
- Install:
npx @google/gemini-cli,npm install -g @google/gemini-cli,brew install gemini-cli. - Pay: now aimed at Gemini Code Assist Standard/Enterprise and Code Assist for GitHub on Google Cloud, plus paid Gemini API and Vertex keys. Free and Google AI Pro/Ultra access moved to Antigravity CLI (above).
- Strengths: open source, large-context Gemini models, Google Search grounding, MCP, extensions,
GEMINI.mdcontext files, headless mode. - Trade-offs: the repository states it is not optimized for the newest Gemini generation.
- Best for: enterprises standardized on Gemini Code Assist; developers who want to read or fork the source.
Antigravity CLI
- What: Google’s interactive, multi-agent coding terminal (
agy), the supported Google CLI for free users and Google AI Pro/Ultra subscribers since June 2026. (product page) - Pay: free tier and Google AI plans; Google Cloud for organizations.
- Best for: using current Gemini models from the terminal with a Google account.
- Note: check the product page for license, platform support and limits; this guide will add details as official documentation matures.
OpenCode
- What: an open-source (MIT) coding agent with a terminal UI and client/server design, built to work with many model providers. (repo, site)
- Install:
curl -fsSL https://opencode.ai/v2/install | bash, npm, or Homebrew. - Pay: bring your own provider keys, local models, or supported subscriptions.
- Strengths: provider freedom, very active development, LSP integration, multiple sessions, AGENTS.md.
- Best for: developers who switch models often or want one open-source tool for everything.
Aider
- What: the original open-source (Apache-2.0) AI pair programmer for the terminal. (repo, site)
- Install:
python -m pip install aider-install && aider-install. - Pay: bring your own key; works with most providers and local models.
- Strengths: git-native workflow (each change is a commit with a message), repository map for context, edit formats tuned per model, voice input, watch mode for IDE comments.
- Trade-offs: more “pair programmer” than autonomous agent; development pace has slowed in 2026 compared with the newest agents.
- Best for: careful, reviewable edits where you stay in control of every step.
GitHub Copilot CLI
- What: GitHub’s terminal agent that brings the Copilot coding agent to your shell. (repo, docs)
- Install: Homebrew (
brew install copilot-cli), npm, or WinGet; see the README. - Pay: requires an active Copilot subscription; usage counts against your Copilot plan.
- Strengths: GitHub-native (issues, pull requests, Actions context through the GitHub MCP server), multiple model choices within Copilot, enterprise policy controls.
- Best for: teams already on Copilot Business or Enterprise.
Qwen Code
- What: an open-source (Apache-2.0) terminal agent from the Qwen team, adapted from Gemini CLI and optimized for Qwen coder models. (repo, docs)
- Install:
npm install -g @qwen-code/qwen-code@latest. - Pay: sign in with a Qwen account or use an OpenAI-compatible API key (including self-hosted Qwen models).
- Best for: using Qwen models, including self-hosted open-weight ones, with a Gemini CLI-like experience.
Goose
- What: an open-source (Apache-2.0), extensible AI agent for coding and general automation, originally from Block and now part of the Linux Foundation’s Agentic AI Foundation (AAIF). CLI and desktop app. (repo, docs)
- Pay: bring your own key or local models.
- Strengths: MCP-first extensibility, recipes for repeatable workflows, works beyond code (APIs, files, apps).
- Best for: teams wanting a vendor-neutral, foundation-governed agent.
Crush
- What: Charm’s agentic coding TUI with a polished interface, multiple providers, LSP and MCP support. (repo)
- Install:
brew install charmbracelet/tap/crushornpm install -g @charmland/crush. - License: Functional Source License 1.1 with MIT future license (FSL-1.1-MIT): source-available with competing-use restrictions that convert to MIT after a period. Read it before embedding in a product.
- Best for: developers who live in the terminal and value UX.
Kilo CLI
- What: the command-line side of Kilo, an open-source (MIT) agentic engineering platform with IDE extensions. (repo, site)
- Install:
npm install -g @kilocode/cli;kilo run --auto "<task>"for non-interactive CI runs. - Pay: a Kilo account or your own provider keys; see the site for current pricing.
- Best for: teams using Kilo in the IDE who want the same agent in CI.
Cline
- What: an open-source (Apache-2.0) autonomous coding agent available as an SDK, IDE extension and CLI. (repo, site)
- Pay: bring your own key, or a Cline account.
- Strengths: plan/act modes, explicit approvals, broad provider support.
- Best for: VS Code users who want the same agent in the terminal.
Mistral Vibe
- What: Mistral AI’s minimal, open-source (Apache-2.0) CLI coding agent. (repo, docs)
- Install:
curl -LsSf https://mistral.ai/vibe/install.sh | bashoruv tool install mistral-vibe. - Best for: Mistral model users and those who prefer a small, readable agent.
Kimi Code
- What: Moonshot AI’s coding CLI for Kimi models, the successor to the archived Python Kimi CLI. (repo)
- Install:
curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash(see repo for npm options). - Best for: Kimi model users.
Cursor CLI
- What: Cursor’s terminal agent (installs an
agentcommand), with models from several vendors. (page) - Install:
curl https://cursor.com/install -fsS | bash. - Pay: Cursor plans; check the pricing page.
- Note: Cursor’s site now carries Grok Build branding; check the page for current product names and plans.
- Best for: Cursor users who want the same agent in the terminal and in CI.
Amp, Factory Droid, Auggie and Warp
Commercial agents worth evaluating:
- Amp: agentic coding tool with a CLI and editor extensions and a curated set of models; see the site for pricing.
- Factory Droid: Factory’s CLI agent (“droid”) for interactive and headless use.
- Auggie: Augment Code’s terminal agent, built around Augment’s codebase context engine.
- Warp: a terminal with built-in agents rather than a standalone CLI agent.
OpenHands and Continue
- OpenHands (MIT): an open platform for AI software development agents with CLI, GUI, cloud and SDK options; popular for autonomous and research use.
- Continue (Apache-2.0): open-source coding agent with IDE extensions and a CLI, focused on configurable, team-shared agents and checks.
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:
- Start in the most restrictive mode and loosen per project.
- Never use “skip all permissions” or “yolo” modes on a machine with real credentials; use them only inside disposable containers.
- 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.
- Do not put secrets in instruction files or prompts; scope API keys in CI to the agent step only.
- 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:
- Run a local server: Ollama, LM Studio, llama.cpp
llama-server, or vLLM. - Point the agent at it:
- Codex CLI:
codex --osswithoss_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.
- Codex CLI:
- 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:
- Scores measure a model plus a harness. The same model scores differently in different agents. Vendors often report their own model in their own harness.
- Benchmarks lag reality. New models and agent versions ship faster than independent evaluations.
- Contamination and overfitting are real concerns for public benchmarks.
- Your codebase is the benchmark that matters. Run a bake-off (below).
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
- 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.
- Write the same AGENTS.md for all agents (or equivalents) with build and test commands.
- Run each task in each agent from a clean branch, with similar permission levels and a time cap.
- Score: task completed (tests pass), number of interventions you needed, diff quality (would you merge it?), time, and cost (tokens or plan usage).
- 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:
- Second-opinion review: implement with one agent, review with another (for example
codex review --base mainafter a Claude Code session, or the reverse). Different models catch different issues. Some vendors ship bridges, such as OpenAI’s Codex plugin for Claude Code. - Planner and executor: plan with a stronger, more expensive model; execute routine steps with a cheaper or local one.
- Shared instructions: one
AGENTS.mdso both agents follow the same rules. - Separate worktrees (
git worktree add) so parallel agents never edit the same checkout.
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:
- Pilot (2 weeks): three to five volunteers, two candidate agents, a shared doc of wins and failures.
- Standardize instructions: one
AGENTS.mdper repository with commands, conventions and boundaries; reviewed like code. - Set permission defaults: sandboxed, network off, approvals for anything outside the workspace. Document when to loosen them.
- Pick a billing model: seats on a subscription for daily users, API keys with budgets for CI and occasional users.
- CI integration: start with read-only jobs (review comments, release notes), then allow edits that produce pull requests, never direct pushes.
- Security review: which data may be sent to which provider; secrets handling; approved MCP servers and plugins.
- 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.
- Share patterns: a short internal page with prompts and workflows that worked.
Glossary
- Agent harness: the program around a model that gives it tools (read files, edit, run commands), manages context and enforces permissions.
- Headless mode: running an agent non-interactively from scripts or CI.
- Sandbox: OS-level isolation limiting which files and network a command can touch.
- Approval policy: when an agent must ask before acting.
- MCP: Model Context Protocol, a standard for connecting agents to tools and data.
- Instruction file: Markdown read at session start (
AGENTS.md,CLAUDE.md,GEMINI.md). - Subagent: a helper agent with its own context, started by the main agent for a sub-task.
- BYOK: bring your own key; the tool is free, you pay a model provider directly.
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
- Install two agents from the quick picks and run the bake-off.
- Write a solid
AGENTS.md(agents.md) for your main repository. - Read the official docs of your pick: Claude Code, Codex, Gemini CLI, OpenCode, Aider, Copilot CLI.
- Add one MCP server you will really use (browser automation, your issue tracker, your docs).
- Learn the Model Context Protocol to connect agents to your own tools.
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.