← ClaudeAtlas

zcode-usage-synclisted

Export ZCode, OpenCode, mirasim, Xiaomi MiMo's local model-usage ledger, or another 10Router/9Router instance's usage into 10Router via /api/settings/database/import-usage. Use when the user asks to 导出/同步/导入 ZCode/OpenCode/mirasim/小米MiMo 使用量到 10Router, sync usage from another 10Router/9Router instance (NAS/9r 备份/第二个实例汇总), sync zcode/mimo usage, export usage to 10router, or asks how much they used ZCode/mirasim/MiMo and wants it recorded in 10Router stats. OpenCode via --source opencode, mirasim via --source mirasim, Xiaomi MiMo via --source mimo, another router instance via --source 10r (--db for its data.sqlite).
techysy/10router · ★ 44 · API & Backend · score 80
Install: claude install-skill techysy/10router
# Usage Sync → 10Router Export this machine's ZCode **or OpenCode** **or mirasim** **or Xiaomi MiMo** model-usage ledger — or another 10Router/9Router instance's own database — into 10Router's usage statistics. ## Preconditions (check before running) 1. **10Router endpoint** — default `http://127.0.0.1:20127`. If the user runs 10Router elsewhere (NAS, LAN), ask or infer from context. For a NAS/remote instance use its address, e.g. `http://192.168.31.101:20127`. *(Online modes only — `--export` needs neither endpoint nor credentials.)* 2. **Source** — `--source zcode` (default), `--source opencode` (opencode.ai desktop app), `--source mirasim` (mirasim desktop insights ledger), `--source mimo` (Xiaomi MiMo desktop / mimocode), or `--source 10r` (another 10Router/9Router instance's `data.sqlite`; aliases `10router` / `9r` / `9router`). None but zcode is auto-detected — pass the flag explicitly. 3. **Credential (one of)** — - Virtual key (recommended): created in 10Router dashboard → API Keys, format `sk-…`. Pass via `--key`. - Dashboard password: pass via `--password`. - The script also reads env vars `TENROUTER_ENDPOINT` / `TENROUTER_KEY` / `TENROUTER_PASSWORD`. 4. Never ask the user to paste credentials into chat if they already configured them; prefer env/config over interactive prompts. ## Run **Choose the mode first**: if this machine can reach the 10Router endpoint (same LAN / localhost / tunnel), sync online. If it **cannot** (different network, no route to