计然 · A local meter for AI coding tools

Jiran

Tokens pour in from fifty-nine sources. Jiran counts every one of them on your own machine — what you used, what is left of your plan, and what it actually cost.

tools & providers
59tools & providers
report token usage
52report token usage
expose plan quotas
26expose plan quotas
telemetry & analytics
0telemetry & analytics
Scroll

01 · Name

Count what burns, and what it costs

计然 (Jīrán) is the strategist in the Records of the Grand Historian credited with counting both what a state burned and what it earned. That is the whole product in two words: the tokens your AI tools spent, and what those plans actually cost you.

It shipped as Token Monitor up to v0.47.0-rev.36. The rename is not a reset: the old user-data folder is copied over on first launch, and the old environment variables and headers keep working.

Close-up of the abacus beads: bone-white tokens on one side turn cinnabar once they pass the mark

知斗则修备,时用则知物,二者形则万货之情可得而观已。

Know when to fight and you prepare; know the season and you know the goods. See both, and the nature of all ten thousand goods lies open.Jiran, as quoted in Shiji · Biographies of the Money-makers

02 · Ask

Three numbers, read from your own disk

Every tracked tool already keeps transcripts, session databases or caches on your machine. Jiran reads those — the data already lives on your disk, so that is where the counting happens.

  1. 01Usagesample data

    How much have I used?

    Tokens and cost, broken down by tool, model, device, project and individual session, with a durable daily history.

  2. 02Limitssample data

    How much of my plan is left?

    Per-provider quota windows — session, weekly, billing, credits. The Hub probes them and publishes one sanitized snapshot to every device; in local-only mode the Limits page is empty by design.

  3. 03Costsample data

    What am I paying for it?

    A hand-kept subscription ledger sits beside the model price list: what a plan costs, when it renews, and what this month would have cost at API prices.

03 · Rules

Honest about what is measured

A usage dashboard that quietly mixes measurements with guesses is worse than no dashboard. These rules hold on every surface.

  1. “~” means estimated

    Where a tool never stored real token counts, the total is estimated from the text it did store and shown with a leading “~”. The basis of each estimate is documented in the matrix notes.

  2. Credits are their own unit

    A provider that bills in credits (Qoder is the case in point) reports exact credits beside “~”-marked tokens; credits are never folded into a token total.

  3. A refresh never interrupts you

    Frames arrive every few seconds. While a dropdown or a half-typed value is open the rebuild is deferred, expanded rows and scroll positions are kept, and nothing is written when nothing changed.

    liveHover the number: new frames wait
  4. A number belongs to the tab that measured it

    Day, Month and Total come from the collector’s fixed windows; Yesterday and Week are calendar ranges resolved on request. Everywhere a total is reported, the week starts on ISO Monday.

    9.61Mon request · ISO Monday
  5. A greyed device is a silent device

    A device whose last report is older than 10 minutes is marked stale on purpose, rather than being shown as if it were live.

04 · Flow

Four surfaces, one product

Local mode is the default: launch the desktop app and it starts tracking this device — no Hub, no agent, no .env. To gather several machines, run a Hub with Docker Compose on a machine you control.

one device × N

local transcripts / session DBs / caches

tokscale collector1.5 s debounce on change · full scan every 5 min
Hub · MySQLnormalize + aggregatequota probing lives on the Hub
DesktopBrowserAndroid
SurfaceRoleNeeds a Hub
Desktop appElectron · Windows / macOS / LinuxCollects this machine and shows the full UIno
HubDocker Compose + MySQLIngest, aggregation, SSE, and the same dashboard as a web app / installable PWA—
Headless agentNode.jsThe collector with no GUI, for servers and WSL distrosyes
AndroidKotlin / ComposeReads the fleet and the quotas on a phone; collects and posts nothingyes

05 · Edge

Local-first is the architecture, not a slogan

No telemetry, no analytics, no hosted backend, nothing sent to the maintainer. Network access happens only for features you use: the update check, the exchange-rate lookup, the Hub you deploy, and the providers behind quota accounts you configured there.

Never leaves this machine

  • Prompts and replies
  • Source code and file contents
  • Absolute workspace paths
  • OAuth credentials, access / refresh tokens
  • Provider cookies and API keys
  • Raw provider responses

With sync on, goes to your own Hub

  • Device identifiers and metadata
  • Aggregate token and cost totals
  • Tool, model, session and project attribution
  • An optional workspace folder label (never a path)
  • Subscription details you typed in

This website follows suit: no analytics scripts, no cookies. Its only outside request asks GitHub for the latest version number.

Full privacy policy ↗

06 · Sources

Fifty-nine sources, wired in one place

The client list is defined once and every runtime always collects all of it — there is no per-tool opt-in that could silently under-count. A tool with no entry here is not tracked.

  1. Claude Code
  2. Claude Desktop
  3. Codex
  4. OpenCode
  5. Hermes Agent
  6. OpenClaw
  7. Cursor
  8. Antigravity
  9. Cline
  10. Kimi CLI / Kimi Code
  11. Qwen CLI
  12. Grok Build
  13. GitHub Copilot
  14. Pi / Oh My Pi
  15. Zed
  16. Kilo Code
  17. Command Code
  18. MiMo Code
  19. ZCode / GLM
  20. Kiro
  21. CodeBuddy
  22. WorkBuddy
  23. Proma
  24. DeepSeek Harness
  25. Qoder / Qoder CN
  26. Reasonix
  27. Gemini CLI
  28. Roo Code
  29. Amp
  30. Droid
  31. Mux
  32. Kilo CLI
  33. Crush
  34. Goose
  35. Codebuff / Freebuff
  36. Trae
  37. Warp / Oz
  38. Gajae-Code
  39. Jcode
  40. Junie
  41. OpenCodeReview
  42. Devin CLI / Devin Desktop
  43. Senpi
  44. Augment Code
  45. Kimchi
  46. Prime Agent
  47. Cherry Studio
  48. MiniMax Code
  49. Fx
  50. LM Studio
  51. Unsloth
  52. Hindsight
  53. DeepSeek
  54. OpenRouter
  55. Minimax
  56. Volcengine
  57. Ollama
  58. Third-party APIs
  59. Sakana (Fugu)
Dots, in order: token usage · plan quotas · session detailsFull matrix with data paths ↗

07 · Get

Download it, open it, it starts counting

First run needs no setup. Packaged builds check GitHub Releases and surface an update indicator.

Several machines: run a Hub

The root docker-compose.yml is the only supported deployment. The Hub serves the dashboard on the same port (17321), installable as a PWA; the image is ghcr.io/igngserver/jiran-hub.

Hub deployment guide ↗
cp .env.example .env
# JIRAN_SECRET + MySQL passwords
docker compose up -d
curl http://127.0.0.1:17321/api/health

Development and verification concentrate on Windows 11, a Docker Compose Hub, and Ubuntu running the headless agent. Anything outside that has not been fully verified and may misbehave.