
Willow
Willow (柳) · Windows Token 统计工具,查看 AI 编程用量、Token 消耗与费用估算。Open-source Windows desktop token tracker for AI coding tools. Track local token usage, estimated co…
Install with your AI
Paste into Claude Code, Cursor, or any agent — it reads the repo and wires the tool into your project.
Install and set up Willow (git-clone project) into my current project. Found on https://claudeers.com/willow Repo: https://github.com/hey-pu/Willow Homepage/docs: — Detected install method: git-clone → git clone https://github.com/hey-pu/Willow Category: devops. Platforms: cli, api, desktop, web. Read the repo's README for exact setup and env vars, then install it and wire it into my project. Claudeers Health Verdict: unknown; community-verified: false. Confirm the source before running anything.
git clone https://github.com/hey-pu/Willow
// compatibility
| Platforms | cli, api, desktop, web |
|---|---|
| Operating systems | — |
| AI compatibility | claude |
| License | MIT |
| Pricing | open-source |
| Language | Rust |
Willow · 柳
An open-source desktop dashboard for AI coding usage.
Track tokens, estimated costs, and sessions for OpenAI Codex CLI, Claude Code, Kimi CLI, and other coding agents. Willow reads usage logs on your device.
English · 简体中文
What is Willow?
Willow brings local usage logs from multiple AI coding tools into one desktop app. Compare input, output, and cache tokens, see estimated costs by day or model, and look up individual sessions. Open the quick panel from the Windows system tray or the macOS menu bar.
Reports reflect the usage recorded on your device. Cost estimates use model prices. Check your provider's dashboard for official billing and subscription limits. Willow stores usage data locally in SQLite and can refresh its pricing data online.
Switch between Chinese and international token units. The same 150,000,000 tokens can display as 1.5亿 or 150M. Choose a format under Settings → Appearance → Token units.

Features
- Multi-agent: Claude Code, Codex CLI and Kimi CLI out of the box, with an adapter architecture ready for more
- Cost estimates: long-context pricing (the whole request above 200K/272K/512K, as vendors bill it), 5m/1h cache-write pricing, cache-read discounts, fast/priority tier rates, dated list-price changes, DeepSeek off-peak rates — and stored estimates are recalculated when prices change
- Menu bar ticker: today's cost or token count right next to the clock
- 5-hour billing blocks: each agent's usage grouped into hour-aligned 5-hour windows (Claude's and Codex's usage windows), with live burn rate
- Trends & breakdowns: daily/weekly/monthly charts by agent, model, and token type
- Local & private: usage logs are parsed and stored locally in SQLite; pricing is refreshed online
- Light & dark themes, accent colors, and an English/中文 interface
Supported data sources
The following AI coding agents are supported, with some adapter logic ported from ccusage. Windows support also includes Qoder IDE, Qoder CN and WorkBuddy:
| Agent | Location | Format |
|---|---|---|
| Claude Code | $CLAUDE_CONFIG_DIR / ~/.config/claude/projects / ~/.claude/projects | JSONL |
| Codex CLI (OpenAI) | sessions/ and archived_sessions/ under $CODEX_HOME | JSONL |
| Gemini CLI | $GEMINI_DATA_DIR or ~/.gemini/tmp | JSON / JSONL |
| OpenCode | $OPENCODE_DATA_DIR or ~/.local/share/opencode | SQLite + JSON |
| OpenClaw | $OPENCLAW_DIR or ~/.openclaw | JSONL |
| GitHub Copilot CLI | ~/.copilot/otel/*.jsonl | OTEL JSONL |
| Qwen Code | projects/*/chats/ under $QWEN_DATA_DIR or ~/.qwen | JSONL |
| Kimi CLI | sessions/**/wire.jsonl under $KIMI_DATA_DIR or ~/.kimi | JSONL |
| Amp | threads/ under $AMP_DATA_DIR or ~/.local/share/amp | JSON |
| Droid (Factory) | $DROID_SESSIONS_DIR or ~/.factory/sessions | JSON |
| Goose | sessions.db in the Goose data dir or $GOOSE_PATH_ROOT | SQLite |
| Kilo | kilo.db under $KILO_DATA_DIR or ~/.local/share/kilo | SQLite |
| Codebuff | ~/.config/manicode*/projects or $CODEBUFF_DATA_DIR | JSON |
| Hermes Agent | state.db under $HERMES_HOME or ~/.hermes | SQLite |
| pi-agent | $PI_AGENT_DIR or ~/.pi/agent/sessions | JSONL |
Sources with no local data are detected automatically and simply stay empty. Adding another agent is one file in src-tauri/src/adapters/.
Install and build
Windows · Download
Download Willow_0.4.0_x64-setup.exe from GitHub Releases. The Windows x64 installer is unsigned. To build it on Windows, run pnpm install --frozen-lockfile followed by pnpm tauri build --bundles nsis.
macOS · Build from source
Willow builds for both Apple Silicon and Intel. There is currently no macOS installer on GitHub Releases. On a Mac, install Node.js, pnpm, Rust, and the Tauri prerequisites, then run these commands from the project directory:
pnpm install --frozen-lockfile
pnpm tauri build --bundles dmg
GitHub Actions has built and verified the disk images for both architectures. Installation, menu bar behavior, and data migration still need testing on a Mac. A public macOS download is deferred until that testing and Apple signing and notarization are complete.
If you have data from an earlier compatible app, quit that app before launching Willow for the first time. Willow imports history, settings, and supported preferences, including subscriptions, when its data directory is empty.
Accuracy
Parsing and billing logic is ported from ccusage, an implementation validated against large amounts of real-world data:
- Full
message.usagetoken schema, includingcache_creationephemeral_5m/1hbreakdowns - Deduplication by
messageId + requestId, keeping the record with more tokens on conflict; Codex events re-emitted with unchanged totals count once - LiteLLM pricing (embedded offline snapshot + daily online refresh with a jsDelivr mirror for networks that can't reach GitHub) with model-name matching that prefers the vendor's own price over resellers; built-in official prices fill the gaps for brand-new models
- Prices follow the date of each request (e.g. GPT-5.6's July/August price cuts), fast/priority usage uses the vendor's published priority rates, and long prompts bill the whole request at the long-context rate
- Cost modes:
auto(prefer logged costUSD) /calculate(always recompute) /display(logged costUSD only) - Settings → Pricing shows where prices come from and lists any model without a known price (counted as $0)
- History is kept when an agent prunes its old logs (Claude Code deletes transcripts after 30 days by default)
- Where Willow deliberately differs from ccusage: whole-request long-context pricing, the Codex duplicate-event fix, and fast-tier rates for newer models
Development
pnpm install
pnpm tauri dev # development mode
pnpm tauri build # package (macOS .app/.dmg, Windows .msi/.exe)
End-to-end backend test (scans real local data):
cd src-tauri && cargo test --test pipeline -- --nocapture
Architecture
src-tauri/src/
├── adapters/ # one adapter per agent data source
│ ├── claude.rs # Claude Code JSONL parsing
│ ├── codex.rs # Codex CLI parsing
│ ├── jsonl.rs # streaming, resumable JSONL reader
│ └── kimi.rs # Kimi CLI parsing
├── pricing.rs # LiteLLM pricing, built-in/dated prices, model matching
├── cost.rs # long-context-aware cost calculation
├── db.rs # SQLite cache: skips unchanged files, reads only appended bytes, re-prices on price changes
├── aggregate.rs # daily/sessions/models/projects/blocks aggregation
├── types.rs # normalized UsageRecord
└── lib.rs # Tauri commands
src/
├── pages/ # Overview / Trends / Sessions / Models / Blocks / Settings
├── components/ # shadcn-style UI + Recharts charts
└── lib/ # api.ts (typed invoke) / format.ts / i18n.tsx
Data flow: on launch (and every 60s) incrementally scan log directories → parse & normalize → dedupe into SQLite (priced via LiteLLM on insert) → frontend queries aggregates by time range / cost mode.
Credits
- ccusage: Willow's parsing and billing logic is ported from this project
- Tauri · LiteLLM (pricing data) · Recharts
- Special thanks to the LinuxDO community for their recognition and support.
License
MIT. See third-party notices for ported code.
// faq
What is Willow?
Willow (柳) · Windows Token 统计工具,查看 AI 编程用量、Token 消耗与费用估算。Open-source Windows desktop token tracker for AI coding tools. Track local token usage, estimated costs, and sessions for Codex CLI, Claude Code, WorkBuddy, Qoder, and more. macOS builds from source.. It is open-source on GitHub.
Is Willow free to use?
Willow is open-source under the MIT license, so it is free to use.
What category does Willow belong to?
Willow is listed under devops in the Claudeers registry of Claude-compatible tools.
// embed badge
[](https://claudeers.com/willow)
// retro hit counter
[](https://claudeers.com/willow)
// reviews
// guestbook
// related in DevOps & CI/CD
⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的 AI 舆情监控助手与热点筛选工具!聚合多平台热点 + RSS 订阅,支持关键词精准筛选。AI…
Use Claude Code as the foundation for coding infrastructure, allowing you to decide how to interact with the model while enjoying updates from Anthropic.
Professional Antigravity Account Manager & Switcher. One-click seamless account switching for Antigravity Tools. Built with Tauri v2 + React (Rust).专业的 Antig…
Roadmap to becoming an ASP.NET Core developer in 2026