claude-usage-dashboard 1.3.12 → 1.3.14
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 +32 -22
- package/bin/cli.cjs +8 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,33 +1,49 @@
|
|
|
1
1
|
# Claude Usage Dashboard
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/claude-usage-dashboard)
|
|
4
|
+
[](https://www.npmjs.com/package/claude-usage-dashboard)
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
> Find out what your Claude Code subscription is actually worth in API costs.
|
|
7
|
+
|
|
8
|
+
Your $200/month Max plan might be consuming **$15,000+/month** in API-equivalent value. This dashboard shows you exactly how much — per project, per session, per model. One command to start. Completely local. No data leaves your machine.
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npx claude-usage-dashboard
|
|
12
|
+
```
|
|
6
13
|
|
|
7
14
|

|
|
8
15
|
|
|
9
|
-
##
|
|
16
|
+
## What You'll See
|
|
17
|
+
|
|
18
|
+
### Know What You're Spending
|
|
19
|
+
|
|
20
|
+
Real-time projected API cost at your current usage rate — weekly and monthly. At 5% quota utilization, you might be burning through **$3,600/week** equivalent. The dashboard calculates this from your actual quota window, not estimates.
|
|
21
|
+
|
|
22
|
+
### Track Your Quota in Real Time
|
|
10
23
|
|
|
11
|
-
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
24
|
+
Live utilization gauges for 5-hour, 7-day, and per-model quotas pulled directly from the Anthropic API. Auto-detects your plan tier (Pro / Max 5x / Max 20x). Never get throttled by surprise again.
|
|
25
|
+
|
|
26
|
+
### Find What's Eating Your Tokens
|
|
27
|
+
|
|
28
|
+
Per-project and per-session cost breakdowns show exactly where your usage goes. Sortable session table with cost, duration, and full token breakdown. Spot the expensive sessions instantly.
|
|
29
|
+
|
|
30
|
+
### Understand Your Cache Efficiency
|
|
31
|
+
|
|
32
|
+
You'll probably discover that ~95% of your tokens are cache reads at 1/10th the cost. The dashboard visualizes cache read vs. cache write vs. uncached requests so you can see how efficiently Claude is using context.
|
|
33
|
+
|
|
34
|
+
### Everything Else
|
|
35
|
+
|
|
36
|
+
Hourly/daily/weekly/monthly token trends · Dollar and token toggle · Model distribution across Opus/Sonnet/Haiku · Active hours heatmap · Auto-refresh (30s) · Persistent filters via localStorage · Dark theme
|
|
21
37
|
|
|
22
38
|
## Quick Start
|
|
23
39
|
|
|
24
|
-
Run directly
|
|
40
|
+
Run directly — no install, no config, no API keys needed:
|
|
25
41
|
|
|
26
42
|
```bash
|
|
27
43
|
npx claude-usage-dashboard
|
|
28
44
|
```
|
|
29
45
|
|
|
30
|
-
Open http://localhost:3000
|
|
46
|
+
Open [localhost:3000](http://localhost:3000). That's it.
|
|
31
47
|
|
|
32
48
|
### From Source
|
|
33
49
|
|
|
@@ -46,15 +62,9 @@ PORT=8080 npx claude-usage-dashboard
|
|
|
46
62
|
|
|
47
63
|
## How It Works
|
|
48
64
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
Subscription quota data is fetched from the Anthropic API using your local OAuth credentials (`~/.claude/.credentials.json`). Your plan tier (Pro / Max 5x / Max 20x) is auto-detected from the same file.
|
|
52
|
-
|
|
53
|
-
## Tech Stack
|
|
65
|
+
Reads the JSONL session logs that Claude Code already writes to `~/.claude/projects/` on your machine. If you use Claude Code, the data is already there. Logs are re-read every 5 seconds — new usage appears without restarting.
|
|
54
66
|
|
|
55
|
-
|
|
56
|
-
- **Frontend:** Vanilla JS (ES modules), D3.js v7
|
|
57
|
-
- **Tests:** Mocha + Chai
|
|
67
|
+
Subscription quota data is fetched from the Anthropic API using your existing local OAuth credentials. Your plan tier is auto-detected.
|
|
58
68
|
|
|
59
69
|
## Running Tests
|
|
60
70
|
|
package/bin/cli.cjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
'use strict';
|
|
3
|
-
const { join } = require('path');
|
|
4
|
-
const {
|
|
5
|
-
|
|
6
|
-
const serverPath = join(__dirname, '..', 'server', 'index.js');
|
|
7
|
-
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
const { join } = require('path');
|
|
4
|
+
const { spawnSync } = require('child_process');
|
|
5
|
+
|
|
6
|
+
const serverPath = join(__dirname, '..', 'server', 'index.js');
|
|
7
|
+
const result = spawnSync(process.execPath, [serverPath], { stdio: 'inherit' });
|
|
8
|
+
process.exit(result.status || 0);
|