Skip to content

Cost Monitoring In development ​

Cost dashboard

Aggregate token spend from 5 CLIs in one place

Switch unifies token spend from tools like Claude Code / Codex / Gemini / PicoClaw / NullClaw, and alerts you before you exceed budget.

Cost aggregation ​

Once the Switch background process is running, requests from every CLI process started by Switch pass through the local proxy (default 127.0.0.1:41234) and are recorded to a local SQLite database:

~/.lurus-switch/costs.db

Aggregation dimensions:

Tool

claude-code / codex / gemini / picoclaw / nullclaw

Model

claude-sonnet-4 / gpt-5 / gemini-3-pro, etc.

Project

By the git repo root containing the CWD

Time

Day / week / month

Threshold alerts ​

Configure these on the Switch settings page:

Alert typeExample
Daily budgetSystem notification when you exceed ¥50/day
Single callHighlighted in red when a call exceeds ¥2
Model sharePrompt to downshift when Claude Opus > 60%

Alert channels: System notification Email Webhook

Attribution analysis ​

"Why did spend suddenly jump today?"

Switch provides flame-graph-style attribution, drilling down layer by layer to the exact culprit:

总消费 ¥38.2 (↑ 250% vs 昨日)
├─ claude-code   ¥28.4 (74%)  ← 主因
│   └─ 项目: 2l-bs-docs       ¥21.3  ← 具体元凶
│       └─ 模型: claude-opus  ¥19.8
├─ codex         ¥6.5
└─ gemini        ¥3.3

Lumen integration ​

For agent projects that use the Lumen SDK, Switch can merge Lumen’s fine-grained trace data:

Switch 粗粒度: 项目 / 工具 / 模型
     +
Lumen 细粒度: Graph / Node / LLM Call
     =
完整成本拓扑

Enable Lumen integration

In Switch settings, enable "Lumen integration" and point it at http://localhost:7070 to merge Switch’s coarse-grained cost with Lumen’s Graph / Node / LLM Call level traces into a complete cost topology.

Export ​

In the UI:

右键 → 导出为 CSV / JSON

Or from the command line:

bash
lurus-switch export --format csv --since 30d > costs.csv

Next steps ​

Next steps

Powered by Lurus Technologies