@zhangferry-dev/tokendash 1.4.0 → 1.5.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
@@ -4,22 +4,47 @@ A beautiful, local web dashboard for visualizing your Claude Code, Codex, OpenCl
4
4
 
5
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
- ![Product Screenshoot](resources/product_screenshoot.png)
7
+ ![Web Dashboard](resources/product_screenshoot.png)
8
8
 
9
9
  ## Features
10
10
 
11
11
  - **Multi-Agent Support:** View usage for Claude Code, Codex, OpenClaw, and OpenCode.
12
- - **Direct JSONL Parsing:** Reads `~/.claude/projects/` JSONL files directly — no `ccusage` CLI dependency, 100x faster data loading.
12
+ - **Direct JSONL Parsing:** Reads local session files directly — 100x faster data loading.
13
13
  - **Detailed Metrics:** Track total tokens, cost (USD), active days, cache hit rates, and output/input ratio.
14
14
  - **Today by Hour:** 24-hour token consumption panel showing hourly breakdown for the current day.
15
- - **Code Analytics:** Visualize code change trends, tool call frequency, and productivity KPIs (Claude Code & OpenClaw only).
16
- - **Pricing Transparency:** Toggle Cost metric to see per-model pricing formula and rates.
15
+ - **Code Analytics:** Visualize code change trends, tool call frequency, and productivity KPIs.
17
16
  - **Interactive Charts:** Bar/line/area charts with tooltips, model breakdowns, and time range filtering.
18
17
  - **24-Hour Heatmap:** Activity distribution by hour and day of week, with timezone awareness.
19
18
  - **Model & Project Distribution:** See which models and projects drive your usage.
20
19
  - **Persistent Filters:** Your selected time range, project, and metric mode are saved automatically.
21
- - **macOS Menu Bar App:** Native tray icon with real-time token usage, popover dashboard, and agent filtering — runs silently in the background.
22
- - **Test Coverage:** Unit tests (Vitest) and E2E tests (Playwright) for reliability.
20
+
21
+ ## macOS Menu Bar App
22
+
23
+ TokenDash ships as a native macOS menu-bar-only application — no Dock icon, no window clutter. It lives quietly in your status bar and gives you instant access to your AI token usage at a glance.
24
+
25
+ ![macOS Menu Bar](resources/product_menu.png)
26
+
27
+ **Status Bar Badge**
28
+ - Displays real-time token count (e.g. `1.2K`, `32.0M`) directly in the macOS status bar
29
+ - Updates every 5 seconds automatically
30
+ - Shows cost and cache hit rate in the tooltip on hover
31
+ - Resilient badge: transient network or data errors won't clear your existing badge value
32
+
33
+ **Popover Dashboard**
34
+ - Click the status bar icon to open a compact popover with today's full breakdown:
35
+ - Total tokens, input/output/cache metrics at a glance
36
+ - Hourly consumption bar chart with peak value highlight
37
+ - Agent filter dropdown (show only Claude Code, Codex, etc.)
38
+ - Settings: launch at login, check for updates, quit
39
+ - The popover syncs rendered totals back to the status bar badge for maximum accuracy
40
+
41
+ **Native Integration**
42
+ - Written in Swift (`trayHelper.swift`) for macOS 14+ compatibility
43
+ - Menu-bar-only (`LSUIElement: true`) — no Dock icon, runs silently in the background
44
+ - Dark mode support with automatic theme switching
45
+ - Custom app icon
46
+ - Distributed as a standard macOS DMG installer
47
+ - Port auto-detection with fallback — works even if port 3456 is already in use
23
48
 
24
49
  ## Requirements
25
50
 
@@ -47,13 +72,7 @@ During development (`npm run dev`), Vite starts a separate development server on
47
72
 
48
73
  ### macOS Menu Bar App
49
74
 
50
- Download the latest `TokenDash.dmg` from [GitHub Releases](https://github.com/zhangferry/tokendash/releases). Open the DMG and drag TokenDash to your Applications folder.
51
-
52
- The menu bar app shows real-time token usage in the status bar. Click the icon to open a compact popover dashboard with:
53
- - Today's token count and cost breakdown
54
- - Hourly consumption chart
55
- - Agent filter (show only Claude Code, Codex, etc.)
56
- - Settings: launch at login, check for updates, quit
75
+ Download the latest `TokenDash-<version>-arm64.dmg` from [GitHub Releases](https://github.com/zhangferry/tokendash/releases). Open the DMG and drag TokenDash to your Applications folder. Launch it and the status bar icon appears immediately — no setup needed.
57
76
 
58
77
  ### Command Line Options
59
78
 
@@ -104,33 +123,6 @@ If you want to contribute or modify the dashboard locally:
104
123
  - **Testing:** Vitest (unit), Playwright (E2E). Run with `npm test` and `npm run test:e2e`.
105
124
  - **CI:** GitHub Actions pipeline for automated testing on every push and PR.
106
125
 
107
- ## Changelog
108
-
109
- ### v1.4.0
110
- - **macOS Menu Bar App** — native tray icon with real-time token count and cost in the status bar
111
- - **Popover Dashboard** — click the tray icon for a compact dashboard with hourly chart, agent filter, and settings
112
- - **Native Swift Tray Helper** — lightweight binary for macOS 26+ compatibility, drawn SVG icon
113
- - **Agent Filter** — choose which agents to display in both popover and tray badge, persisted across sessions
114
- - **Settings Panel** — launch at login, check for updates (via GitHub Releases), quit
115
- - **Update Checker** — automatic version check against GitHub Releases
116
-
117
- ### v1.3.0
118
- - **Added OpenCode agent support** — parses SQLite database at `~/.local/share/opencode/opencode.db`
119
- - **Added Today by Hour panel** — 24-hour token consumption breakdown for the current day
120
- - **E2E test overhaul** — comprehensive Playwright test suite with fixture-based test data
121
- - **Added CI pipeline** — GitHub Actions for automated testing on push and PR
122
- - **Fixed model trend chart** — included `cacheReadTokens` in model trend calculations
123
-
124
- ### v1.2.0
125
- - **Replaced `ccusage` CLI** with direct JSONL parser — data loads in 1-2ms instead of 12-30s
126
- - **Added code analytics** — code change trend, tool call trend, daily KPIs
127
- - **Added persistent disk cache** with stale-while-revalidate pattern
128
- - **Fixed heatmap** — cost metric now shows real data (was always $0)
129
- - **Fixed timezone handling** — correct date/hour grouping for non-UTC users
130
- - **Added pricing info popup** — shows per-model pricing formula in Cost mode
131
- - **Added test suite** — 49 unit tests + 6 E2E tests
132
- - **Layout improvements** — model trend bar chart, side-by-side analytics panels
133
-
134
126
  ## License
135
127
 
136
128
  [MIT](./LICENSE)