Ad
Learn more

Open Source Codex CLI Alternatives

A curated collection of the 4 best open source alternatives to Codex CLI.

The best open source alternative to Codex CLI is Cline. If that doesn't suit you, we've compiled a ranked list of other open source Codex CLI alternatives to help you find a suitable replacement. Other interesting open source alternatives to Codex CLI are: Qwen Code, Kilo, and CodeAF.

Codex CLI alternatives are mainly AI Coding Agents. Browse these if you want a narrower list of alternatives or looking for a specific functionality of Codex CLI.

Written by Piotr Kulpinski

AI coding agent that runs inside VS Code and the terminal, supporting multi-file edits, bash execution, and any LLM provider via bring-your-own-key.

Screenshot of the Cline website

Cline is an open-source AI coding agent that works inside VS Code and the command line. It reads and edits files across a project, runs terminal commands, reacts to their output in real time, and handles long-running processes like dev servers or test suites.

The Plan/Act mode split lets you discuss a strategy with the agent before it touches any code, then switch to Act mode when you're ready to execute. Every step is approvable, or you can enable auto-approve for unattended runs.

Model choice is unrestricted. Claude, GPT, Gemini, local Ollama or LM Studio instances, and any OpenAI-compatible endpoint all work. You bring your own key or your own weights.

For teams, Cline supports multi-agent setups where a coordinator delegates to specialist agents with their own tools and context windows. It also connects to Slack, Discord, Telegram, and Linear, and runs headlessly inside GitHub Actions or GitLab pipelines. Tools like Roo Code and OpenHands take a similar multi-agent approach if you want to compare.

.clinerules files let you ship coding standards, architecture guidelines, and deployment conventions alongside your repo so the agent follows project-specific rules consistently.

Extensibility comes through the SDK and MCP server support, which lets you register custom tools and connect to databases, APIs, or infrastructure. The project is Apache 2.0 licensed with 250+ contributors.

Terminal-based AI coding agent that reads your codebase, edits files and runs commands, with support for Qwen, OpenAI, Anthropic, Gemini and local models.

Screenshot of the Qwen Code website

Qwen Code is an open source AI coding agent from the Qwen team at Alibaba. It runs in the terminal and reads your codebase, edits files, runs shell commands, and works through multi-step tasks on your local repository.

The project started from Google's Gemini CLI v0.8.2. Since v0.1 it has been developed independently, with its own features and support for many model providers.

Key capabilities:

  • Multi-provider models: works with OpenAI, Anthropic, Gemini and Qwen APIs, any compatible third-party provider, and local models through Ollama or vLLM. You can switch models at runtime.
  • Agent features: subagents, agent teams, skills, auto-memory and MCP server support.
  • More than a terminal: IDE plugins for VS Code, Zed and JetBrains, a desktop app, a web UI, and SDKs for building on top of the agent.
  • Chat integrations: run the agent from Telegram, DingTalk, WeChat or Feishu.

Qwen Code is optimized for Qwen models, and many of those are open-weight, so you can run both the agent and the model on your own hardware. It is a good fit for developers who want a Claude Code alternative without being tied to one model vendor.

Install it with the standalone script, npm (@qwen-code/qwen-code, Node.js 22+) or Homebrew.

Open source AI coding agent with 500+ models, bring-your-own-key support, and specialized modes for writing, debugging, and planning code across IDEs and CLI.

Screenshot of the Kilo website

Kilo is an AI coding agent that works inside VS Code, JetBrains, the command line, and a hosted cloud environment. It's built for developers who want full control over their AI setup: bring your own API keys at zero markup, use local models to keep code private, or route through Kilo's model gateway to access 500+ models.

The agent ships with five specialized modes, each suited to a different part of the development workflow:

  • Code Mode writes, refactors, and ships production-ready code with full codebase context
  • Architect Mode helps plan complex features and structure work before any code is written
  • Debug Mode reads errors, traces issues, and suggests targeted fixes
  • Ask Mode answers questions about your codebase without making changes
  • Custom Mode lets you define your own agent behavior for specific workflows

Switching between modes doesn't mean switching tools. Everything runs in the same agent, in the editor or terminal you're already using.

Kilo also includes KiloClaw, a managed version of the OpenHands open agent platform. It deploys in under 60 seconds with no Docker, SSH, or config files required. Once running, KiloClaw connects to Telegram, Discord, or Slack, handles scheduled tasks and cron jobs, and acts on your behalf autonomously. It's the part of Kilo designed for background work: running tasks while you're away, automating repetitive operations, or handling code review in the cloud.

For teams comparing options, Kilo positions itself against tools like Cline and Roo Code as a more fully integrated alternative with broader model support and cloud agent capabilities built in. The codebase is Apache-2.0 licensed and fully open source.

Terminal coding agent that splits requests into parallel tasks, merges only what passes an independent check, and runs on any open model you choose.

Screenshot of the CodeAF website

This is a terminal-based software factory for people who want an AI coding agent that works on open models. You describe a job, and it plans the work, runs tasks in parallel on separate branches, and merges only what passes an independent check.

It ships with three built-in specialists:

  • /senior-dev implements a coding change and checks the result.
  • /sec audits local code for security problems.
  • /review reads a GitHub pull request and reports findings, much like an AI code reviewer. Security and review use read-only tools.

What sets it apart:

  • Pareto Crewing assigns a different model to each role, so expensive models only handle the steps where quality is decided. The project claims up to 25× lower cost.
  • Held-out acceptance turns your request into a checklist the worker never sees, so it can't write tests to fit the list.
  • Rewind restores full working state, including untracked files like .env, through a bundled tool.
  • Plain-English rules cover schedules, hooks and watchers, scoped to a chat, a project or everywhere.
  • SSH-native sessions live on your dev box, and you attach from a laptop or phone.

It works with OpenRouter, DeepSeek, GLM, Kimi, MiniMax, Qwen, Ollama or any OpenAI-compatible endpoint. With Ollama, nothing leaves your machine. It reads your AGENTS.md, CLAUDE.md and existing skills folders, and connects to Slack, Linear, Jira, GitLab, Sentry and others.

Spending is capped by a daily backstop and per-conversation limits. Anything beyond reads and searches asks first. You can use it instead of Claude Code or alongside it, and it's licensed Apache-2.0.

Share: