Skip to content

pinion05/codex-claudecode-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

codex-claudecode-proxy

DeepWiki

NPM

A local proxy installer CLI that translates the OpenAI OAuth API into a Claude-compatible API.

One-Liner

npx -y codex-claudecode-proxy

Requirements

macOS

  • Claude Code is installed
  • You are logged in to Codex CLI

Linux (Ubuntu / WSL2)

  • Ubuntu (including WSL2 Ubuntu) is supported.
  • systemd is requiredsystemctl --user must 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
  • Installed user units on Linux:
    • cli-proxy-api-linux.service
    • cli-proxy-api-token-sync-linux.service
    • cli-proxy-api-token-sync-linux.path
  • Token sync watches ~/.codex/auth.json and mirrors the token into ~/.cli-proxy-api/auths/....

WSL2: enable systemd

  1. Create or edit /etc/wsl.conf:
[boot]
systemd=true
  1. From Windows PowerShell, restart WSL:
wsl --shutdown
  1. Re-open your WSL distro and confirm:
systemctl --user status

Troubleshooting (Linux)

  • 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 --user fails (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 run wsl --shutdown.
    • On non-systemd Linux environments, this installer is unsupported.

Model -> Reasoning Effort Routing

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)
  • CLIProxyAPI rewrites all tier requests to call the same upstream model (gpt-5.4), while setting reasoning.effort to xhigh / high / medium based on the tier.

In other words: tier selection controls reasoning level, not the upstream model.

Commands

# 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

Integrity / Safety

  • Claude Code settings are configured automatically, and a backup is created before changes.
  • Running uninstall removes the proxy-related Claude settings and restores the original behavior.

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors