{"_id":"@dondetir/ccmux","_rev":"5-f970a4b64366a2470c4562d430bb15bf","name":"@dondetir/ccmux","dist-tags":{"latest":"0.1.4"},"versions":{"0.1.0":{"name":"@dondetir/ccmux","version":"0.1.0","license":"MIT","_id":"@dondetir/ccmux@0.1.0","maintainers":[{"name":"dondetir","email":"ravitez.dondeti@gmail.com"}],"homepage":"https://github.com/dondetir/ccmux","bugs":{"url":"https://github.com/dondetir/ccmux/issues"},"bin":{"ccmux":"bin/ccmux.mjs"},"dist":{"shasum":"f0faf991ff1310466d5da3b96cb9662bb6bfbf8d","tarball":"https://registry.npmjs.org/@dondetir/ccmux/-/ccmux-0.1.0.tgz","fileCount":17,"integrity":"sha512-OPGW3KlVcMMe1Lfost0nDzU13Ti4vIJrbUncQhY7cIVSdv7yzPkDdgOnKt3+tMeQWnypJkLFd/EHxbLiRWW2pg==","signatures":[{"sig":"MEQCIH3eN5Il/qovSifP7/QdT+y6XGUyaa9ISM2f8a7wfORhAiAYUCqVNVwNfHH2RnjoEYSuQpXJyvak+FLmwTJUz5VaJg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":97178},"type":"module","engines":{"node":">=20"},"gitHead":"67e253fad7920bff347e351740de7db42fa58421","private":false,"scripts":{"dev":"tsx watch src/index.ts","test":"vitest run","start":"tsx src/index.ts"},"_npmUser":{"name":"dondetir","email":"ravitez.dondeti@gmail.com"},"overrides":{"esbuild":"^0.28.1"},"repository":{"url":"git+https://github.com/dondetir/ccmux.git","type":"git"},"_npmVersion":"10.8.2","description":"Run Claude Code on GitHub Copilot's backend, a local Anthropic-to-Copilot proxy","directories":{},"_nodeVersion":"20.20.2","dependencies":{"tsx":"^4.19.2","hono":"^4.6.14","@hono/node-server":"^1.13.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.8","typescript":"^5.7.2","@types/node":"^20.17.10"},"_npmOperationalInternal":{"tmp":"tmp/ccmux_0.1.0_1782363651945_0.1083584671239437","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@dondetir/ccmux","version":"0.1.1","license":"MIT","_id":"@dondetir/ccmux@0.1.1","maintainers":[{"name":"dondetir","email":"ravitez.dondeti@gmail.com"}],"homepage":"https://github.com/dondetir/ccmux","bugs":{"url":"https://github.com/dondetir/ccmux/issues"},"bin":{"ccmux":"bin/ccmux.mjs"},"dist":{"shasum":"4329a95a3c2542317246dcade607de7904d03f7e","tarball":"https://registry.npmjs.org/@dondetir/ccmux/-/ccmux-0.1.1.tgz","fileCount":17,"integrity":"sha512-pMh1k+tuP3Q34pYI7z2ValS2Hs6pmOapsN5hHTnfocn5SSoOautOYzMB2JPGQX78TRiuPbIb6Z/NJsgYt6K37g==","signatures":[{"sig":"MEUCIB4hKygOHqlg2IrI1t7eyP4viRUQHQ0tbi5jJiCHdT50AiEA6EV4KrsNio+aP+fvgUBHlu/tBH3GMQzH0iwn3Mbbgr8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":97215},"type":"module","engines":{"node":">=20"},"gitHead":"5920dee576b9e11d4ae73973b6fca696d33d2ef8","private":false,"scripts":{"dev":"tsx watch src/index.ts","test":"vitest run","start":"tsx src/index.ts"},"_npmUser":{"name":"dondetir","email":"ravitez.dondeti@gmail.com"},"overrides":{"esbuild":"^0.28.1"},"repository":{"url":"git+https://github.com/dondetir/ccmux.git","type":"git"},"_npmVersion":"10.8.2","description":"Run Claude Code on GitHub Copilot's backend, a local Anthropic-to-Copilot proxy","directories":{},"_nodeVersion":"20.20.2","dependencies":{"tsx":"^4.19.2","hono":"^4.6.14","@hono/node-server":"^1.13.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.8","typescript":"^5.7.2","@types/node":"^20.17.10"},"_npmOperationalInternal":{"tmp":"tmp/ccmux_0.1.1_1782363835809_0.5474239534672305","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@dondetir/ccmux","version":"0.1.2","license":"MIT","_id":"@dondetir/ccmux@0.1.2","maintainers":[{"name":"dondetir","email":"ravitez.dondeti@gmail.com"}],"homepage":"https://github.com/dondetir/ccmux","bugs":{"url":"https://github.com/dondetir/ccmux/issues"},"bin":{"ccmux":"bin/ccmux.mjs"},"dist":{"shasum":"9f31cbcb6fe86a329cb8031583043540817d8418","tarball":"https://registry.npmjs.org/@dondetir/ccmux/-/ccmux-0.1.2.tgz","fileCount":17,"integrity":"sha512-tjDDcU8Pv5QRXaBV4Hw6/TiPlmI73aAXZqc9okFJuxKmKX59Lj0rYOTXEkaf3w9xizf27VZJRt5Mmqm0IbG9nQ==","signatures":[{"sig":"MEUCIQCcpiUUiV8CA7t9Dq9Jp2YjUo/2gcLHa+zZGkdv+4JUNQIgcMgvsMUfri1AXHMq//WEc7APXYc02xkhQ8RPi/6leIY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":97385},"type":"module","engines":{"node":">=20"},"gitHead":"d42db3e1e59d04a202fab399dba3eced7449cdab","private":false,"scripts":{"dev":"tsx watch src/index.ts","test":"vitest run","start":"tsx src/index.ts"},"_npmUser":{"name":"dondetir","email":"ravitez.dondeti@gmail.com"},"overrides":{"esbuild":"^0.28.1"},"repository":{"url":"git+https://github.com/dondetir/ccmux.git","type":"git"},"_npmVersion":"10.8.2","description":"Run Claude Code on GitHub Copilot's backend, a local Anthropic-to-Copilot proxy","directories":{},"_nodeVersion":"20.20.2","dependencies":{"tsx":"^4.19.2","hono":"^4.6.14","@hono/node-server":"^1.13.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.8","typescript":"^5.7.2","@types/node":"^20.17.10"},"_npmOperationalInternal":{"tmp":"tmp/ccmux_0.1.2_1782364991709_0.26302472441729874","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@dondetir/ccmux","version":"0.1.3","license":"MIT","_id":"@dondetir/ccmux@0.1.3","maintainers":[{"name":"dondetir","email":"ravitez.dondeti@gmail.com"}],"homepage":"https://github.com/dondetir/ccmux","bugs":{"url":"https://github.com/dondetir/ccmux/issues"},"bin":{"ccmux":"bin/ccmux.mjs"},"dist":{"shasum":"7ff0f041dd2115b9e67387fe4a86658ccd2f0e09","tarball":"https://registry.npmjs.org/@dondetir/ccmux/-/ccmux-0.1.3.tgz","fileCount":17,"integrity":"sha512-fGJeMWfs4Ol9Cq+of3dGmRp9SNuJXvZW19NTHTN9yzmFIa/FPHEkECopgaHdQdT5e+5a2gBpAo7amb5cQ0OMTA==","signatures":[{"sig":"MEYCIQD6K9M130yJEWTImH8VCjfQAaHLk8ic37Wdxi78Fl3S4gIhAL7L0CthLSNBTltVJxdszELiqIUtq87Arxigw8ycT5kt","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":97627},"type":"module","engines":{"node":">=20"},"gitHead":"67a59cecd4db65d363bf09d7802edfef6554e248","private":false,"scripts":{"dev":"tsx watch src/index.ts","test":"vitest run","start":"tsx src/index.ts"},"_npmUser":{"name":"dondetir","email":"ravitez.dondeti@gmail.com"},"overrides":{"esbuild":"^0.28.1"},"repository":{"url":"git+https://github.com/dondetir/ccmux.git","type":"git"},"_npmVersion":"10.8.2","description":"Run Claude Code on GitHub Copilot's backend, a local Anthropic-to-Copilot proxy","directories":{},"_nodeVersion":"20.20.2","dependencies":{"tsx":"^4.19.2","hono":"^4.6.14","@hono/node-server":"^1.13.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.8","typescript":"^5.7.2","@types/node":"^20.17.10"},"_npmOperationalInternal":{"tmp":"tmp/ccmux_0.1.3_1782399035595_0.6714120602189291","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@dondetir/ccmux","version":"0.1.4","description":"Run Claude Code on GitHub Copilot's backend, a local Anthropic-to-Copilot proxy","private":false,"publishConfig":{"access":"public"},"type":"module","bin":{"ccmux":"bin/ccmux.mjs"},"scripts":{"dev":"tsx watch src/index.ts","start":"tsx src/index.ts","test":"vitest run"},"engines":{"node":">=20"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/dondetir/ccmux.git"},"homepage":"https://github.com/dondetir/ccmux","bugs":{"url":"https://github.com/dondetir/ccmux/issues"},"overrides":{"esbuild":"^0.28.1"},"dependencies":{"@hono/node-server":"^1.13.7","hono":"^4.6.14","tsx":"^4.19.2"},"devDependencies":{"@types/node":"^20.17.10","typescript":"^5.7.2","vitest":"^2.1.8"},"_id":"@dondetir/ccmux@0.1.4","gitHead":"e621d120f5b082fc0d8d9d285316631fb91e0fea","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-LccfN0TkStNd0OKaUn7UmmvLbTIuhE8IM7b8aUJ4aaLrokhp4QAW9xJVqjsbKYSTyFQOL9XA7kJ5kzOWg3rN3w==","shasum":"a24c93f53644d49146abc4f1377dbccbdb12063e","tarball":"https://registry.npmjs.org/@dondetir/ccmux/-/ccmux-0.1.4.tgz","fileCount":18,"unpackedSize":109056,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICE78V5N4qpNj/ZlN0EKw9DKF69ysDrvi4bok4/E3F8IAiEAlV84YPKpt056s02GYDTCMRZG90GaoUHTjdNK7gS4zIY="}]},"_npmUser":{"name":"dondetir","email":"ravitez.dondeti@gmail.com"},"directories":{},"maintainers":[{"name":"dondetir","email":"ravitez.dondeti@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ccmux_0.1.4_1784687095404_0.03145291478868928"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-25T05:00:51.776Z","modified":"2026-07-22T02:24:55.708Z","0.1.0":"2026-06-25T05:00:52.082Z","0.1.1":"2026-06-25T05:03:55.940Z","0.1.2":"2026-06-25T05:23:11.877Z","0.1.3":"2026-06-25T14:50:35.735Z","0.1.4":"2026-07-22T02:24:55.564Z"},"bugs":{"url":"https://github.com/dondetir/ccmux/issues"},"license":"MIT","homepage":"https://github.com/dondetir/ccmux","repository":{"type":"git","url":"git+https://github.com/dondetir/ccmux.git"},"description":"Run Claude Code on GitHub Copilot's backend, a local Anthropic-to-Copilot proxy","maintainers":[{"name":"dondetir","email":"ravitez.dondeti@gmail.com"}],"readme":"<div align=\"center\">\n\n# ⚡ ccmux\n\n**Claude Code on Copilot + Ollama Cloud.**\n\nYour GitHub Copilot subscription (including the free tier) and your Ollama Cloud key both power `claude` in your terminal.\n\n[![npm](https://img.shields.io/npm/v/@dondetir/ccmux?label=npm)](https://www.npmjs.com/package/@dondetir/ccmux)\n[![node](https://img.shields.io/badge/node-%E2%89%A520-339933)](https://nodejs.org)\n[![license](https://img.shields.io/badge/license-MIT-blue)](./LICENSE)\n\n```bash\nnpm i -g @dondetir/ccmux && ccmux claude\n```\n\n*Don't switch tools. Switch backends.*\n\n</div>\n\n---\n\n> 💡 **Why?** Your Copilot subscription already includes Claude, GPT, and Gemini, and Ollama Cloud adds GLM, Qwen, DeepSeek, Kimi and more. You just couldn't run them in `claude`. ccmux fixes that, aggregating every backend you have into one `/model` picker.\n>\n> ⚠️ **Unofficial:** it rides Copilot's editor-facing API, not a public one, so it can break when GitHub changes that surface. Free-tier premium requests are limited; `429`s are passed through so Claude Code backs off cleanly.\n\n## 🔌 How it works\n\n```\n ┌─────────────┐   Anthropic API    ┌───────┐    Copilot API     ┌────────────────┐\n │ Claude Code │ -----------------> │ ccmux  │ -----------------> │ GitHub Copilot │\n │ (terminal)  │ <----------------- │ :4141 │ <----------------- │ (your sub)     │\n └─────────────┘  streamed replies  └───────┘  native/translate  └────────────────┘\n```\n\n`ccmux` speaks the Anthropic API to Claude Code and routes each request to the right backend by model id: native pass-through for Copilot's Claude models, OpenAI translation for GPT/Gemini and every Ollama Cloud model (`ollama/*`), and the Responses API for `/responses`-only models. Ollama thinking models stream their reasoning back as Claude thinking blocks. It binds to `127.0.0.1`, so your credentials never leave your machine.\n\n## 🚀 Quickstart\n\n```bash\nnpm i -g @dondetir/ccmux   # puts the `ccmux` CLI on your PATH\nccmux claude        # starts the proxy if needed, then launches Claude Code\n```\n\nRequires **Node 20+**, [Claude Code](https://docs.anthropic.com/en/docs/claude-code), and a GitHub account with Copilot access. The first run without a token triggers a one-time device-flow login in your terminal (saved to `~/.config/ccmux/env`).\n\n## 🧠 Models\n\nEvery Copilot model shows up in the native `/model` picker, with no `settings.json` edits:\n\n```\n$ ccmux claude\n✓ proxy ready on http://127.0.0.1:4141\n> /model\n  claude-haiku-4.5\n  claude-sonnet-4.6\n  claude-gpt-4.1\n  claude-gemini-2.5-pro\n  …\n```\n\nFree tier gets `claude-haiku-4.5` only; paid Copilot unlocks sonnet, GPT, and Gemini. Set an Ollama Cloud key (`ccmux login ollama`) and its models join the same picker as `ollama/<id>` (e.g. `ollama/glm-5.2`, `ollama/qwen3-coder:480b`), each showing its real context window. Non-Claude ids are prefixed `claude-` to pass discovery, then the proxy strips the prefix and routes them to the right backend.\n\n## 🛠 Commands\n\n| Command | What it does |\n|---|---|\n| `ccmux claude` | Start the proxy if needed + launch Claude Code through it |\n| `ccmux login copilot` | One-time GitHub device-flow login (in a terminal) |\n| `ccmux login ollama` | Save an Ollama Cloud API key (from ollama.com/settings/keys) |\n| `ccmux logout` | Remove saved tokens (GitHub + Ollama) + VS Code Copilot tokens + stop the proxy. Use `eval \"$(ccmux logout)\"` to also clear tokens exported in the current shell |\n| `ccmux serve` | Run the proxy in the foreground on `:4141` |\n| `ccmux claude --dangerously-skip-permissions` | Launch Claude Code with `--dangerously-skip-permissions` (aliases: `--dangerously`, `--yolo`). Skips per-action permission prompts — sandbox/VM only |\n| `ccmux claude --debug` | Dump every request + upstream response (auth redacted) to `~/.config/ccmux/debug.log` (also `CCMUX_DEBUG=1`) |\n\nLogs stream to `~/.config/ccmux/proxy.log`. If models vanish, the catalog self-heals on the next request.\n\n## ⚙️ Configuration\n\nEnv vars (or `~/.config/ccmux/env`):\n\n| Var | Default | Meaning |\n|---|---|---|\n| `GH_TOKEN` | device flow | GitHub OAuth token (`GITHUB_TOKEN` also accepted) |\n| `OLLAMA_API_KEY` | unset | Ollama Cloud key; set it (or run `ccmux login ollama`) to add `ollama/*` models |\n| `NATIVE_MODEL` | `claude-haiku-4.5` | Model served to Claude Code. Paid: try `claude-sonnet-4.6` |\n| `PORT` | `4141` | Proxy port (binds `127.0.0.1` only) |\n| `USE_NATIVE` | `1` | `1` = native pass-through; `0` = OpenAI translation path |\n| `CLAUDE_CONTEXT_WINDOW` | `200000` | Context window Claude Code assumes (token counts scaled to match) |\n\n## 🐛 Troubleshooting\n\n### GPT-5 / reasoning models show \"invalid parameter\" and no response\n\nGPT-5 reasoning models (gpt-5.*, served via the Responses API) reject sampling\nparameters — `temperature` and `top_p` — returning an \"invalid/unsupported\nparameter\" error, so Claude Code renders nothing. ccmux now drops those for\nreasoning models automatically. If a model still errors, find the exact rejected\nfield with debug logging:\n\n```bash\nccmux claude --debug          # or CCMUX_DEBUG=1 ccmux serve\n# then reproduce; inspect ~/.config/ccmux/debug.log\n```\n\nEvery inbound Anthropic request, the translated upstream request (Authorization\nredacted), and the full upstream response (or raw SSE frames for streams) are\nappended to `~/.config/ccmux/debug.log` (0600, loopback proxy only). This is the\nauthoritative way to see what Copilot rejected.\n\n### Run without permission prompts\n\n```bash\nccmux claude --dangerously-skip-permissions   # alias: --yolo\n```\n\nThis passes `--dangerously-skip-permissions` through to Claude Code, skipping its\nper-action prompts. Only do this inside a sandbox or VM — it lets the agent read,\nwrite, and execute without asking.\n\n## 🔧 Development\n\n```bash\nnpm install\nnpm test        # translators + streaming state machine\nnpm run dev     # proxy with live reload\n```\n\n## 📜 License\n\nReleased under the **MIT License**.\n\n```\nMIT License\n\nCopyright (c) 2026 dondetir\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n\nA copy is also included in the repository as [`LICENSE`](./LICENSE).\n\n---\n\n<div align=\"center\">\n\n### 💛 Built with conviction\n\nClaude Code is the best agentic coding harness out there, but it only spoke one\nbackend. ccmux gives you the freedom to run *any* Copilot model on it, not just\nClaude: GPT, Gemini, and Claude, all in one terminal, all from the subscription\nyou already have. No relay servers, no middlemen, just a few hundred lines of\nTypeScript running on your own machine.\n\nIf ccmux gave you model freedom on the best harness, **⭐ star the repo**. It's\nthe fuel that keeps projects like this alive and maintained.\n\n[![stars](https://img.shields.io/badge/⭐-Star_on_GitHub-yellow?style=social)](https://github.com/dondetir/ccmux)\n·\n[Report a bug](https://github.com/dondetir/ccmux/issues)\n·\n[Request a feature](https://github.com/dondetir/ccmux/issues)\n\n*Built for developers who want every model on the best harness.*\n\n</div>\n","readmeFilename":"README.md"}