A local proxy installer CLI that translates the OpenAI OAuth API into a Claude-compatible API.
npx -y codex-claudecode-proxy- Claude Code is installed
- You are logged in to Codex CLI
- Ubuntu (including WSL2 Ubuntu) is supported.
- systemd is required —
systemctl --usermust work.- Linux environments without systemd are not supported (the installer fails fast with guidance).
- Runs in your user session as systemd user units (no sudo; installs into your home directory).
- Optional: keep services running when you log out:
loginctl enable-linger $USER
- Optional: keep services running when you log out:
- Installed user units on Linux:
cli-proxy-api-linux.servicecli-proxy-api-token-sync-linux.servicecli-proxy-api-token-sync-linux.path
- Token sync watches
~/.codex/auth.jsonand mirrors the token into~/.cli-proxy-api/auths/....
- Create or edit
/etc/wsl.conf:
[boot]
systemd=true- From Windows PowerShell, restart WSL:
wsl --shutdown- Re-open your WSL distro and confirm:
systemctl --user status- Verify the systemd user session is available:
systemctl --user status
- Check installed units:
systemctl --user status cli-proxy-api-linux.service systemctl --user status cli-proxy-api-token-sync-linux.service systemctl --user status cli-proxy-api-token-sync-linux.path
- View logs:
journalctl --user -u cli-proxy-api-linux.service -n 100 --no-pager
- If
systemctl --userfails (e.g. "Failed to connect to bus"), your environment doesn't have a systemd user session.- On WSL2, enable systemd via
/etc/wsl.conf(above) and runwsl --shutdown. - On non-systemd Linux environments, this installer is unsupported.
- On WSL2, enable systemd via
This installer configures Claude Code's Opus/Sonnet/Haiku tiers so that:
- The visible model names encode the desired reasoning effort:
- Opus:
gpt-5.4(xhigh) - Sonnet:
gpt-5.4(high) - Haiku:
gpt-5.4(medium)
- Opus:
- CLIProxyAPI rewrites all tier requests to call the same upstream model (
gpt-5.4), while settingreasoning.efforttoxhigh/high/mediumbased on the tier.
In other words: tier selection controls reasoning level, not the upstream model.
# Install (safe to re-run)
npx -y codex-claudecode-proxy
# Status
npx -y codex-claudecode-proxy status
# Start/stop manually
npx -y codex-claudecode-proxy start
npx -y codex-claudecode-proxy stop
# Uninstall: stop background services and restore Claude Code settings
npx -y codex-claudecode-proxy uninstall
# Purge: uninstall + remove installed files
npx -y codex-claudecode-proxy purge- Claude Code settings are configured automatically, and a backup is created before changes.
- Running
uninstallremoves the proxy-related Claude settings and restores the original behavior.
MIT