A side-by-side of two tools in the same category. Facts come from each vendor's own pages, checked 2026-10-28.
Qwen Code started as a fork of Gemini CLI v0.8.2 and has developed independently since v0.1. Both are Apache-2.0 terminal agents with headless modes and MCP.
Where they differ
Free access. Qwen's free OAuth tier ended on 2026-04-15, and Google ended free consumer Gemini CLI access on 2026-06-18. Each now needs a paid route or, for Qwen Code, a local model.
Models. Gemini CLI documents Gemini models through Google login, an API key or Vertex AI. Qwen Code also accepts OpenAI-, Anthropic- and Gemini-compatible endpoints, and its README names Ollama and vLLM.
Extras. Qwen Code has SDKs for TypeScript, Python and Java, git worktrees and agent teams. Gemini CLI documents three sandbox types, while we only confirmed that Qwen Code lists a sandbox.
Direction. Google steers individuals to Antigravity CLI. Qwen Code's web UI and daemon mode are experimental.
Which fits
Pick Qwen Code if you want an open-source agent for several API styles or a local model.
Pick Gemini CLI if your team has a Gemini Code Assist licence or a paid Gemini key.
FreeThe CLI itself is free (Apache-2.0). Model cost comes from whichever provider you connect: your own API key (OpenAI-, Anthropic-, Gemini-compatible…
FreeThe CLI is free (Apache-2.0), but the free consumer route has ended (seen 2026-10-28).
source
Open source
Open source
MCP
✓ yes
✓ yes
Multi-agent
✓ yes
✓ yes
Headless / CI
✓ yes
✓ yes
Sandbox
✓ yes
✓ yes
Local models
✓ yes
? not verified
Your own API key
✓ yes
✓ yes
Git worktrees
✓ yes
? not verified
SSH
? not verified
? not verified
Gemini CLI is stronger at
Apache-2.0 with weekly stable/preview and daily nightly releases (v0.66.0 on 2026-10-27)
Documented headless mode (-p with json and stream-json output) and MCP server configuration
Three sandbox options: macOS Seatbelt, Docker/Podman containers, and gVisor on Linux
Multiple auth routes: Google login, Gemini API key, Vertex AI
Qwen Code is stronger at
Apache-2.0 licence, very active repo (pushed daily, 28k+ stars) with SDKs for TypeScript, Python and Java
Not tied to Qwen models: OpenAI-, Anthropic-, Gemini-compatible endpoints, third-party providers and local servers such as Ollama/vLLM are listed
Headless `qwen -p` for scripts and CI, plus an experimental `qwen serve` daemon and chat channels (Telegram, DingTalk, WeChat, Feishu)
Documents subagents, agent teams, MCP, sandbox and git worktrees
which to pick
pick Gemini CLI if
Teams with a Gemini Code Assist licence or a paid Gemini/Vertex API key who want an open-source CLI agent.
pick Qwen Code if
Developers who want an open-source Claude Code-style agent that can point at Qwen, other cloud APIs or a local model.
skip Gemini CLI if
Individuals looking for a free tier or the newest Gemini models; Google steers them to Antigravity CLI.
skip Qwen Code if
Anyone looking for a zero-cost hosted model out of the box, now that the free OAuth quota is gone.