{"slug": "show-hn-cliproxy-rs-a-rust-port-of-the-cliproxyapi-llm-subscription-proxy", "title": "Show HN: Cliproxy-rs, a Rust port of the CLIProxyAPI LLM subscription proxy", "summary": "Developer vayungodara released cliproxy-rs, a Rust rewrite of the CLIProxyAPI LLM subscription proxy that lets coding tools such as Claude Code, Codex CLI and Cursor share existing Claude Max or ChatGPT plans through one local address at http://127.0.0.1:8317. The proxy translates between the Anthropic, OpenAI and Gemini API formats, reads the same config.yaml and account files as CLIProxyAPI, and adds account rotation modes including round-robin, fill-first, weighted-round-robin and an experimental soonest-reset option. The project's own documentation warns that using a subscription outside its official app can break the provider's terms and that providers have suspended accounts for it.", "body_md": "cliproxy-rs is a small server you run on your own computer. It lets your coding tools, such as Claude Code, Codex CLI or Cursor, use the AI subscriptions and API keys you already have, like a Claude Max plan or a ChatGPT plan, through one local address. A dashboard built into it shows which accounts work, how much of each plan's limits is left, and how to connect each tool.\n\nIt is a Rust rewrite of [CLIProxyAPI](https://github.com/router-for-me/CLIProxyAPI). It reads the same `config.yaml` and the same account files, so you can switch between the two in either direction.\n\n- You pay for Claude and ChatGPT plans and want Claude Code, Codex CLI and your editor to share them, with the 5-hour and weekly limits of every account on one screen.\n- You have several Claude or Codex accounts and want requests spread across them, or moved to the next account when one reaches its limit.\n- A tool speaks only one API: the proxy translates between the Anthropic, OpenAI and Gemini formats, so an OpenAI-only tool can use a Claude account and the other way round.\n- You run CLIProxyAPI and want a smaller, faster-starting binary with the dashboard built in.\n\n1. \nRun one command. On macOS or Linux: \n\n```\ncurl -fsSL https://raw.githubusercontent.com/vayungodara/cliproxy-rs/master/install.sh | sh\n```\n\n On Windows, in PowerShell: \n\n```\nirm https://raw.githubusercontent.com/vayungodara/cliproxy-rs/master/install.ps1 | iex\n```\n\n It installs the latest release after checking its checksum, writes a config with new keys to `~/.cliproxy-rs` , starts the proxy in the background and opens the dashboard in your browser. The keys stay in`~/.cliproxy-rs/keys.env` and are never printed.\n2. \nIn the dashboard, sign in with the `CLIPROXY_MANAGEMENT_KEY` line from`keys.env` and choose Connect account.\n3. \nOpen Use with tools and copy the settings for Claude Code, Codex CLI or another tool.\n\nRun the same command again to upgrade; your config and keys stay as they are. [docs/INSTALL.md](https://github.com/vayungodara/cliproxy-rs/blob/master/docs/INSTALL.md#start-at-login) shows how to start the proxy when you log in.\n\n[docs/GETTING-STARTED.md](https://github.com/vayungodara/cliproxy-rs/blob/master/docs/GETTING-STARTED.md) walks through the same steps in more detail.\n\nUsing a subscription outside its official app can break the provider's terms, and providers have suspended accounts for it. Whether to do that is your call and your risk.\n\nPaste this into Claude Code, Codex or another coding agent on the computer where you want the proxy:\n\n```\nInstall and set up cliproxy-rs on this computer by following\nhttps://github.com/vayungodara/cliproxy-rs/blob/master/docs/AI-SETUP.md exactly.\nDo not sign in to any of my accounts or print my keys; tell me when it is my turn.\n```\n\nThe agent runs the installer, which picks a free port without touching an existing CLIProxyAPI and keeps the keys in a file only you can read. It checks that the proxy answers, then hands the account sign-in to you.\n\nThe proxy serves the Anthropic Messages API at `http://127.0.0.1:8317`, the OpenAI API at `http://127.0.0.1:8317/v1` and the Gemini API at `http://127.0.0.1:8317`, all with your client key. For Claude Code:\n\n```\nexport ANTHROPIC_BASE_URL=http://127.0.0.1:8317\nexport ANTHROPIC_AUTH_TOKEN=your-client-key\nclaude\n```\n\n[docs/CLIENTS.md](https://github.com/vayungodara/cliproxy-rs/blob/master/docs/CLIENTS.md) has copy-paste setups for Claude Code, Codex CLI, Gemini CLI, Amp, OpenCode, Factory Droid, Cline, Roo Code, Kilo Code, Cursor, Zed, Continue, Aider and the OpenAI, Anthropic and Gemini SDKs.\n\nSign in to as many Claude and Codex accounts as you have, and choose how the proxy rotates between them: `round-robin`, `fill-first`, `weighted-round-robin`, or `soonest-reset` (experimental, a cliproxy-rs addition: spend the account whose weekly window resets soonest first). Session affinity keeps each conversation on one account so the provider's prompt cache stays warm, and an account that hits a limit rests while the others take over. [docs/MULTI-ACCOUNT.md](https://github.com/vayungodara/cliproxy-rs/blob/master/docs/MULTI-ACCOUNT.md) covers routing, cooldowns, the quota view, per-account proxies, Codex over WebSocket and reaching the proxy from your other machines over Tailscale.\n\ncliproxy-rs serves the same routes and the same v8 Management API as CLIProxyAPI, so the community apps built on CLIProxyAPI should work with it, for example [CPA-Manager-Plus](https://github.com/seakee/CPA-Manager-Plus), [CLIProxyAPI Quota Inspector](https://github.com/AllenReder/CLIProxyAPI-Quota-Inspector), [ZeroLimit](https://github.com/0xtbug/zero-limit), [Quotio](https://github.com/nguyenphutrong/quotio), [VibeProxy](https://github.com/automazeio/vibeproxy) and [CCS](https://github.com/kaitranntt/ccs). We have not tested all of them. Apps that talk to a running server need only its address and management key; apps that start their own bundled CLIProxyAPI need an option to use an existing server instead. If an app does not work with cliproxy-rs, please [open an issue](https://github.com/vayungodara/cliproxy-rs/issues/new/choose).\n\n- `install.sh` (macOS and Linux) and`install.ps1` (Windows), the commands in the quick start. They install the release binary, set it up and start it;`--binary-only` (`-BinaryOnly` on Windows) installs only the binary.\n- Release binaries for macOS (Apple silicon and Intel), Linux (x86_64 and arm64) and Windows (x86_64), with a `SHA256SUMS` file, on the[releases page](https://github.com/vayungodara/cliproxy-rs/releases) .\n- Docker, from the repository's `Dockerfile` .\n- Building from source, for contributors and platforms without a release binary.\n\n[docs/INSTALL.md](https://github.com/vayungodara/cliproxy-rs/blob/master/docs/INSTALL.md) covers each one, starting the proxy at login, and removing it.\n\nThese are not in cliproxy-rs yet. They are planned, in no fixed order:\n\n- Homebrew and AUR packages.\n- Plugins: the host callbacks plugins use to call back into the server, calling plugins on the request path (plugin providers, sign-in, models and usage), and the plugin store. Today plugins load, serve their own routes and report quotas, but requests do not pass through them.\n- Home (cluster) mode: reporting usage, logs and in-flight requests back to Home, Home's KV storage, and syncing plugins managed by Home.\n- Google Antigravity.\n- Image generation and editing through Codex accounts, and importing Vertex service accounts from the dashboard (the command line works).\n- The terminal UI (`-tui` ).\n- The `pprof` debug listener.\n- The upstream request and response sections of request log files.\n- The rest of CLIProxyAPI's own test cases. The parity audit checked 1,687 Go routes, settings, flags and test suites: 798 (47%) are fully covered, 697 partly and 192 not yet. [docs/PARITY.md](https://github.com/vayungodara/cliproxy-rs/blob/master/docs/PARITY.md) explains the numbers.\n\n- [Getting started](https://github.com/vayungodara/cliproxy-rs/blob/master/docs/GETTING-STARTED.md) : install, configure, connect an account and a tool.\n- [Set up with an AI agent](https://github.com/vayungodara/cliproxy-rs/blob/master/docs/AI-SETUP.md) : exact steps a coding agent can follow.\n- [Use it with your tools](https://github.com/vayungodara/cliproxy-rs/blob/master/docs/CLIENTS.md) : setup for each coding tool and SDK.\n- [Several accounts](https://github.com/vayungodara/cliproxy-rs/blob/master/docs/MULTI-ACCOUNT.md) : routing, limits, quotas and remote access.\n- [Configuration](https://github.com/vayungodara/cliproxy-rs/blob/master/docs/CONFIGURATION.md) : the settings you are most likely to change.\n- [Install](https://github.com/vayungodara/cliproxy-rs/blob/master/docs/INSTALL.md) : every install option, Docker and running as a service.\n- [Moving from CLIProxyAPI](https://github.com/vayungodara/cliproxy-rs/blob/master/docs/MIGRATING-FROM-GO.md) and[differences from CLIProxyAPI](https://github.com/vayungodara/cliproxy-rs/blob/master/docs/DIFFERENCES-FROM-GO.md) .\n- [Compatibility and parity](https://github.com/vayungodara/cliproxy-rs/blob/master/docs/PARITY.md) and[benchmarks](https://github.com/vayungodara/cliproxy-rs/blob/master/docs/BENCHMARKS.md) .\n\nKeep `access.api-keys` set and `server.host` on `127.0.0.1` unless you need other machines to connect. Behind a tunnel or reverse proxy on the same machine, set `server.trusted-proxies`, or every internet client counts as local. The dashboard is built into the binary, and cliproxy-rs never downloads code to run. [Running it safely](https://github.com/vayungodara/cliproxy-rs/blob/master/docs/GETTING-STARTED.md#running-it-safely) explains each point, and [SECURITY.md](https://github.com/vayungodara/cliproxy-rs/blob/master/SECURITY.md) says how to report a vulnerability.\n\nGo is faster on non-streaming throughput. On a 2-vCPU test machine with a local fake upstream (2026-10-03), CLIProxyAPI handled about 34% more non-streaming requests per second (1,568 against 1,168) and about 10% more plain streams (916 against 833). cliproxy-rs was faster on streams it translates between the Anthropic and OpenAI formats (793 against 564 per second, about 41% more) and used less than half of Go's memory: 17 MB at idle against 45 MB, and 25 to 50 MB under load against 58 to 104 MB. It answers its first request about 17 ms after launch, and the release binary is 36 MB against 69 MB. [docs/BENCHMARKS.md](https://github.com/vayungodara/cliproxy-rs/blob/master/docs/BENCHMARKS.md) has the method and every number.\n\nThe workspace is `crates/cpa-core` (config and account formats), `crates/cpa-exec` (one module per upstream provider), `crates/cpa-translate` (format translation), `crates/cpa-server` (routes, account selection and the Management API), `crates/cliproxy` (the binary) and `ui/` (the dashboard, see [ui/README.md](https://github.com/vayungodara/cliproxy-rs/blob/master/ui/README.md)). The workspace has 935 tests, run against local mock upstreams only; CI runs the whole suite on every push, with Go and PostgreSQL installed so the tests that compare against them run too. A [differential harness](https://github.com/vayungodara/cliproxy-rs/blob/master/harness/README.md) sends the same 57 cases to CLIProxyAPI and cliproxy-rs and compares the results.\n\n```\ncargo fmt --all --check\ncargo clippy --workspace --all-targets --locked -- -D warnings\ncargo test --workspace --locked\n```\n\n[CONTRIBUTING.md](https://github.com/vayungodara/cliproxy-rs/blob/master/CONTRIBUTING.md) explains how to send a change.\n\nBuilt with some help from AI.\n\nMIT. See [LICENSE](https://github.com/vayungodara/cliproxy-rs/blob/master/LICENSE). CLIProxyAPI, which this project follows closely, is also MIT licensed.", "url": "https://wpnews.pro/news/show-hn-cliproxy-rs-a-rust-port-of-the-cliproxyapi-llm-subscription-proxy", "canonical_source": "https://github.com/vayungodara/cliproxy-rs", "published_at": "2026-10-03 22:36:03+00:00", "updated_at": "2026-10-03 23:06:36.881702+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools", "large-language-models", "ai-products"], "entities": ["cliproxy-rs", "CLIProxyAPI", "vayungodara", "Claude Code", "Codex CLI", "Cursor", "Anthropic", "OpenAI"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/show-hn-cliproxy-rs-a-rust-port-of-the-cliproxyapi-llm-subscription-proxy", "markdown": "https://wpnews.pro/news/show-hn-cliproxy-rs-a-rust-port-of-the-cliproxyapi-llm-subscription-proxy.md", "text": "https://wpnews.pro/news/show-hn-cliproxy-rs-a-rust-port-of-the-cliproxyapi-llm-subscription-proxy.txt", "jsonld": "https://wpnews.pro/news/show-hn-cliproxy-rs-a-rust-port-of-the-cliproxyapi-llm-subscription-proxy.jsonld"}}