tokidex 0.1.0

macOS terminal UI for inspecting local Codex token usage
docs.rs failed to build tokidex-0.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.

tokidex

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.

Data Sources

tokidex resolves the Codex home directory in this order:

  1. --codex-home <path>
  2. $CODEX_HOME
  3. ~/.codex

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.

Usage

Install from crates.io:

cargo install tokidex
tokidex --range today

One-line install from this checkout:

./install.sh

After installing:

tokidex --range today

Run without installing:

cargo run -- --range today
cargo run -- --range week
cargo run -- --range all
cargo run -- --codex-home ~/.codex --range all

Install locally:

cargo install --path .
tokidex --range today

Keys

  • q: quit
  • Up/Down or k/j: move selection
  • /: search
  • Esc: clear search
  • d: today
  • w: week
  • a: all
  • r: refresh

Verification

cargo test
cargo fmt --check
cargo clippy -- -D warnings