Local stats dashboard for Codex. Read usage directly from machine logs and use codex stats like it was built into Codex.
Works on:
- Windows x64 and arm64
- macOS Intel and Apple Silicon
- Linux x64 and arm64
Requirements:
- Node.js 18+
- Codex already installed on the machine
Install once:
npm install -g codex-observatoryThen use it like this:
codex stats
codex stats compact
codex stats full
codex stats --jsonGlobal npm install auto-runs the Codex integration step and patches the local codex launcher so codex stats works immediately.
If your npm install was run with scripts disabled, or Codex was not installed yet, repair the setup with:
codex-observatory install-codex --patch-codex| Command | Description |
|---|---|
codex stats |
Recommended dashboard command |
codex stats compact |
Short dashboard |
codex stats full |
Detailed dashboard |
codex stats --json |
JSON output |
codex-observatory install-codex --patch-codex |
Reinstall or repair the Codex launcher patch |
codex-observatory uninstall-codex |
Remove the Codex integration and restore launcher backups |
These direct commands are still available and map to the same dashboard:
codex-observatorycodex-stats
Examples:
codex-observatory compact
codex-stats --jsoncodex-observatory uninstall-codex
npm uninstall -g codex-observatoryThe first command removes the Codex integration and restores the patched codex launcher. The second command removes the global npm package.
npm install -g codex-observatoryis the main supported user flow.npm uninstall -g codex-observatoryremoves the npm package itself, but npm does not run uninstall lifecycle hooks for packages. Runcodex-observatory uninstall-codexfirst for a clean rollback.npminstalls download the matching native binary automatically.- If
history.jsonlis missing, Codex Observatory rebuilds prompt history from session logs. - If
sessions/is missing buthistory.jsonlexists, Codex Observatory still renders prompt and session counts and falls back to zero token totals plusunknownmodel metadata.