{"_id":"10router-cli","_rev":"2-d2ae8407d6f00173f9e6af6a1b021d06","name":"10router-cli","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.1":{"name":"10router-cli","version":"1.0.1","keywords":["10router","cli","proxy","ai","api"],"license":"MIT","_id":"10router-cli@1.0.1","maintainers":[{"name":"yu_shiyang","email":"i@shiyangyu.com"}],"bin":{"10router":"cli.js"},"dist":{"shasum":"df3d2a76f7c5fd8d630e50db07190122e56316ed","tarball":"https://registry.npmjs.org/10router-cli/-/10router-cli-1.0.1.tgz","fileCount":3219,"integrity":"sha512-ny8/T8d9h3vJwHaDtSbHp/qyKd55pgcauJy03s1zW0H++qL5MFPxjE60KbJ91Sh4XhZtj3cqFeCFNN4LJHydew==","signatures":[{"sig":"MEYCIQCIdKfsD6TB8iGgf/iYJH+UW3D2hHbblAuS99Gs7+PPwgIhAI0UfkAlSHBOKCYb9XOoLrSX0lL8K3rYtiF/yGpRiMwW","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":50022762},"engines":{"node":">=18.0.0"},"gitHead":"eb9b0a0c44c586cd4c156ffe576c400a9bd9c5ff","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":"yu_shiyang","email":"i@shiyangyu.com"},"_npmVersion":"12.0.2","description":"10Router CLI - Start and manage 10Router server","directories":{},"_nodeVersion":"26.1.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"},"_hasShrinkwrap":false,"comment_sqlite":"sql.js + better-sqlite3 are NOT bundled here. They are installed into ~/.10router/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 ~/.10router/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/10router-cli_1.0.1_1787982443354_0.44105665962621665","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"10router-cli","version":"1.0.2","description":"10Router CLI - Start and manage 10Router server","bin":{"10router":"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 || exit 0","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_postinstall":"`|| exit 0` is deliberate: this hook only warms ~/.10router/runtime, and cli.js re-runs the same ensureSqliteRuntime/ensureTrayRuntime on every start, so a failure here costs nothing. Without it npm aborts the whole install — e.g. running Windows npm against a WSL path, where cmd.exe cannot cd to a UNC directory, falls back to C:\\Windows and node then cannot find hooks/postinstall.js at all, so the script's own try/catch never gets to run.","comment_sqlite":"sql.js + better-sqlite3 are NOT bundled here. They are installed into ~/.10router/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 ~/.10router/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":["10router","cli","proxy","ai","api"],"license":"MIT","devDependencies":{"esbuild":"^0.25.12","nodemon":"^3.1.14"},"gitHead":"a93983f4289f06d740be3091d4809079a0490966","_id":"10router-cli@1.0.2","_nodeVersion":"24.20.0","_npmVersion":"11.19.0","dist":{"integrity":"sha512-nvIfb49tUsO3LO+WomL/6dP+rihpPO+2OTAC141oinMzU0ZsVyDXSRS1Ac2KlKWe1erfJgDGBbO9uj49iyxUhg==","shasum":"02485681a944ed9afaf43ef8149c79461e74e44b","tarball":"https://registry.npmjs.org/10router-cli/-/10router-cli-1.0.2.tgz","fileCount":3219,"unpackedSize":50038574,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDFognMK8Cr5R3lX8gSPIwZIpLF290H9SJ0Tr/7+AfETAiEAjdwBQvzCdWTPxlS6d5bCnpWl1qahIjpyQDlrZ6RI0+w="}]},"_npmUser":{"name":"yu_shiyang","email":"i@shiyangyu.com"},"directories":{},"maintainers":[{"name":"yu_shiyang","email":"i@shiyangyu.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/10router-cli_1.0.2_1788007153916_0.6193913410511176"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-29T05:47:23.282Z","modified":"2026-08-29T12:39:14.444Z","1.0.1":"2026-08-29T05:47:23.733Z","1.0.2":"2026-08-29T12:39:14.244Z"},"license":"MIT","keywords":["10router","cli","proxy","ai","api"],"description":"10Router CLI - Start and manage 10Router server","maintainers":[{"name":"yu_shiyang","email":"i@shiyangyu.com"}],"readme":"# 10Router - FREE AI Router & Token Saver\r\n\r\n**Never stop coding. Save 20-40% tokens with RTK + auto-fallback to FREE & cheap AI models.**\r\n\r\n**Connect All AI Code Tools (Claude Code, Cursor, Antigravity, Copilot, Codex, Gemini, OpenCode, Cline, OpenClaw...) to 40+ AI Providers & 100+ Models.**\r\n\r\n[![npm](https://img.shields.io/npm/v/10router-cli.svg)](https://www.npmjs.com/package/10router-cli)\r\n[![Downloads](https://img.shields.io/npm/dm/10router-cli.svg)](https://www.npmjs.com/package/10router-cli)\r\n[![GHCR](https://img.shields.io/badge/GHCR-techysy%2F10router-blue?logo=github)](https://github.com/techysy/10router/pkgs/container/10router)\r\n[![License](https://img.shields.io/npm/l/10router-cli.svg)](https://github.com/techysy/10router/blob/main/LICENSE)\r\n\r\n[📖 Full Docs](https://github.com/techysy/10router)\r\n\r\n---\r\n\r\n## 🤔 Why 10Router?\r\n\r\n**Stop wasting money, tokens and hitting limits:**\r\n\r\n- ❌ Subscription quota expires unused every month\r\n- ❌ Rate limits stop you mid-coding\r\n- ❌ Tool outputs (git diff, grep, ls...) burn tokens fast\r\n- ❌ Expensive APIs ($20-50/month per provider)\r\n\r\n**10Router solves this:**\r\n\r\n- ✅ **RTK Token Saver** - Auto-compress tool_result, save 20-40% tokens\r\n- ✅ **Maximize subscriptions** - Track quota, use every bit before reset\r\n- ✅ **Auto fallback** - Subscription → Cheap → Free, zero downtime\r\n- ✅ **Multi-account** - Round-robin between accounts per provider\r\n- ✅ **Universal** - Works with any OpenAI/Claude-compatible CLI\r\n\r\n---\r\n\r\n## ⚡ Quick Start\r\n\r\n**Option 1 — npm (recommended for desktop):**\r\n\r\n```bash\r\nnpm install -g 10router-cli\r\n10router\r\n\r\n# Or run directly with npx\r\nnpx 10router-cli\r\n```\r\n\r\n**Option 2 — Docker (server/VPS):**\r\n\r\n```bash\r\ndocker run -d --name 10router -p 20128:20128 \\\r\n  -v \"$HOME/.10router:/app/data\" -e DATA_DIR=/app/data \\\r\n  ghcr.io/techysy/10router:latest\r\n```\r\n\r\nPublished images: [GHCR](https://github.com/techysy/10router/pkgs/container/10router) (multi-platform amd64/arm64).\r\n\r\n🎉 Dashboard opens at `http://localhost:20128`\r\n\r\n**2. Connect a FREE provider (no signup needed):**\r\n\r\nDashboard → Providers → Connect **Kiro AI** (free Claude unlimited) or **OpenCode Free** (no auth) → Done!\r\n\r\n**3. Use in your CLI tool:**\r\n\r\n```\r\nClaude Code/Codex/OpenClaw/Cursor/Cline Settings:\r\n  Endpoint: http://localhost:20128/v1\r\n  API Key:  [copy from dashboard]\r\n  Model:    kr/claude-sonnet-4.5\r\n```\r\n\r\nThat's it! Start coding with FREE AI models.\r\n\r\n---\r\n\r\n## 🚀 CLI Options\r\n\r\n```bash\r\n10router                    # Start with default settings\r\n10router --port 8080        # Custom port\r\n10router --no-browser       # Don't open browser\r\n10router --skip-update      # Skip auto-update check\r\n10router --help             # Show all options\r\n```\r\n\r\n**Dashboard**: `http://localhost:20128/dashboard`\r\n\r\n---\r\n\r\n## 🛠️ Supported CLI Tools\r\n\r\nClaude-Code • OpenClaw • Codex • OpenCode • Cursor • Antigravity • Cline • Continue • Droid • Roo • Copilot • Kilo Code • Gemini CLI • Qwen Code • iFlow • Crush • Crusher • Aider\r\n\r\nAny tool supporting OpenAI/Claude-compatible API works.\r\n\r\n---\r\n\r\n## 💾 Data Location\r\n\r\n- **macOS/Linux**: `~/.10router/db/data.sqlite`\r\n- **Windows**: `%APPDATA%/10router/db/data.sqlite`\r\n- **Docker**: `/app/data/db/data.sqlite` (mount `$HOME/.10router` to persist)\r\n\r\n---\r\n\r\n## 📚 Documentation\r\n\r\nFull docs, advanced setup, video tutorials & development guide:\r\n\r\n- **GitHub**: https://github.com/techysy/10router\r\n- **Full README**: https://github.com/techysy/10router/blob/main/README.md\r\n- **Changelog**: https://github.com/techysy/10router/blob/main/CHANGELOG.md\r\n\r\n---\r\n\r\n## 🙏 Acknowledgments\r\n\r\n- **[9Router](https://github.com/decolua/9router)** - Upstream project this is an optimized fork of\r\n- **[CLIProxyAPI](https://github.com/router-for-me/CLIProxyAPI)** - Original Go implementation\r\n\r\n## 📄 License\r\n\r\nMIT License - see [LICENSE](LICENSE) for details.\r\n","readmeFilename":"README.md"}