Willow
Health Pass
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Community trust — 32 GitHub stars
Code Pass
- Code scan — Scanned 12 files during light audit, no dangerous patterns found
Permissions Pass
- Permissions — No dangerous permissions requested
No AI report is available for this listing yet.
Willow (柳) is a local AI coding usage dashboard for Codex CLI, Claude Code, and more. Track tokens, estimated costs, and sessions.
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.

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.
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found