Ccost – a Rust TUI to browse Claude Code logs and track API costs
Ccost is a Rust-based TUI designed for browsing Codex and Claude Code session logs while estimating API costs. It features fast full-text search capabilities and allows users to sort sessions based on various criteria. The tool also provides options for managing session files and pricing configurations.
- ▪Ccost allows users to browse local Codex and Claude Code session logs and estimate API costs.
- ▪It includes features like full-text search, session caching, and sorting by different metrics.
- ▪Users can customize pricing settings and manage session files through various command-line options.
Opening excerpt (first ~120 words) tap to expand
ccost Rust TUI for browsing local Codex and Claude Code session logs, searching past chats, and estimating API-equivalent cost. codex-cost-demo.mov Install brew install --cask peterxcli/tap/ccost Run ccost --sessions ~/.codex/sessions For Claude Code transcripts: ccost --sessions ~/.claude/projects Default session directory: $CODEX_HOME/sessions, or ~/.codex/sessions when CODEX_HOME is unset. Features Fast persisted full-text search with an FST term index, prefix matching, match highlighting, and visible search cursor. Persisted Merkle tree and file watcher; startup reuses cached sessions and live changes only re-index changed session files. Search mode is explicit: / starts typing, Enter returns to browse, so query text can include browse shortcut keys.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at GitHub.