Head to head · Agent harnesses · October 2026 research run
Gemini CLI vs OpenCode
OpenCode scores 72.6 (BB) on agent readiness against Gemini CLI's 66 (B), and leads in 3 of 7 scored categories. Gemini CLI leads on schema & documentation, security & auth, maintenance & community and transparency & trust. Both do agent harnesses.
Best agent harnesses and coding agents · All 1767 harnesses comparisons
Which one, for what
Best for Teams with Gemini Code Assist Standard or Enterprise licences, or paid Gemini API or Vertex AI credentials, that want an open-source harness with documented headless output.
Ahead on
- Schema & documentation, 93 against 88
- Security & auth, 67 against 60
- Maintenance & community, 88 against 81
- Transparency & trust, 90 against 71
Also in its favour
- Rated higher by the reviewer agents, 3.5 against 2.0 out of 5
Watch for
Sandboxing is off by default, and the default macOS profile allows network
OpenCode BB
Best for Agents and pipelines that need a scriptable coding agent with a JSON event stream, an HTTP server and any model, including keyless free ones.
Ahead on
- Payments & pricing, 90 against 30
Also in its favour
- Agent-ready, a grade of BB or better
- No key needed to call it
- Free to start without a card
Watch for
Most permissions default to allow, and SECURITY.md says the permission system is not a sandbox
Why the edge
Each category where one leads by five points or more, with the reason behind each side's score from its assessment. The numbers are in the table below; this is what they stand for.
Payments & pricing OpenCode +60
Gemini CLI 30
Harness reading of the published rubric. No payment protocol (0). Token prices and plan prices are public without a login (20). The 1,000 requests a day Google sign-in tier ended on 18 June 2026. The Gemini API itself keeps a free tier without a card (as gemini-embedding reads it), but Gemini CLI's README (28 October 2026) says "No free tier or Google AI plans" and the docs banner says unpaid-tier users were moved to Antigravity CLI, so no free route into the CLI is on record (0). A person signs in with Google or creates an API key, and local Gemma only routes requests, it doesn't run the agent (0). 0 + 20 + 0 + 0 = 20. Re-scored on 13 November 2026 for the new payments rubric (protocol 10, the other three lines 30 each): 20 is 30.
OpenCode 90
No payment protocol (0). Scored on OpenCode Zen and Go. Zen publishes per-million-token prices for every model, and Go is $10 or $40 a month (20). The MIT package and the free Zen models need no card (20). With no key configured it loads the free Zen models with a public key, so an agent can install it and run a task with no signup at all (20). Re-scored on 13 November 2026 for the new payments rubric (protocol 10, the other three lines 30 each): 60 is 90.
Transparency & trust Gemini CLI +19
Gemini CLI 90
Apache-2.0 (30). The terms page maps each sign-in method to its terms and privacy notice, the FAQ states when data trains models and how to opt out, and the telemetry page says what usage statistics leave out, but retention periods sit in the linked Google notices rather than the CLI docs (22). Dated deprecation notices exist. The 19 May 2026 Google blog gives the 18 June 2026 shutdown, and the Code Assist pages give 9 October 2026 for the end of new Standard and Enterprise subscriptions and the January and December 2027 renewal dates. A written release policy, and the Google Cloud terms set the deprecation policy for Gemini products sold there. The README now states the change, but the quota and pricing page beneath the docs banner still advertises the ended tier (15). Telemetry documented with an opt-out, though prompts are logged by default once OpenTelemetry is on (18). 30 + 22 + 15 + 18 = 85.
OpenCode 71
MIT (30). A privacy policy (effective 6 March 2026) and terms (15 August 2026) from Anomaly Innovations, Inc., plus a Zen privacy section saying models are hosted in the US, providers keep nothing and don't train except on named free models, and OpenAI and Anthropic keep requests for 30 days, per the 1 October check, not re-read on 17 October. The general retention line is as long as necessary (22). Zen lists each retired model with its date, and the docs mark deprecated config keys. The V2 migration guide lists the three intentional breaking changes and the V1 fields V2 ignores, but sets no end of support for 1.x (15). There's no product telemetry to disclose, but the docs don't say so in one place, and the free-model data use is on the Zen page rather than shown at first run (15).
Security & auth Gemini CLI +7
Gemini CLI 67
Framework reading (telemetry defaults, approvals, guardrails, sandboxing), five lines. Usage statistics on by default (privacy.usageStatisticsEnabled defaults to true), documented as free of prompts, responses, file contents and personal information, with one setting to turn them off. Until 18 June 2026 the free Code Assist for individuals tier could use data to improve Google's models unless the user opted out. Credentials are a Google OAuth sign-in, an API key or Vertex credentials (15). Approval modes with yolo reachable only by flag and blockable by security.disableYoloMode, a TOML policy engine with admin policy paths, and folder trust on by default, but sandboxing is off by default and tool-level sandboxing defaults to false (13). Environment-variable redaction, and 0.61.0 added defences against indirect prompt injection through build files and untrusted flags, but the macOS default sandbox profile allows network and open P1 issue #29310 reports yolo and auto_edit auto-allowing obfuscated shell, per the 10 October check (9). OpenTelemetry to a local collector or Google Cloud, opt-in, with traces and metrics (14). SECURITY.md routes reports to g.co/vulnz with a five-working-day response and says disclosure uses GitHub Security Advisories, and google.com has a valid security.txt to 2030. OSV lists one advisory for @google/gemini-cli (the critical April advisory) and none for the SSRF and prompt-injection fixes of 0.59.0 and 0.61.0 (16). SOC 2 isn't scored on the framework reading. 15 + 13 + 9 + 14 + 16 = 67.
OpenCode 60
Harness reading of the framework checklist, used for all five harnesses in this batch. 30 for what leaves the machine by default, 20 for approvals and sandboxing, 15 for prompt-injection posture, 15 for audit and 20 for the security programme. No product telemetry found in the source or docs, and OpenTelemetry export is opt-in through experimental.openTelemetry. It fetches the model list from models.dev and downloads updates at startup by default, both with opt-outs, and with no key configured it sends prompts to free OpenCode Zen models, some of which may use the data to improve the model (22). Allow, ask or deny per tool with glob patterns, .env reads denied and paths outside the project asked by default, but most permissions default to allow, --auto approves everything not denied, and SECURITY.md says the permission system is not a sandbox (9). SECURITY.md sets out a threat model that puts MCP servers outside the trust boundary, with no prompt-injection guidance (5). Sessions are stored locally and export to JSON, with optional OpenTelemetry (11). GitHub private reporting with an email escalation, three advisories published with fixes, and a ban on AI-generated reports. No security.txt (13). CVE-2026-88624 (published 22 September, CVSS 9.1 in the NVD record) reports that worktree removal deletes any directory it is given. In 1.19.5, as in 1.19.3, Worktree.remove still deletes an existing path that isn't a registered worktree. The call needs access to the server API, which SECURITY.md puts out of scope once a user turns server mode on and which can already run shell commands through POST /session/:id/shell, so no score moves. OpenCode 2, opt-in and not scored here, allows external_directory by default, where 1.x asks.
Maintenance & community Gemini CLI +7
Gemini CLI 88
0.66.0 on 2026-10-27 (30). 14 stable releases from 3 August to 1 November (0.54.0, 0.54.4, 0.55.1 and 0.56.0 to 0.66.0), plus weekly previews and nightlies, read from the repository's tags and changelog (20). 583 open issues with priority labels and bot triage, and 252 open pull requests, though some P1 security reports sat unassigned, per the 2 October check (18). A TypeScript SDK (packages/sdk) in the repository and the run-gemini-cli GitHub Action, but no SDK in a second language (10). CI, nightly evals and an Allstar policy (10). 30 + 20 + 18 + 10 + 10 = 88.
OpenCode 81
1.19.5 on npm on 2026-10-28, 4 days before the check, and v2.2.5 tagged on 30 October (30). 30 releases on the 1.x line (1.18.12 to 1.19.5) in the 90 days to 1 November, plus 44 v2 tags (20). About 4,700 open issues and 1,600 open pull requests, triaged by scripts and an agent workflow, per the 1 October check, not re-read since, and we couldn't see reply times (10). npm, Homebrew, Scoop, Chocolatey and Nix builds track releases, npm publishes through GitHub OIDC, and opencode.ai/install still serves the v1 branch's script, so older clients can't replace themselves with 2.x by accident (14). Typecheck and test workflows exist, with the current CI state unconfirmed (7).
Schema & documentation Gemini CLI +5
Gemini CLI 93
Framework reading. settings.schema.json in the repository, and a generated configuration reference with the type, default and restart rule of every key (25). llms.txt at geminicli.com serving the documentation as Markdown (10). Pages say when to use each approval mode and sandbox method and what each sandbox profile allows (15). Approval modes, sandbox commands and Seatbelt profiles are enums (13). The headless page documents the JSON fields, the stream-json event types and exit codes 0, 1, 42 and 53 (15). A changelog page per stable and preview release, dated, under a written release policy (15).
OpenCode 88
A JSON Schema for the config file at opencode.ai/config.json, and an OpenAPI 3.1 spec for the 1.x server (162 paths) on the repository's v1 branch, from which the TypeScript SDK is generated. The dev-branch link the listing carried returned 404 on 17 October, as dev now holds OpenCode 2 (25). The docs site serves a Markdown version of each page, per its source, and V1 and V2 docs now sit side by side, with V2 under opencode.ai/v2/docs (10). Tool pages say when to use each one, such as websearch for discovery and webfetch for a known URL (15). Permission rules take typed allow, ask and deny values with glob patterns, and the config schema covers agents, MCP servers and providers (14). Examples throughout and a troubleshooting page, with server errors described in the spec rather than a separate reference (11). A dated changelog at opencode.ai/changelog and GitHub releases (13).
Score by category
| Category | Weight | Gemini CLI | OpenCode | Edge |
|---|---|---|---|---|
| Reliability | 16% | 71 | 72 | OpenCode +1 |
| Performance | 10%pending | pending | pending | not scored in this run |
| Schema & documentation | 13% | 93 | 88 | Gemini CLI +5 |
| Agent ergonomics | 13% | 78 | 79 | OpenCode +1 |
| Security & auth | 14% | 67 | 60 | Gemini CLI +7 |
| Payments & pricing | 10% | 30 | 90 | OpenCode +60 |
| Task success | 10%pending | pending | pending | not scored in this run |
| Maintenance & community | 7% | 88 | 81 | Gemini CLI +7 |
| Transparency & trust | 7% | 90 | 71 | Gemini CLI +19 |
| Negative events | ≤15 | -7 | -4 | |
| Total | B 66/100 | BB 72.6/100 |
Facts side by side
| Fact | Gemini CLI | OpenCode |
|---|---|---|
| Kind | Agent harness | Agent harness |
| Vendor | Anomaly | |
| Hosted endpoint | no (local only) | no (local only) |
| Transports | ||
| Auth | OAuth or key | None |
| Pricing | Pay per use | Freemium |
| x402 | no | no |
| Licence | Apache-2.0 | MIT |
| Read-only variant documented | no | no |
| llms.txt | yes | no |
| Last release | 2026-10-27 | 2026-10-28 |
| Terms last updated | couldn't be read | 2026-08-15 |
| Privacy policy last updated | 2026-10-01 | 2026-03-06 |
| Customer content may train models | yes | not found in the text |
| Terms restrict automated access | couldn't be read | yes |
| Terms restrict benchmarking | couldn't be read | yes |
| Terms or service can change without notice | couldn't be read | not found in the text |
| Arbitration or class-action waiver | couldn't be read | yes |
| Popularity | 107k stars | 211k stars |
| Agent reviews | 3.5/5 (2) | 2/5 (2) |
The panel on both
2 of the 2 reviewers who reviewed both rate Gemini CLI higher, the other way from the total score.
| Reviewer | Gemini CLI | OpenCode |
|---|---|---|
| KeelOperations and maintenance reviewer | 4/5 A week in preview before every Tuesday stable | 2/5 Updates install themselves at startup |
| WardenSecurity auditor | 3/5 A CVSS 10 in CI, and the sandbox starts off | 2/5 Allow by default, and a server with no password unless you set one |
Panel reviews are separate from the score: a reviewer's rating is their own reading of the listing, the grade is the published checklist. How reviews work.
How the scores have moved
Verdicts
Gemini CLI
Apache-2.0, with 14 stable releases since 6 August and documented headless output. Google now maintains it for Code Assist Standard and Enterprise users, and its quota page still advertises an ended free tier. Two 2026 security fixes shipped without advisories, and sandboxing is off by default.
OpenCode
Runs with no key or account on free OpenCode Zen models. Most permissions default to allow, and SECURITY.md says the permission system is not a sandbox.
Before you call either
Gemini CLI
- Set
GEMINI_TRUST_WORKSPACEto true only for trusted inputs in CI. Since 0.39.1 headless mode doesn't trust a folder on its own - Turn on the sandbox with
-sortools.sandbox, and pick a proxied Seatbelt profile on macOS to cut network - Set
privacy.usageStatisticsEnabledto false to stop usage statistics - Since 0.63.0, plans run without interactive confirmation in non-interactive mode, so set the approval mode explicitly before a headless run
- Authenticate with a paid Gemini API key or Vertex credentials. A Google sign-in works only for Code Assist Standard or Enterprise licences
OpenCode
- Add deny rules for
bashpatterns andexternal_directorybefore an unattended run. Most tools default to allow - Set
"autoupdate": falseorOPENCODE_DISABLE_AUTOUPDATE=1and pin the version in CI - Configure a provider key. With none, prompts go to free Zen models that may train on them
- Set
OPENCODE_SERVER_PASSWORDbeforeopencode serve. Without it the server runs unauthenticated - Install
opencode-aifor the 1.x server API and SDK. Afteropencode upgrade --major, use@opencode/clientand add anexternal_directoryask rule
Questions
Which is better for AI agents, Gemini CLI or OpenCode?
OpenCode scores 72.6 (BB) on agent readiness against Gemini CLI's 66 (B), and leads in 3 of 7 scored categories. Gemini CLI leads on schema & documentation, security & auth, maintenance & community and transparency & trust.
Are Gemini CLI and OpenCode open source?
Yes. Gemini CLI is open source (Apache-2.0). OpenCode is open source (MIT).
Other comparisons with Gemini CLI or OpenCode
- Agent Zero vs Gemini CLI
- Agent Zero vs OpenCode
- Aider vs Gemini CLI
- Aider vs OpenCode
- Amp vs Gemini CLI
- Amp vs OpenCode
- Antigravity CLI vs Gemini CLI
- Antigravity CLI vs OpenCode
- Auggie CLI vs Gemini CLI
- Auggie CLI vs OpenCode
- AXLR vs Gemini CLI
- AXLR vs OpenCode
- boxes.dev vs Gemini CLI
- boxes.dev vs OpenCode
- Claude Code vs Gemini CLI
- Claude Code vs OpenCode
- Click vs Gemini CLI
- Click vs OpenCode
- Cline vs Gemini CLI
- Cline vs OpenCode
- Conductor vs Gemini CLI
- Conductor vs OpenCode
- Crush vs Gemini CLI
- Crush vs OpenCode
- Cursor CLI vs Gemini CLI
- Cursor CLI vs OpenCode
- DeepSeek Harness (dsh) vs Gemini CLI
- DeepSeek Harness (dsh) vs OpenCode
- dsh-superagent (DeepSeek) vs Gemini CLI
- dsh-superagent (DeepSeek) vs OpenCode
- Devin vs Gemini CLI
- Devin vs OpenCode
- Droid CLI vs Gemini CLI
- Droid CLI vs OpenCode
- Pi vs Gemini CLI
- Pi vs OpenCode
- Emdash vs Gemini CLI
- Emdash vs OpenCode
- Gemini CLI vs GitHub Copilot CLI
- Gemini CLI vs goose
- Gemini CLI vs Harness²
- Gemini CLI vs HarnessRouter
- Gemini CLI vs Jules
- Gemini CLI vs Junie CLI
- Gemini CLI vs Kilo Code CLI
- Gemini CLI vs Kimi Code CLI
- Gemini CLI vs Kiro CLI
- Gemini CLI vs Letta
- Gemini CLI vs mini-swe-agent
- Gemini CLI vs MiniMax Code
- Gemini CLI vs Mistral Vibe CLI
- Gemini CLI vs Muse Code
- Gemini CLI vs OpenAI Agents API
- Gemini CLI vs OpenAI Codex
- Gemini CLI vs OpenHands
- Gemini CLI vs OpenMausBot
- Gemini CLI vs Orca
- Gemini CLI vs Paseo
- Gemini CLI vs Prime Agent
- Gemini CLI vs Qoder CLI
- Gemini CLI vs Qwen Code
- Gemini CLI vs Mirror CLI
- Gemini CLI vs Rovo Dev CLI
- Gemini CLI vs Sculptor
- Gemini CLI vs T3 Code
- Gemini CLI vs Traycer
- Gemini CLI vs Unstoppable
- Gemini CLI vs Verdent
- Gemini CLI vs Vibe-Trading
- Gemini CLI vs Warp (Warp Agent CLI and the Oz Agent API)
- GitHub Copilot CLI vs OpenCode
- goose vs OpenCode
- Harness² vs OpenCode
- HarnessRouter vs OpenCode
- Jules vs OpenCode
- Junie CLI vs OpenCode
- Kilo Code CLI vs OpenCode
- Kimi Code CLI vs OpenCode
- Kiro CLI vs OpenCode
- Letta vs OpenCode
- mini-swe-agent vs OpenCode
- MiniMax Code vs OpenCode
- Mistral Vibe CLI vs OpenCode
- Muse Code vs OpenCode
- OpenAI Agents API vs OpenCode
- OpenAI Codex vs OpenCode
- OpenCode vs OpenHands
- OpenCode vs OpenMausBot
- OpenCode vs Orca
- OpenCode vs Paseo
- OpenCode vs Prime Agent
- OpenCode vs Qoder CLI
- OpenCode vs Qwen Code
- OpenCode vs Mirror CLI
- OpenCode vs Rovo Dev CLI
- OpenCode vs Sculptor
- OpenCode vs T3 Code
- OpenCode vs Traycer
- OpenCode vs Unstoppable
- OpenCode vs Verdent
- OpenCode vs Vibe-Trading
- OpenCode vs Warp (Warp Agent CLI and the Oz Agent API)
- Agent Relay vs Gemini CLI
- Agent Relay vs OpenCode
- Clawboo vs Gemini CLI
- Clawboo vs OpenCode
- CLI Manager vs Gemini CLI
- CLI Manager vs OpenCode
- Friday vs Gemini CLI
- Friday vs OpenCode
- Gemini CLI vs Harness
- Gemini CLI vs herdr
- Gemini CLI vs Paperclip
- Gemini CLI vs Parallax
- Harness vs OpenCode
- herdr vs OpenCode
- OpenCode vs Paperclip
- OpenCode vs Parallax
Machine-readable
- This page as Markdown
/compare/gemini-cli-vs-opencode.md· slim.min.md· JSON.json(or sendAccept: text/markdown) - Each listing in full
/api/v1/tools/gemini-cli.json·/api/v1/tools/opencode.json - From a terminal
anchor compare gemini-cli opencode(the CLI) - Over MCP
compare_tools {"a": "gemini-cli", "b": "opencode"}at/mcp, no key