1.4 KiB
Codex Lens
A detailed, local-first dashboard for Codex usage. It reads ~/.codex/sessions/**/*.jsonl directly and never uploads session data.
Usage is derived from Codex's cumulative session counters—the same values used by the CLI exit summary—and active logs are rescanned every 30 seconds.
Run
cd /home/louis/dev/codex-lens
npm start
Open http://127.0.0.1:4173. Set PORT or CODEX_HOME to override either default.
What it measures
- Input, cached input, output, reasoning output, and total tokens
- Cache hit rate, model calls, sessions, turns, and active task duration
- Daily usage and estimated API-equivalent cost
- Breakdowns by model, project/workspace, and session
- Date, quick-range, project, model, and source filtering
- Interactive project comparison and drill-down, searchable/sortable project rankings
- Per-call, per-day, output-intensity, and estimated cache-saving statistics
Cost is an estimate, not a bill. It applies current standard API prices per 1M tokens to the model recorded for each usage event. Unknown, local, experimental, and unpriced model slugs are excluded and pricing coverage is shown in the UI. Reasoning tokens are already part of output tokens and are not charged twice.
Pricing source: OpenAI API pricing, captured 2026-07-10. Edit the prices table in server.js as rates change.