tokentracker-cli 0.2.27 → 0.3.3

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
@@ -11,67 +11,88 @@
11
11
 
12
12
  </div>
13
13
 
14
+ <div align="center">
15
+ <img src="docs/screenshots/dashboard-dark.png" alt="Token Tracker Dashboard" width="800" />
16
+ <br/><br/>
17
+ </div>
18
+
14
19
  ---
15
20
 
16
- ## Quick Start
21
+ ## Two Ways to Use
22
+
23
+ ### Option A: macOS Menu Bar App (Recommended)
24
+
25
+ Download `TokenTrackerBar.dmg` from the [latest release](https://github.com/mm7894215/tokentracker/releases/latest), drag to Applications, done.
26
+
27
+ - Lives in your menu bar — click to see usage stats
28
+ - Auto-syncs data from all supported CLI tools
29
+ - No terminal, no Node.js, no setup required
30
+
31
+ <div align="center">
32
+ <img src="docs/screenshots/menubar.jpeg" alt="Menu Bar App" width="420" />
33
+ </div>
34
+
35
+ ### Option B: CLI + Web Dashboard
17
36
 
18
37
  ```bash
19
38
  npx tokentracker-cli
20
39
  ```
21
40
 
22
- One command does everything: first-time setup → hook installation → data sync → open dashboard.
41
+ One command does everything: first-time setup → hook installation → data sync → open dashboard at `http://localhost:7890`.
42
+
43
+ Install globally for shorter commands:
44
+
45
+ ```bash
46
+ npm i -g tokentracker-cli
47
+ tokentracker # Open dashboard
48
+ tokentracker sync # Manual sync
49
+ tokentracker status # Check hook status
50
+ tokentracker doctor # Health check
51
+ ```
52
+
53
+ ---
54
+
55
+ <div align="center">
56
+ <img src="docs/screenshots/dashboard-light.png" alt="Web Dashboard" width="800" />
57
+ </div>
23
58
 
24
59
  ## Features
25
60
 
26
- - **Multi-Source Tracking** — Codex CLI, Claude Code, Gemini CLI, OpenCode, OpenClaw, Every Code
61
+ - **Multi-Source Tracking** — Claude Code, Codex CLI, Cursor, Kiro, Gemini CLI, OpenCode, OpenClaw, Every Code
27
62
  - **Local-First** — All data stays on your machine. No cloud account required.
28
63
  - **Zero-Config** — Hooks auto-detect and configure on first run
29
- - **Built-in Dashboard** — Web UI at `http://localhost:7890`, no external service needed
64
+ - **Built-in Dashboard** — Web UI with usage trends, model breakdowns, heatmaps
30
65
  - **Privacy-First** — Only token counts tracked, never prompts or responses
31
66
 
32
67
  ## Supported CLI Tools
33
68
 
34
69
  | CLI Tool | Auto-Detection |
35
70
  |----------|----------------|
36
- | **Codex CLI** | ✅ |
37
71
  | **Claude Code** | ✅ |
72
+ | **Codex CLI** | ✅ |
73
+ | **Cursor** | ✅ (via API) |
74
+ | **Kiro** | ✅ |
38
75
  | **Gemini CLI** | ✅ |
39
76
  | **OpenCode** | ✅ |
40
77
  | **OpenClaw** | ✅ |
41
78
  | **Every Code** | ✅ |
42
79
 
43
- ## Usage
44
-
45
- After first run via `npx tokentracker-cli`, you can also install globally for shorter commands:
46
-
47
- ```bash
48
- npm i -g tokentracker-cli
49
-
50
- # Then use anywhere:
51
- tokentracker # Open dashboard
52
- tokentracker serve --port 3000
53
- tokentracker sync # Manual sync
54
- tokentracker status # Check hook status
55
- tokentracker doctor # Health check
56
- tokentracker uninstall # Remove hooks
57
- ```
58
-
59
80
  ## How It Works
60
81
 
61
82
  ```
62
- AI CLI Tools (Codex, Claude, Gemini, OpenCode, ...)
83
+ AI CLI Tools (Claude, Codex, Cursor, Kiro, Gemini, OpenCode, ...)
63
84
 
64
85
  │ hooks auto-trigger on usage
65
86
 
66
- Token Tracker CLI (local parsing + aggregation)
87
+ Token Tracker (local parsing + aggregation)
67
88
 
68
89
  │ 30-minute UTC buckets
69
90
 
70
- Local Dashboard (http://localhost:7890)
91
+ Dashboard (Menu Bar App or localhost:7890)
71
92
  ```
72
93
 
73
94
  1. AI CLI tools generate logs during usage
74
- 2. Lightweight hooks detect changes and trigger sync
95
+ 2. Lightweight hooks detect changes and trigger sync (Cursor: usage pulled via API)
75
96
  3. CLI parses logs locally, extracts only token counts
76
97
  4. Data aggregated into 30-minute buckets
77
98
  5. Dashboard reads local data directly — no cloud needed
@@ -102,16 +123,28 @@ git clone https://github.com/mm7894215/tokentracker.git
102
123
  cd tokentracker
103
124
  npm install
104
125
 
105
- # Build dashboard
126
+ # Build and run web dashboard
106
127
  cd dashboard && npm install && npm run build && cd ..
107
-
108
- # Run locally
109
128
  node bin/tracker.js
110
129
 
111
130
  # Run tests
112
131
  npm test
113
132
  ```
114
133
 
134
+ ### Building the macOS App
135
+
136
+ ```bash
137
+ cd TokenTrackerBar
138
+ npm run dashboard:build # Build dashboard (from repo root)
139
+ ./scripts/bundle-node.sh # Download Node.js + bundle tokentracker
140
+ xcodegen generate # Generate Xcode project
141
+ ruby scripts/patch-pbxproj-icon.rb # Patch Icon Composer support
142
+ xcodebuild -scheme TokenTrackerBar -configuration Release clean build
143
+ ./scripts/create-dmg.sh # Create distributable DMG
144
+ ```
145
+
146
+ Requires: Xcode 16+, [XcodeGen](https://github.com/yonaskolb/XcodeGen)
147
+
115
148
  ## License
116
149
 
117
150
  [MIT](LICENSE)