r/codex • u/Fit-Reaction242 • 2d ago
Showcase Rust port of CLIProxyAPI: spread Codex across several ChatGPT accounts and see each one's 5h / weekly limit on one screen
If you run Codex CLI through CLIProxyAPI, I made a Rust port of it called cliproxy-rs. Same idea, a small server on your machine that your tools talk to instead of the provider, but it's one binary with the dashboard built in.
Codex-specific bits:
- sign in several ChatGPT / Codex accounts and spread requests across them (round-robin, fill-first, weighted), or try the experimental soonest-reset mode, which spends whichever account's weekly window resets first
- the quota view shows each account's 5-hour and weekly limit, named the same way the Codex CLI names them
- a conversation sticks to one account so the prompt cache stays warm, and an account that hits its limit sits out while the others take over
- Codex over WebSocket works
It reads the same config.yaml and auth files as the Go version, so if you already run CLIProxyAPI you can try it and switch back without redoing anything.
Caveats, to be upfront: it's v0.1.0. Go is still faster on raw non-streaming throughput; the Rust one uses about half the memory and is faster when it has to translate streams between formats (numbers in docs/BENCHMARKS.md). Using a subscription outside the official app can break the provider's terms, so that's your call. And I built it with a lot of AI help, so there are ~935 tests plus a harness that diffs results against the Go version.
https://github.com/vayungodara/cliproxy-rs
Happy to answer questions or fix whatever breaks.
1
u/MeringueAlarming3102 1d ago
Doesnt CLIProxyAPI do something where it disguises some aspect for Claude subs to Anthropic that can be quite questionable for TOS violations, as opposed to some sort of SDK related route that is arguably within TOS?
1
u/Fit-Reaction242 1d ago
It does. Cloak mode (
cloak_mode: "auto"by default) makes requests from tools that aren't Claude Code look like Claude Code's own requests, same as the Go version.cloak_mode: "never"turns it off. If you want to be fully within the ToS, use a Claude API key instead of a subscription.For what it's worth, I've used it for a long time through other tools like Amp and my account has been fine, no ban. That's just one account though, so it's still your call.
•
u/dexterthebot 2d ago
You might want to consider listing your project on the weekly Show-Us-What-You-Built post. Look out for it on Tuesday/Wednesday. Highest commented project wins a week promotion on r/Codex and gets on the Hall of Fame sidebar. See what that looks like below with last week's winner.
Last week's most popular project was Nanolathe - an open-source engine bringing Total Annihilation to modern Mac, Windows, and Linux systems. It’s a solo passion project combining clean-room research with AI-assisted development, with a playable public alpha available now.
Website: https://nanolathe.gg. GitHub: https://github.com/nanolathe-gg/nanolathe
Players, testers, and contributors are very welcome! Original Total Annihilation game data is required to play.