tokenleak 1.0.1 → 1.1.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.
Files changed (3) hide show
  1. package/README.md +9 -14
  2. package/package.json +1 -1
  3. package/tokenleak +2321 -487
package/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  See where your AI tokens actually go. Tokenleak reads local usage logs from **Claude Code**, **Codex**, and **Open Code**, then renders heatmaps, dashboards, and shareable cards — all from your terminal.
4
4
 
5
+ ![Tokenleak preview card](./docs/preview.png)
6
+
5
7
  ## Install
6
8
 
7
9
  Tokenleak requires [Bun](https://bun.sh) (v1.0+).
@@ -11,6 +13,7 @@ bun install -g tokenleak
11
13
  ```
12
14
 
13
15
  After installing, run `tokenleak` in your terminal. It will automatically detect which AI coding tools you have installed and display your usage.
16
+ In an interactive TTY, plain `tokenleak` now opens a launcher where you can move with arrow keys or press number shortcuts.
14
17
 
15
18
  ### From source
16
19
 
@@ -28,9 +31,12 @@ bun dist/tokenleak.js
28
31
  ## Usage
29
32
 
30
33
  ```bash
31
- # Show a terminal dashboard of your token usage (default)
34
+ # Open the interactive launcher (TTY only)
32
35
  tokenleak
33
36
 
37
+ # Skip the launcher and render directly with flags
38
+ tokenleak --format terminal
39
+
34
40
  # Output as JSON
35
41
  tokenleak --format json
36
42
 
@@ -134,6 +140,8 @@ tokenleak --format json --upload gist
134
140
 
135
141
  ## All flags
136
142
 
143
+ When you run bare `tokenleak` in a real terminal, the launcher shows these flags in-app before you run anything.
144
+
137
145
  | Flag | Alias | Default | Description |
138
146
  | --------------- | ----- | ---------- | --------------------------------------------------------------- |
139
147
  | `--format` | `-f` | `terminal` | Output format: `json`, `svg`, `png`, `terminal` |
@@ -311,19 +319,6 @@ It then computes:
311
319
  - **Top models** — models ranked by total token consumption
312
320
  - **Daily averages** — mean tokens and cost per day
313
321
 
314
- ### Supported models and pricing
315
-
316
- Tokenleak includes pricing for these model families:
317
-
318
- | Family | Models |
319
- | ---------- | ---------------------------------------------------- |
320
- | Claude 3 | `claude-3-haiku`, `claude-3-sonnet`, `claude-3-opus` |
321
- | Claude 3.5 | `claude-3.5-haiku`, `claude-3.5-sonnet` |
322
- | Claude 4 | `claude-sonnet-4`, `claude-opus-4` |
323
- | GPT-4o | `gpt-4o`, `gpt-4o-mini` |
324
- | o-series | `o1`, `o1-mini`, `o3`, `o3-mini`, `o4-mini` |
325
-
326
- Model names with date suffixes (e.g. `claude-sonnet-4-20250514`) are automatically normalised. Unknown models show `$0.00` cost but tokens are still tracked.
327
322
 
328
323
  ## Project structure
329
324
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tokenleak",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "Visualise your AI coding-assistant token usage across providers — heatmaps, dashboards, and shareable cards.",
5
5
  "type": "module",
6
6
  "bin": {