1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
`tokidex` is a macOS-only terminal UI for inspecting local Codex token usage.
It reads local Codex state only. It does not call the network, read Codex auth
tokens, or estimate billing cost.
`tokidex` resolves the Codex home directory in this order:
1. 2.3.
It reads `state_5.sqlite` for session summaries and totals, then parses each
session `rollout_path` JSONL file for the latest `token_count` event. When JSONL
details are missing or malformed, the UI falls back to the SQLite total.
Install from crates.io:
```sh
cargo install tokidex
tokidex --range today
```
One-line install from this checkout:
```sh
./install.sh
```
After installing:
```sh
tokidex --range today
```
Run without installing:
```sh
cargo run -- --range today
cargo run -- --range week
cargo run -- --range all
cargo run -- --codex-home ~/.codex --range all
```
Install locally:
```sh
cargo install --path .
tokidex --range today
```
- -------
```sh
cargo test
cargo fmt --check
cargo clippy -- -D warnings
```