opencodex serves as a versatile proxy for OpenAI Codex and Claude Code, allowing integration with various LLMs like Claude, Gemini, and Grok. It enables a unified Codex experience across different providers with features like account management and streaming capabilities, simplifying the development process without compromising performance.
Universal Provider Proxy for OpenAI Codex & Claude Code
opencodex serves as a universal provider proxy, designed to facilitate seamless interactions between various language models (LLMs) and the Codex CLI, App, SDK, and Claude Code. This enables users to leverage the capabilities of multiple LLMs—including Claude, Gemini, Grok, DeepSeek, and Ollama—without waiting for official support from each provider.
Key Features
- Flexible Integration: Utilize any LLM efficiently with Codex, ensuring a straightforward workflow without the need for adjustments based on the provider.
- Streaming Support: opencodex allows real-time interaction by translating Codex's Responses API to communicate with any configured provider, facilitating both input and output in a synchronized manner.
- ChatGPT Account Pool Management: Easily manage multiple ChatGPT or Codex accounts, optimizing resource utilization by routing new sessions to the least-used accounts while maintaining the context of ongoing threads.
# Example usage to create a new Codex session with opencodex:
codex "Write a hello world in Rust"
Supported Platforms
- Fully supported on macOS, Linux, and Windows. Designed to operate natively without requiring additional tools like WSL.
- Requires Node.js version 18 or higher.
Quick Setup
To begin, install opencodex globally using npm:
npm install -g @bitkyc08/opencodex
Then, initiate the setup:
ocx init
Start the proxy service:
ocx start
Adding Providers
New providers can be integrated effortlessly through the web dashboard:
ocx gui
- Click "Add Provider".
- Select from over 40 built-in LLM options or add a custom OpenAI-compatible endpoint.
- Input any required API keys or authenticate using OAuth where available.
Routing Models
Models can be targeted using the provider/model syntax, allowing for simple command execution:
codex -m "anthropic/claude-opus-4-8" "Explain this stack trace"
Documentation
Comprehensive documentation for installation, configuration, and detailed reference is available at lidge-jun.github.io/opencodex. This ensures that users can easily navigate through advanced configurations and utilize the full capabilities of opencodex.
Important Disclaimer
opencodex is an independent, community-maintained project, and is not affiliated with or endorsed by OpenAI, Anthropic, or any other provider. Before using any provider, review their Terms of Service to ensure compliance with usage policies.
No comments yet.
Sign in to be the first to comment.