← 返回观察名单Back to watchlist
CODING AGENTS · BUYER'S GUIDE

Gemini CLI vs
Claude Code vs Codex

三款热门终端编程 Agent 都能读写代码和执行工具,但许可证、模型生态、部署方式和权限治理并不相同。

All three terminal coding agents can read, edit and run code, but their licenses, model ecosystems, deployment paths and permission controls differ.

先给结论:没有跨场景的唯一赢家。已经采用 Google 生态可先试 Gemini CLI;重视 Claude 工作流与多云企业模型入口可看 Claude Code;需要 Apache-2.0 CLI、ChatGPT 计划以及本地到云端衔接时,Codex CLI 更自然。
Short answer: There is no universal winner. Gemini CLI fits Google-oriented stacks; Claude Code fits teams invested in Claude and multi-cloud model access; Codex CLI fits users wanting an Apache-2.0 CLI connected to ChatGPT and local-to-cloud workflows.

先比较事实,不先比总分

Compare facts before scores

项目Gemini CLIClaude CodeCodex CLI
维护者GoogleAnthropicOpenAI
仓库许可Apache-2.0商业条款 / 非标准开源Apache-2.0
主要语言TypeScriptTypeScriptRust
主要认证Google / Gemini API / CloudClaude 计划 / Console / Bedrock / VertexChatGPT / OpenAI API
扩展MCP、Extensions、SkillsMCP、Plugins、HooksMCP、Skills、AGENTS.md
主要边界Google 模型与配额依赖许可证和商业条款本地与云端模式选择

按使用场景选择

你已经在 Google Cloud 或 Gemini 生态

Gemini CLI 的认证、模型和 Google 工具链衔接更自然。它的 Apache-2.0 许可也适合需要研究和二次集成的团队。

你希望以 Claude 为核心,并接 Bedrock 或 Vertex

Claude Code 提供官方企业模型平台路径,终端、IDE 和 GitHub 工作流成熟。但应先接受它不是标准开源项目的事实,再评估数据、采购和组织策略。

你已有 ChatGPT 计划,或希望本地与云端任务协同

Codex CLI 可用 ChatGPT 登录,也支持 API Key,并与 IDE、桌面 App 和 Codex Cloud 形成同一套工作流。开源 CLI 使用 Apache-2.0。

真正公平的试用方法

不要让三款工具分别做不同任务。选择同一个中等规模仓库,固定以下三项任务:

  1. 定位一个已有测试覆盖的 Bug,修改并运行测试。
  2. 实现一个包含三个文件的小功能,同时遵守仓库约定。
  3. 解释一次失败原因并恢复到干净状态。

记录完成率、人工确认次数、错误修改数、总耗时和可归因成本。至少重复三轮,再决定团队默认工具。

结论边界

本指南基于三家官方仓库和文档,以及 2026-10-15 的 GitHub 指标;尚未完成同仓库、同任务、同模型预算的实测,所以不宣称绝对胜负。详细初评见 Gemini CLI、Claude Code 和 Codex CLI。

Choose by workflow

You already use Google Cloud or Gemini

Gemini CLI aligns naturally with Google authentication, models and tooling. Apache-2.0 also makes the CLI easier to study and integrate.

You want Claude with Bedrock or Vertex options

Claude Code offers official enterprise model-platform paths and mature terminal, IDE and GitHub workflows. Evaluate it as a commercial product with a public repository, not as standard open source.

You have a ChatGPT plan or want local-to-cloud continuity

Codex CLI supports ChatGPT sign-in and API keys, with related IDE, desktop and Codex Cloud workflows. The CLI repository is Apache-2.0.

A fair trial

Give all three the same medium-sized repository and the same tasks:

  1. Fix a tested bug and run the relevant tests.
  2. Implement a small three-file feature while following repository conventions.
  3. Explain a failure and restore a clean state.

Track completion, confirmations, incorrect edits, total time and attributable cost. Repeat at least three rounds before choosing a team default.

Limits

This guide uses official repositories and documentation plus GitHub metrics captured on 2026-10-15. It does not claim an absolute winner without a same-repository, same-task, same-budget benchmark. See the individual reviews for Gemini CLI, Claude Code and Codex CLI.