@yashau/dexuse
v2026.6.2801
Published
Fancy terminal usage explorer for Codex, Hermes, and OpenClaw token history
Maintainers
Readme
dexuse
OpenAI / Codex token usage, finally visible.
dexuse turns local OpenAI/Codex-style usage history into a polished terminal dashboard with timelines, model splits, source breakdowns, cache reads, reasoning tokens, Codex quota badges, reset-credit markers, and JSON export.
Why it exists
OpenAI/Codex tools leave token history scattered around your machine. dexuse pulls the useful parts into one beautiful local view so you can answer:
- Which model burned the most tokens?
- How much was cached instead of fresh input?
- Did it come from Codex, Hermes, or OpenClaw?
- What changed by day, week, month, or year?
- How much Codex quota is left in the 5-hour and 7-day windows?
- When do banked Codex reset credits expire?
- Can I get the same totals as JSON? Yep.
No cloud account. No upload. It reads local files only.
One-liner
npx @yashau/dexuseFrom a checkout:
mise install
mise run bundle
pnpm run dexusemise is the primary repo tool: it installs the pinned Rust/Node toolchains and owns the repeatable local tasks for formatting, tests, builds, screenshots, package checks, and release-binary bundling. Use the direct cargo/pnpm commands below only as lower-level fallbacks.
Handy moves
npx @yashau/dexuse
npx @yashau/dexuse --json
npx @yashau/dexuse --json --from 2026-06-01 --to 2026-06-06 --granularity day
npx @yashau/dexuse --codex-only
npx @yashau/dexuse --hermes-only
npx @yashau/dexuse --openclaw-onlydexuse automatically looks in the usual places:
- Codex:
~/.codex, including archived sessions - Hermes:
~/.hermes,%LOCALAPPDATA%\hermes, and profile databases - OpenClaw:
~/.openclaw, with legacy~/.clawdbotfallback
Need a custom path?
npx @yashau/dexuse --codex-home ~/.codex
npx @yashau/dexuse --hermes-home ~/.hermes
npx @yashau/dexuse --openclaw-home ~/.openclawScreenshots
Drill into time
Compare models
See where the tokens came from
Keyboard moves
1/2/3: Timeline, Models, SourcesTab,Shift+Tab,[/]: switch tabs←/→orh/l: move the selected periodEnter/Space: drill down through timeu/Backspace: go back upy/m/w/d: year, month, week, dayq/Esc: quit
What it counts
dexuse keeps the buckets separate so big cached sessions do not look like fresh input:
- input tokens
- cached input tokens
- cache write tokens
- output tokens
- reasoning tokens
- API calls
- estimated cost when the source provides it
JSON output includes totals, time buckets, model splits, provider splits, source splits, codex_quota, and codex_reset_credits when quota probing is available.
Built for more OpenAI/Codex sources
Codex, Hermes, and OpenClaw are harnesses over local OpenAI/Codex-style usage logs. The ingestion layer is modular, so another compatible local agent can be added without turning main.rs into spaghetti. Maintainer details live in AGENTS.md.
Ship it locally
Use mise for setup and quality gates:
mise install
mise run check
mise run screenshots
mise run packDirect commands work too when you need to debug a single underlying step:
cargo fmt --check
cargo test
cargo clippy --all-targets --all-features -- -D warnings
cargo build --release
python scripts/bundle_current.py
python scripts/smoke_json.py
pnpm run screenshots
pnpm pack --dry-runLicense
MIT.
