npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

codex-claude-proxy

v1.0.3

Published

Multi-account proxy server for OpenAI Codex CLI with Claude API compatibility

Readme

Codex Claude Proxy

Architecture banner

MIT License Node.js Version GitHub stars

Use Claude Code CLI with the power of ChatGPT Codex models. A local proxy that translates Anthropic API requests into ChatGPT Codex calls, enabling you to use the claude CLI tool with your ChatGPT Free/Plus/Pro subscription.


🚀 Features

  • Seamless Translation: Translates Anthropic Messages API calls to ChatGPT Codex format.
  • Model Mapping: automatically maps claude-sonnet and claude-opus to their Codex equivalents.
  • Multi-Account Support: Manage multiple ChatGPT accounts with easy switching and auto-refresh.
  • Web Dashboard: Built-in UI (http://localhost:8081) for managing accounts, viewing logs, and testing prompts.
  • Streaming Support: Full Server-Sent Events (SSE) support for real-time responses.
  • Native Tool Calling: Supports Claude's tool use capabilities by translating them to Codex function calls.

� Security & Privacy

Is this a malicious proxy? No.

  • Local Execution: This server runs entirely on your local machine (localhost).
  • Direct Communication: It connects directly to OpenAI/ChatGPT endpoints. No data is sent to any third-party server.
  • Open Source: The full source code is available here for you to audit.
  • No Data Collection: We do not track your prompts, keys, or personal data.

⚙️ How it works

This tool acts as a "translation layer" between the Claude CLI and ChatGPT's Codex backend.

  1. Intercept: Claude Code CLI sends a request to localhost:8081 (thinking it's Anthropic's API).
  2. Translate: The proxy converts the Anthropic-format JSON into the specific payload format required by ChatGPT's internal Codex API.
  3. Forward: The request is sent securely to ChatGPT using your own authenticated session.
  4. Stream: The response from ChatGPT is converted back into Anthropic's Server-Sent Events (SSE) format and streamed to your terminal.
┌──────────────────┐     ┌─────────────────────┐     ┌────────────────────────────┐
│   Claude Code    │────▶│  This Proxy Server  │────▶│  ChatGPT Codex Backend API  │
│ (Anthropic API)  │     │ (Anthropic ⇄ OpenAI)│     │ (codex/responses)           │
└──────────────────┘     └─────────────────────┘     └────────────────────────────┘

�📦 Installation

You don't need to install anything if you just want to run it:

# Run directly with npx
npx codex-claude-proxy@latest start

Or install globally to use the CLI commands anywhere:

npm install -g codex-claude-proxy
codex-claude-proxy start

🚦 Quick Start

1. Start the Proxy

npx codex-claude-proxy@latest start

The server will start at http://localhost:8081.

2. Add Your Account

Option A: Web Dashboard (Local Desktop)

  1. Open the dashboard at http://localhost:8081
  2. Go to the Accounts tab
  3. Click Add Account and login with your ChatGPT account

Option B: CLI (Desktop or Headless/VM)

# Desktop (opens browser)
codex-claude-proxy accounts add

# Headless/VM server (manual code input)
codex-claude-proxy accounts add --no-browser

For headless/VM servers without a browser:

  1. Run the command with --no-browser
  2. It will print a URL - copy and open it on a device with a browser
  3. Complete login on that device
  4. After redirect, copy the callback URL (or just the code)
  5. Paste it back in the terminal

3. Configure Claude Code

Run this command to automatically configure your claude CLI to use the proxy:

curl -X POST http://localhost:8081/claude/config/proxy

Alternatively, set the environment variables manually:

export ANTHROPIC_BASE_URL=http://localhost:8081
export ANTHROPIC_API_KEY=dummy-key # The key is ignored but required by the CLI
  1. Run Claude:
    claude

🧠 Model Mapping

The proxy automatically maps Claude model names to the appropriate Codex backend: (You can Change Models from )

| Claude Model ID | Mapped Codex Model | Auth Required | Description | | :--- | :--- | :---: | :--- | | claude-sonnet-4-5 | GPT-5.2 Codex | ✅ | Default high-intelligence model | | claude-opus-4-5 | GPT-5.3 Codex | ✅ | Maximum reasoning capability | | claude-haiku-4 | GLM-5 / MiniMax | ❌ | Free tier / routed via OpenRouter (No auth needed) |


🛠️ Configuration & API

Web Dashboard

Visit http://localhost:8081 to:

  • Manage Accounts: Add, remove, or switch active ChatGPT accounts.
  • View Logs: See real-time request/response logs for debugging.
  • Test Models: Run quick tests against the configured models.

API Endpoints

  • GET /health: Check server status.
  • GET /accounts: List configured accounts.
  • POST /v1/messages: Anthropic-compatible chat completion endpoint.

See API Documentation for full details.


🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

⚠️ Disclaimer

This project is an independent open-source tool and is not affiliated with, endorsed by, or sponsored by Anthropic or OpenAI. "Claude" is a trademark of Anthropic PBC. "ChatGPT" and "Codex" are trademarks of OpenAI. Use responsibly and in accordance with applicable Terms of Service.