Getting started
This path gets one Codex-backed Claude Code session working. See Choosing a provider for Kimi, Grok, and Cursor Agent.
1. Install
Section titled “1. Install”On macOS or Linux with Homebrew:
brew install raine/claude-code-proxy/claude-code-proxyOr use the release installer:
curl -fsSL https://raw.githubusercontent.com/raine/claude-code-proxy/main/scripts/install.sh | bashWindows archives and binaries for every supported platform are on the GitHub releases page.
2. Sign in to Codex
Section titled “2. Sign in to Codex”Use a ChatGPT Plus or Pro account, not an OpenAI API account:
claude-code-proxy codex auth loginFor SSH or another headless environment, use claude-code-proxy codex auth device instead.
3. Start the proxy
Section titled “3. Start the proxy”Keep this process running:
claude-code-proxy serveIt listens on 127.0.0.1:18765. In an interactive terminal it opens the monitor TUI.
4. Start Claude Code
Section titled “4. Start Claude Code”Open another terminal and run:
ANTHROPIC_BASE_URL=http://127.0.0.1:18765 \ANTHROPIC_AUTH_TOKEN=unused \ANTHROPIC_MODEL=gpt-5.6-sol[1m] \ANTHROPIC_SMALL_FAST_MODEL=gpt-5.6-luna[1m] \CLAUDE_CODE_AUTO_COMPACT_WINDOW=272000 \CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1 \CLAUDE_CODE_DISABLE_NONSTREAMING_FALLBACK=1 \ claudeSend a prompt. The request appears in the monitor and the response streams into Claude Code.
The [1m] suffix is a Claude Code compaction hint. The proxy removes it before the upstream request. The explicit 272,000 token auto-compact window keeps the local threshold within the ChatGPT context limit used by these models.
For persistent settings, provider switching, and model discovery, continue to Configure Claude Code and Models and routing.