{"_id":"0router","_rev":"5-648e256ddfcf3ffe54ad2e9774fb94e7","name":"0router","dist-tags":{"latest":"0.4.72"},"versions":{"0.4.61":{"name":"0router","version":"0.4.61","keywords":["9router","cli","proxy","ai","api"],"license":"MIT","_id":"0router@0.4.61","maintainers":[{"name":"zcus","email":"zcusgt@gmail.com"}],"homepage":"https://github.com/zcuss/9router#readme","bugs":{"url":"https://github.com/zcuss/9router/issues"},"bin":{"0router":"cli.js"},"dist":{"shasum":"850cc5688f8bc8de5070ff8723fb5ce0204221e2","tarball":"https://registry.npmjs.org/0router/-/0router-0.4.61.tgz","fileCount":5857,"integrity":"sha512-jmPBlP6n46Rd1dmJLSaqYTc1TYUXfzCXvWNw9+LZ2qL11m3vldZdakkuiLPx+b5uFW4ihYv77EDkYNWg1b0bmA==","signatures":[{"sig":"MEUCIDZdrWIvNuLYzF1Ur/5510p8cU65d2vPS4z+g3WGU5suAiEAuVHLdhExYAxshVwQuKjwf8KOOd//r70/sWj6dAJwb/E=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/0router@0.4.61","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":90748781},"engines":{"node":">=18.0.0"},"gitHead":"58b9b70a343fbe0b660c4d888f38ed4990a4eb5f","scripts":{"dev":"nodemon -I --watch cli.js --watch src --watch hooks --ext js,json cli.js","build":"node scripts/build-cli.js","pack:cli":"npm run build && npm pack --pack-destination ../..","preinstall":"node hooks/preinstall.js","postinstall":"node hooks/postinstall.js","publish:cli":"npm run build && npm publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"zcus","email":"zcusgt@gmail.com"},"repository":{"url":"git+https://github.com/zcuss/9router.git","type":"git"},"_npmVersion":"11.12.1","description":"9Router CLI - Start and manage 9Router server","directories":{},"_nodeVersion":"24.15.0","dependencies":{"react":"19.2.1","enquirer":"^2.4.1","react-dom":"19.2.1","node-forge":"^1.3.3","node-machine-id":"^1.1.12"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"comment_sqlite":"sql.js + better-sqlite3 are NOT bundled here. They are installed into ~/.9router/runtime/node_modules by hooks/postinstall.js (and re-checked at runtime by cli.js). This avoids Windows EBUSY errors when updating the global CLI, since native .node files no longer live under the locked install dir.","comment_systray":"systray2 is NOT bundled here. It is lazy-installed into ~/.9router/runtime/node_modules by hooks/postinstall.js on macOS/Linux only. Windows uses PowerShell NotifyIcon (zero binary). This avoids shipping unsigned Go binaries that trigger antivirus false positives (Kaspersky). We use the systray2 fork because the legacy systray@1.0.5 ships a 2017 x86_64 binary that fails on modern macOS dyld.","devDependencies":{"esbuild":"^0.25.12","nodemon":"^3.1.14"},"_npmOperationalInternal":{"tmp":"tmp/0router_0.4.61_1779523121091_0.6088656313746741","host":"s3://npm-registry-packages-npm-production"}},"0.4.69":{"name":"0router","version":"0.4.69","keywords":["0router","cli","proxy","ai","api"],"license":"MIT","_id":"0router@0.4.69","maintainers":[{"name":"zcus","email":"zcusgt@gmail.com"}],"bin":{"0router":"cli.js"},"dist":{"shasum":"65011a12bc2bb372b75aa548c7f48c228731c2d1","tarball":"https://registry.npmjs.org/0router/-/0router-0.4.69.tgz","fileCount":3025,"integrity":"sha512-sYF9DdYtXJ1uIHaKqprdmH/LVwXfYwFd/KpW1R3j5g3C2k/R+/BWYjx+ipVWT56hr1yFiFKzc/9kC9QgVM/0WA==","signatures":[{"sig":"MEUCIDCX+uZ340iKQAozhg2wVGo0npep2DVWcOU5FYuq3iiOAiEA7SSG8EQIC9KKQYkGlJAjz2k/Za63hM3pKWW9BWO7xSA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":46213443},"engines":{"node":">=18.0.0"},"gitHead":"b19497ae911621db1ab5ebed2c5f589190d79820","scripts":{"dev":"nodemon -I --watch cli.js --watch src --watch hooks --ext js,json cli.js","build":"node scripts/build-cli.js","pack:cli":"npm run build && npm pack --pack-destination ../..","postinstall":"node hooks/postinstall.js","publish:cli":"npm run build && npm publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"zcus","email":"zcusgt@gmail.com"},"_npmVersion":"10.8.2","description":"0Router CLI - Start and manage 0Router server","directories":{},"_nodeVersion":"20.20.2","dependencies":{"react":"19.2.1","enquirer":"^2.4.1","react-dom":"19.2.1","node-forge":"^1.3.3","node-machine-id":"^1.1.12"},"_hasShrinkwrap":false,"comment_sqlite":"sql.js + better-sqlite3 are NOT bundled here. They are installed into ~/.0Router/runtime/node_modules by hooks/postinstall.js (and re-checked at runtime by cli.js). This avoids Windows EBUSY errors when updating the global CLI, since native .node files no longer live under the locked install dir.","comment_systray":"systray2 is NOT bundled here. It is lazy-installed into ~/.0Router/runtime/node_modules by hooks/postinstall.js on macOS/Linux only. Windows uses PowerShell NotifyIcon (zero binary). This avoids shipping unsigned Go binaries that trigger antivirus false positives (Kaspersky). We use the systray2 fork because the legacy systray@1.0.5 ships a 2017 x86_64 binary that fails on modern macOS dyld.","devDependencies":{"esbuild":"^0.25.12","nodemon":"^3.1.14"},"_npmOperationalInternal":{"tmp":"tmp/0router_0.4.69_1779540628896_0.7912007579957492","host":"s3://npm-registry-packages-npm-production"}},"0.4.70":{"name":"0router","version":"0.4.70","keywords":["0router","cli","proxy","ai","api"],"license":"MIT","_id":"0router@0.4.70","maintainers":[{"name":"zcus","email":"zcusgt@gmail.com"}],"bin":{"0router":"cli.js"},"dist":{"shasum":"8954fab9c8f2a7b88e69611750272735bd53b018","tarball":"https://registry.npmjs.org/0router/-/0router-0.4.70.tgz","fileCount":3025,"integrity":"sha512-orm/8YZKxJps/pwKdAPAj4UbmVgIeIHQ6APUclYis5snE//gfXrLb/IGIYre+d5+lj9l5uTunzbXZp6iu3bRiw==","signatures":[{"sig":"MEUCIQDI89HfMfsOTg4qiZvfkIwmI9KB7qK/DWXAS0jNzROBuwIgKzFyLQ69ahY/+UpSsOp8zRMHR6F58vCQphKO1JSt/Ow=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":46213910},"engines":{"node":">=18.0.0"},"gitHead":"c9260a2d2007a59214b23308490108a07de97755","scripts":{"dev":"nodemon -I --watch cli.js --watch src --watch hooks --ext js,json cli.js","build":"node scripts/build-cli.js","pack:cli":"npm run build && npm pack --pack-destination ../..","postinstall":"node hooks/postinstall.js","publish:cli":"npm run build && npm publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"zcus","email":"zcusgt@gmail.com"},"_npmVersion":"10.8.2","description":"0Router CLI - Start and manage 0Router server","directories":{},"_nodeVersion":"20.20.2","dependencies":{"react":"19.2.1","enquirer":"^2.4.1","react-dom":"19.2.1","node-forge":"^1.3.3","node-machine-id":"^1.1.12"},"_hasShrinkwrap":false,"comment_sqlite":"sql.js + better-sqlite3 are NOT bundled here. They are installed into ~/.0Router/runtime/node_modules by hooks/postinstall.js (and re-checked at runtime by cli.js). This avoids Windows EBUSY errors when updating the global CLI, since native .node files no longer live under the locked install dir.","comment_systray":"systray2 is NOT bundled here. It is lazy-installed into ~/.0Router/runtime/node_modules by hooks/postinstall.js on macOS/Linux only. Windows uses PowerShell NotifyIcon (zero binary). This avoids shipping unsigned Go binaries that trigger antivirus false positives (Kaspersky). We use the systray2 fork because the legacy systray@1.0.5 ships a 2017 x86_64 binary that fails on modern macOS dyld.","devDependencies":{"esbuild":"^0.25.12","nodemon":"^3.1.14"},"_npmOperationalInternal":{"tmp":"tmp/0router_0.4.70_1779542341497_0.6401141030129216","host":"s3://npm-registry-packages-npm-production"}},"0.4.71":{"name":"0router","version":"0.4.71","keywords":["0router","cli","proxy","ai","api"],"license":"MIT","_id":"0router@0.4.71","maintainers":[{"name":"zcus","email":"zcusgt@gmail.com"}],"bin":{"0router":"cli.js"},"dist":{"shasum":"d46e9d1464d7127b82e4e4a6702a3cb35e7492e6","tarball":"https://registry.npmjs.org/0router/-/0router-0.4.71.tgz","fileCount":3025,"integrity":"sha512-BdQHRFZunajsuHDliwqhgg9/HWnTsi9/7fGJ1LXm9EiQZ8fTNCdFuHuY0j8eTXQgKEI63HtC8N6cMT4n5Ik8vQ==","signatures":[{"sig":"MEUCIFOSatsJ9NAfaTdeWRM7f6Zd7/BzlkL0vHgMCWq/A6KmAiEAowtHtJclpl6qbV7KdEfMPWDKeSdqJDUi6k4ZGoE8lRY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":46207970},"engines":{"node":">=18.0.0"},"gitHead":"227254f92bcea765e39b6beaa1a621b592daa17d","scripts":{"dev":"nodemon -I --watch cli.js --watch src --watch hooks --ext js,json cli.js","build":"node scripts/build-cli.js","pack:cli":"npm run build && npm pack --pack-destination ../..","postinstall":"node hooks/postinstall.js","publish:cli":"npm run build && npm publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"zcus","email":"zcusgt@gmail.com"},"_npmVersion":"10.8.2","description":"0Router CLI - Start and manage 0Router server","directories":{},"_nodeVersion":"20.20.2","dependencies":{"react":"19.2.1","enquirer":"^2.4.1","react-dom":"19.2.1","node-forge":"^1.3.3","node-machine-id":"^1.1.12"},"_hasShrinkwrap":false,"comment_sqlite":"sql.js + better-sqlite3 are NOT bundled here. They are installed into ~/.0Router/runtime/node_modules by hooks/postinstall.js (and re-checked at runtime by cli.js). This avoids Windows EBUSY errors when updating the global CLI, since native .node files no longer live under the locked install dir.","comment_systray":"systray2 is NOT bundled here. It is lazy-installed into ~/.0Router/runtime/node_modules by hooks/postinstall.js on macOS/Linux only. Windows uses PowerShell NotifyIcon (zero binary). This avoids shipping unsigned Go binaries that trigger antivirus false positives (Kaspersky). We use the systray2 fork because the legacy systray@1.0.5 ships a 2017 x86_64 binary that fails on modern macOS dyld.","devDependencies":{"esbuild":"^0.25.12","nodemon":"^3.1.14"},"_npmOperationalInternal":{"tmp":"tmp/0router_0.4.71_1779789066715_0.04329825039294377","host":"s3://npm-registry-packages-npm-production"}},"0.4.72":{"name":"0router","version":"0.4.72","description":"0Router CLI - Start and manage 0Router server","bin":{"0router":"cli.js"},"scripts":{"dev":"nodemon -I --watch cli.js --watch src --watch hooks --ext js,json cli.js","build":"node scripts/build-cli.js","pack:cli":"npm run build && npm pack --pack-destination ../..","publish:cli":"npm run build && npm publish","postinstall":"node hooks/postinstall.js","prepublishOnly":"npm run build"},"dependencies":{"enquirer":"^2.4.1","node-forge":"^1.3.3","node-machine-id":"^1.1.12","react":"19.2.1","react-dom":"19.2.1"},"comment_sqlite":"sql.js + better-sqlite3 are NOT bundled here. They are installed into ~/.0Router/runtime/node_modules by hooks/postinstall.js (and re-checked at runtime by cli.js). This avoids Windows EBUSY errors when updating the global CLI, since native .node files no longer live under the locked install dir.","comment_systray":"systray2 is NOT bundled here. It is lazy-installed into ~/.0Router/runtime/node_modules by hooks/postinstall.js on macOS/Linux only. Windows uses PowerShell NotifyIcon (zero binary). This avoids shipping unsigned Go binaries that trigger antivirus false positives (Kaspersky). We use the systray2 fork because the legacy systray@1.0.5 ships a 2017 x86_64 binary that fails on modern macOS dyld.","engines":{"node":">=18.0.0"},"keywords":["0router","cli","proxy","ai","api"],"license":"MIT","devDependencies":{"esbuild":"^0.25.12","nodemon":"^3.1.14"},"_id":"0router@0.4.72","gitHead":"9889d2fdbb39441a58cd07f8ea1c5d8c81994b1c","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-RhDTW0HYfpBAuinlgqCLn+AZ768hMxMggDk5C2rMtDwzXeZIX+JMI3OHcbi51ApIAQaTtRh56jVHyUHFNRrBwA==","shasum":"f8f4f2d608108f462b591b0402aa05f3254d39fd","tarball":"https://registry.npmjs.org/0router/-/0router-0.4.72.tgz","fileCount":3025,"unpackedSize":46208219,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCyYIb8mbhw/xOgzdVZoLAECK+XRoRY0jBMTRF17Re6KgIhALJFVaru/ni/xiCWcArManHMWTQQEgcKs1uVVEH1b/J4"}]},"_npmUser":{"name":"zcus","email":"zcusgt@gmail.com"},"directories":{},"maintainers":[{"name":"zcus","email":"zcusgt@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/0router_0.4.72_1779790606970_0.21293520690308831"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-23T07:58:40.970Z","modified":"2026-05-26T10:16:47.412Z","0.4.61":"2026-05-23T07:58:43.129Z","0.4.69":"2026-05-23T12:50:29.263Z","0.4.70":"2026-05-23T13:19:01.876Z","0.4.71":"2026-05-26T09:51:07.102Z","0.4.72":"2026-05-26T10:16:47.304Z"},"license":"MIT","keywords":["0router","cli","proxy","ai","api"],"description":"0Router CLI - Start and manage 0Router server","maintainers":[{"name":"zcus","email":"zcusgt@gmail.com"}],"readme":"# 0Router - FREE AI Router & Token Saver\n\n**Never stop coding. Save 20-40% tokens with RTK + auto-fallback to FREE & cheap AI models.**\n\n**Connect All AI Code Tools (Claude Code, Cursor, Antigravity, Copilot, Codex, Gemini, OpenCode, Cline, OpenClaw...) to 40+ AI Providers & 100+ Models.**\n\n[![npm](https://img.shields.io/npm/v/0router.svg)](https://www.npmjs.com/package/0router)\n[![Downloads](https://img.shields.io/npm/dm/0router.svg)](https://www.npmjs.com/package/0router)\n[![Docker Pulls](https://img.shields.io/docker/pulls/zcuss/0router.svg?logo=docker&label=Docker%20pulls)](https://hub.docker.com/r/zcuss/0router)\n[![GHCR](https://img.shields.io/badge/GHCR-zcuss%2F0router-blue?logo=github)](https://github.com/zcuss/0router/pkgs/container/0router)\n[![License](https://img.shields.io/npm/l/0router.svg)](https://github.com/zcuss/0router/blob/main/LICENSE)\n\n<a href=\"https://trendshift.io/repositories/22628\" target=\"_blank\"><img src=\"https://trendshift.io/api/badge/repositories/22628\" alt=\"zcuss%2F0router | Trendshift\" style=\"width: 250px; height: 55px;\" width=\"250\" height=\"55\"/></a>\n\n[🌐 Website](https://0Router.com) • [📖 Full Docs](https://github.com/zcuss/0router)\n\n---\n\n## 🤔 Why 0Router?\n\n**Stop wasting money, tokens and hitting limits:**\n\n- ❌ Subscription quota expires unused every month\n- ❌ Rate limits stop you mid-coding\n- ❌ Tool outputs (git diff, grep, ls...) burn tokens fast\n- ❌ Expensive APIs ($20-50/month per provider)\n\n**0Router solves this:**\n\n- ✅ **RTK Token Saver** - Auto-compress tool_result, save 20-40% tokens\n- ✅ **Maximize subscriptions** - Track quota, use every bit before reset\n- ✅ **Auto fallback** - Subscription → Cheap → Free, zero downtime\n- ✅ **Multi-account** - Round-robin between accounts per provider\n- ✅ **Universal** - Works with any OpenAI/Claude-compatible CLI\n\n---\n\n## ⚡ Quick Start\n\n**Option 1 — npm (recommended for desktop):**\n\n```bash\nnpm install -g 0router\n0router\n\n# Or run directly with npx\nnpx 0router\n```\n\n**Option 2 — Docker (server/VPS):**\n\n```bash\ndocker run -d --name 0router -p 20128:20128 \\\n  -v \"$HOME/.0router:/app/data\" -e DATA_DIR=/app/data \\\n  zcuss/0router:latest\n```\n\nPublished image: [GHCR](https://github.com/zcuss/0router/pkgs/container/0router) (multi-platform amd64/arm64).\n\n🎉 Dashboard opens at `http://localhost:20128`\n\n**2. Connect a FREE provider (no signup needed):**\n\nDashboard → Providers → Connect **Kiro AI** (free Claude unlimited) or **OpenCode Free** (no auth) → Done!\n\n**3. Use in your CLI tool:**\n\n```\nClaude Code/Codex/OpenClaw/Cursor/Cline Settings:\n  Endpoint: http://localhost:20128/v1\n  API Key:  [copy from dashboard]\n  Model:    kr/claude-sonnet-4.5\n```\n\nThat's it! Start coding with FREE AI models.\n\n---\n\n## 🚀 CLI Options\n\n```bash\n0Router                    # Start with default settings\n0Router --port 8080        # Custom port\n0Router --no-browser       # Don't open browser\n0Router --skip-update      # Skip auto-update check\n0Router --help             # Show all options\n```\n\n**Dashboard**: `http://localhost:20128/dashboard`\n\n---\n\n## 🛠️ Supported CLI Tools\n\nClaude-Code • OpenClaw • Codex • OpenCode • Cursor • Antigravity • Cline • Continue • Droid • Roo • Copilot • Kilo Code • Gemini CLI • Qwen Code • iFlow • Crush • Crusher • Aider\n\nAny tool supporting OpenAI/Claude-compatible API works.\n\n---\n\n## 💾 Data Location\n\n- **macOS/Linux**: `~/.0Router/db/data.sqlite`\n- **Windows**: `%APPDATA%/0Router/db/data.sqlite`\n- **Docker**: `/app/data/db/data.sqlite` (mount `$HOME/.0Router` to persist)\n\n---\n\n## 📚 Documentation\n\nFull docs, advanced setup, video tutorials & development guide:\n\n- **GitHub**: https://github.com/zcuss/0router\n- **Full README**: https://github.com/zcuss/0router/blob/main/README.md\n- **Website**: https://0Router.com\n\n---\n\n## 🙏 Acknowledgments\n\n- **[CLIProxyAPI](https://github.com/router-for-me/CLIProxyAPI)** - Original Go implementation\n\n## 📄 License\n\nMIT License - see [LICENSE](LICENSE) for details.\n","readmeFilename":"README.md"}