@zhangferry-dev/tokendash 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,18 +2,22 @@
2
2
 
3
3
  A beautiful, local web dashboard for visualizing your Claude Code, Codex, and OpenClaw token usage statistics.
4
4
 
5
- It runs locally and parses token usage data directly from local session files, presenting it in a clean, interactive React dashboard. Claude Code partially relies on the `ccusage` CLI for some data.
5
+ It runs locally and parses token usage data directly from local session files, presenting it in a clean, interactive React dashboard. No external CLI dependencies required.
6
6
 
7
7
  ![Product Screenshoot](resources/product_screenshoot.png)
8
8
 
9
9
  ## Features
10
10
 
11
- - **Multi-Agent Support:** View usage for both Claude Code and Codex.
12
- - **Detailed Metrics:** Track total tokens, cost (USD), active days, and cache hit rates.
13
- - **Interactive Charts:** Visualize usage trends over time with tooltips and breakdowns.
14
- - **Model Distribution:** See which models are driving your usage.
15
- - **Project Analysis:** (For Claude Code) Understand which projects consume the most tokens.
11
+ - **Multi-Agent Support:** View usage for Claude Code, Codex, and OpenClaw.
12
+ - **Direct JSONL Parsing:** Reads `~/.claude/projects/` JSONL files directly no `ccusage` CLI dependency, 100x faster data loading.
13
+ - **Detailed Metrics:** Track total tokens, cost (USD), active days, cache hit rates, and output/input ratio.
14
+ - **Code Analytics:** Visualize code change trends, tool call frequency, and productivity KPIs (Claude Code & OpenClaw only).
15
+ - **Pricing Transparency:** Toggle Cost metric to see per-model pricing formula and rates.
16
+ - **Interactive Charts:** Bar/line/area charts with tooltips, model breakdowns, and time range filtering.
17
+ - **24-Hour Heatmap:** Activity distribution by hour and day of week, with timezone awareness.
18
+ - **Model & Project Distribution:** See which models and projects drive your usage.
16
19
  - **Persistent Filters:** Your selected time range, project, and metric mode are saved automatically.
20
+ - **Test Coverage:** Unit tests (Vitest) and E2E tests (Playwright) for reliability.
17
21
 
18
22
  ## Requirements
19
23
 
@@ -83,7 +87,21 @@ If you want to contribute or modify the dashboard locally:
83
87
 
84
88
  - **Frontend:** React 19, Recharts, Tailwind CSS (via Vite plugin), built with Vite.
85
89
  - **Backend:** Express, TypeScript.
86
- - **Data Source:** Codex and OpenClaw data is parsed directly from local session files. Claude Code data partially uses `ccusage --json` CLI. Uses a short-lived in-memory cache to ensure snappy UI updates when toggling filters.
90
+ - **Data Source:** All agent data is parsed directly from local session files (`~/.claude/projects/`, `~/.codex/sessions/`). No external CLI dependencies.
91
+ - **Caching:** Persistent disk cache (`/tmp/tokendash-cache/`) with stale-while-revalidate pattern for snappy UI updates.
92
+ - **Testing:** Vitest (unit), Playwright (E2E). Run with `npm test` and `npm run test:e2e`.
93
+
94
+ ## Changelog
95
+
96
+ ### v1.2.0
97
+ - **Replaced `ccusage` CLI** with direct JSONL parser — data loads in 1-2ms instead of 12-30s
98
+ - **Added code analytics** — code change trend, tool call trend, daily KPIs
99
+ - **Added persistent disk cache** with stale-while-revalidate pattern
100
+ - **Fixed heatmap** — cost metric now shows real data (was always $0)
101
+ - **Fixed timezone handling** — correct date/hour grouping for non-UTC users
102
+ - **Added pricing info popup** — shows per-model pricing formula in Cost mode
103
+ - **Added test suite** — 49 unit tests + 6 E2E tests
104
+ - **Layout improvements** — model trend bar chart, side-by-side analytics panels
87
105
 
88
106
  ## License
89
107