A side-by-side of two tools in the same category. Facts come from each vendor's own pages, checked 2026-10-28.
Gemini CLI is Google's open-source terminal agent for Gemini models. Codex CLI is OpenAI's open-source agent for OpenAI models. Both use Apache-2.0 and offer headless runs and MCP.
Where they differ
Free access. Google ended free Code Assist for individuals and Google AI Pro and Ultra access on 2026-06-18 and points them to Antigravity CLI. Codex CLI is included in a ChatGPT free tier with usage limits.
Sign-in. Gemini CLI uses a Code Assist licence, a paid Gemini API key or Vertex AI. Codex CLI uses a ChatGPT plan or an OpenAI API key, and API-key use excludes cloud features.
Sandboxing. Gemini CLI documents macOS Seatbelt, Docker or Podman, and gVisor on Linux. Codex CLI has a sandbox and a native Windows sandbox.
Maturity. Gemini CLI is version 0.x and not optimised for the newest Gemini models, per its README.
Which fits
Pick Gemini CLI if your team holds a Gemini Code Assist licence or a paid Gemini or Vertex key.
Pick Codex CLI if you have a ChatGPT plan or OpenAI key.