Codex CLI alternative
An open-source alternative to OpenAI Codex CLI (2026)
In short: The Codex CLI is built around OpenAI. agentty signs in with the same ChatGPT plan, and also runs Claude, Copilot, Kimi, any API key or local Ollama, from a single native binary with a sandbox by default.
If you like the Codex CLI's terminal workflow but want to use more than one provider and an open-source codebase, agentty is the alternative to try.
Why look for a Codex CLI alternative
- You don't want to be locked to a single provider.
- You want an open-source agent you can read and self-host.
- You want a lighter install: Codex through npm takes 536 MB on disk with Node.js and 402 ms to be ready.
How agentty compares
- agentty47 ms
- Codex CLI402 ms8.6×
- agentty21 MB
- Codex CLI152 MB7.2×
- agentty23 MB
- Codex CLI536 MB23×
median of 10 launches · same machine · fresh install, no login · method & all numbers
- Provider-agnostic — sign in with the Claude Pro/Max, ChatGPT, GitHub Copilot or Kimi plan you have, use an API key for OpenAI, DeepSeek, Gemini, Grok, Mistral, Groq or OpenRouter, or run a local model through Ollama.
- Single static binary — 23.1 MB, ready to type in 47 ms, idles at 21 MB.
- Sandboxed by default; one-command SSH air-gap.
- Retrieval built in so only relevant code is sent to the model.
- Open source (MIT), MCP-capable, runs in Zed or JetBrains over ACP.
Full side-by-side: agentty vs Codex CLI.
Bring your Codex sessions with you
You don't lose your history by switching. agentty lists your Codex sessions in its thread list (Ctrl+J), and you can open one and keep going, on GPT or any other model. The turns, tool calls and patches show up the way agentty draws its own. Your ~/.codex/AGENTS.md is read as-is, and agentty mcp import --from codex copies the MCP servers from your config.toml. Details in Coming from Codex or Claude Code.
Install in one line
curl -fsSL https://agentty.org/install.sh | shInstall in one line — a single static binary, no Node or Python.
curl -fsSL https://agentty.org/install.sh | sh