GitHub - peterxcli/ccost: Rust TUI for browsing local Codex and Claude Code session logs, searching past chats, and estimating API-equivalent cost. · GitHub
/" data-turbo-transient="true" />
Skip to content
Search or jump to...
Search code, repositories, users, issues, pull requests...
-->
Search
Clear
Search syntax tips
Provide feedback
--><br>We read every piece of feedback, and take your input very seriously.
Include my email address so I can be contacted
Cancel
Submit feedback
Saved searches
Use saved searches to filter your results more quickly
-->
Name
Query
To see all available qualifiers, see our documentation.
Cancel
Create saved search
Sign in
/;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up
Appearance settings
Resetting focus
You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
{{ message }}
peterxcli
ccost
Public
Notifications<br>You must be signed in to change notification settings
Fork
Star
main
BranchesTags
Go to file
CodeOpen more actions menu
Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit
History<br>20 Commits<br>20 Commits
.github/workflows
.github/workflows
src
src
.gitignore
.gitignore
Cargo.lock
Cargo.lock
Cargo.toml
Cargo.toml
README.md
README.md
View all files
Repository files navigation
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.
Sort by total cost, time, tokens, web searches, model, session id, or first prompt. Default is total cost descending.
index.lock allows one cache writer. A second TUI prompts for read-only, quit, or force-write with an explicit corruption warning.
Cache files are disposable. Session JSONL files are the source of truth; if cache format/corruption is detected, delete the cache folder shown in the TUI.
Controls
/: search mode
Enter: browse mode, or toggle detail while browsing
Up / Down or j / k: move selection
Tab: switch list/detail focus
s: next sort key
S: reverse sort direction
r: reload
Esc: clear search/back
q: quit
Options
ccost [--sessions PATH] [--pricing PATH] [--no-web-cost] [--read-only-index] [--force-index]
--read-only-index: open without writing the persisted search cache.
--force-index: write without the lock. Use only after confirming no other TUI is running.
Pricing
Built-in pricing includes GPT-5.5, GPT-5.4, Claude Opus/Sonnet/Haiku model families, and web-search defaults. Override with --pricing pricing.json:
"web_search_per_1k": 10.0,<br>"models": {<br>"gpt-5.5": {<br>"input_per_m": 5.0,<br>"cache_creation_input_per_m": 0.0,<br>"cached_input_per_m": 0.5,<br>"output_per_m": 30.0,<br>"long_context_threshold": 272000,<br>"long_context_input_multiplier": 2.0,<br>"long_context_output_multiplier": 1.5<br>},<br>"gpt-5.4": {<br>"input_per_m": 2.5,<br>"cache_creation_input_per_m": 0.0,<br>"cached_input_per_m": 0.25,<br>"output_per_m": 15.0,<br>"long_context_threshold": 272000,<br>"long_context_input_multiplier": 2.0,<br>"long_context_output_multiplier": 1.5<br>},<br>"claude-sonnet-4-5": {<br>"input_per_m": 3.0,<br>"cache_creation_input_per_m": 3.75,<br>"cached_input_per_m": 0.30,<br>"output_per_m": 15.0
For older pricing overrides, long_context_multiplier is still accepted and applies to all token classes when the input/output-specific fields are omitted. cache_creation_input_per_m is optional and defaults to 0.0.
About
Rust TUI for browsing local Codex and Claude Code session logs, searching past chats, and estimating API-equivalent cost.
Resources
Readme
Uh oh!
There was an error while loading. Please reload this page.
Activity
Stars
stars
Watchers
watching
Forks
forks
Report repository
Releases
v0.2.10
Latest
May 23, 2026
+ 8 releases
Packages
Uh oh!
There was an error while loading. Please reload this page.
Contributors
Uh oh!
There was an error while loading. Please reload this page.
Languages
Rust<br>100.0%
You can’t perform that action at this time.