Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8,855 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Codex++ is a fork of openai/codex that adds third-party model provider support (Chat Completions, Anthropic, custom providers) alongside the original OpenAI Responses API.

Codex CLI splash

Codex++ runs locally on your computer as the codex++ command. It builds as a standalone executable with zero dependencies.


What is Codex++?

Codex++ extends the official Codex CLI with:

  • Chat Completions API (wire_api = "chat") - connect to any OpenAI-compatible provider: Ollama, vLLM, LiteLLM, DeepSeek, Mistral, Groq, Together, DashScope, and more.
  • Anthropic Messages API (wire_api = "anthropic") - use Claude models directly through Anthropic's native API.
  • Multi-agent v2 opt-out (features.multi_agent_v2 = false) - honor an explicit local disable even when the model catalog selects v2, so third-party providers are not forced onto its Responses API-specific namespaced and encrypted-schema tool protocol.
  • Auth header scheme control (env_key_auth) - choose between Bearer and x-api-key auth per provider.
  • Provider-specific request fields (extra_body) - merge arbitrary JSON into request bodies for provider-specific features like enable_thinking or thinking_budget.
  • Non-GPT-friendly file tools - offer hashline editing and Claude Code-compatible structured Read / Edit interfaces, giving models that struggle with Codex's freeform apply_patch grammar more reliable alternatives.
  • Always retry - automatic exponential backoff for any reasonable conditions.

For a detailed technical breakdown, see codex-rs/README.md.

Quickstart

One-command install (recommended)

curl -fsSL https://github.com/yuguorui/codex/releases/latest/download/install-fork.sh | sh

The install script resolves the latest release, verifies SHA-256 checksums, stores the standalone package under ~/.codex/packages/standalone, and installs the codex++ command into ~/.local/bin.

Environment variables:

  • CODEX_INSTALL_DIR - change the install directory
  • CODEX_BIN_NAME - override the command name
  • CODEX_RELEASE_REPOSITORY - override the release repository

Build from source

cd codex-rs
cargo build --release --bin codex
# Binary appears at target/release/codex
# Copy or symlink it as codex++ to match the fork release command name

The standalone installers download from https://releases.openai.com/codex by default and fall back to GitHub Releases if a metadata or asset download is unavailable. To force GitHub Releases, set CODEX_INSTALLER_USE_RELEASES_OPENAI_COM to false (0 and no are also accepted):

curl -fsSL https://chatgpt.com/codex/install.sh | CODEX_INSTALLER_USE_RELEASES_OPENAI_COM=false sh
$env:CODEX_INSTALLER_USE_RELEASES_OPENAI_COM='false'; irm https://chatgpt.com/codex/install.ps1 | iex

Codex CLI can also be installed via the following package managers:

Quick usage

# Use with a Chat Completions provider
codex++ -m ollama/qwen3
codex++ -m deepseek/deepseek-chat
codex++ -m dashscope/qwen-plus

# Use with Anthropic
codex++ -m anthropic/claude-sonnet-4-20250514

# Use with reasoning effort control
codex++ -m deepseek/deepseek-chat --reasoning-effort low
codex++ -m anthropic/claude-sonnet-4-20250514 --reasoning-effort high

Configuration

Codex++ uses config.toml (same location as upstream: ~/.codex/config.toml). Add provider blocks to configure third-party models:

# Chat Completions provider (Ollama, vLLM, DeepSeek, etc.)
[model_provider.ollama]
name = "Ollama"
base_url = "http://localhost:11434/v1"
env_key = "OLLAMA_API_KEY"
wire_api = "chat"

# Anthropic (Claude)
[model_provider.anthropic]
name = "Anthropic"
base_url = "https://api.anthropic.com"
env_key = "ANTHROPIC_API_KEY"
env_key_auth = "x-api-key"
wire_api = "anthropic"

# DashScope (Qwen) with thinking enabled
[model_provider.dashscope]
name = "DashScope"
base_url = "https://dashscope.aliyuncs.com/compatible-mode/v1"
env_key = "DASHSCOPE_API_KEY"
wire_api = "chat"
extra_body = { "enable_thinking" = true }

Multi-agent v2 compatibility

Upstream model metadata can select the multi-agent v2 tool protocol. V2 uses Responses API-specific tool namespaces and marks inter-agent message fields as encrypted, which many third-party providers do not support. Codex++ lets an explicit local setting take precedence over that model metadata:

[features]
multi_agent = true
multi_agent_v2 = false

With multi_agent left enabled (the default), Codex continues using its regular multi-agent function tools. Set multi_agent = false as well to disable multi-agent entirely.

See codex-rs/README.md for full configuration reference including extra_body, extra_headers, env_key_auth, request_max_retry_delay_ms, and reasoning effort mapping.

Upstream Features

All features from openai/codex are inherited unchanged. See the upstream documentation for details on config, MCP, notifications, sandbox, exec, and more.

Docs

License

This repository is licensed under the Apache-2.0 License.

About

Codex++ — coding agent with Chat Completions & Anthropic provider support

Resources

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages