A tool to view Claude Code session logs in the terminal. The tool is useful both to look at previous Claude sessions as well as to follow non-interactive sessions that are running in a loop.
To follow a live session, run
> claude -p --output-format stream-json --verbose <<< "$prompt" | clox -To view previous sessions, run
> clox ~/.claude/projects/<project-name>/<session-id>.jsonlClox can also tally up the cost and duration of multiple sessions. For a fun exercise, run
> clox stats -t ~/.claude/projects/*/*.jsonlYou must have a Rust toolchain installed with version 1.85 or higher.
Clone this repository and run
cargo install --locked --path .View a session log:
clox session.jsonlRead from stdin:
cat session.jsonl | cloxFollow a live session:
clox --follow ~/.claude/projects/.../session.jsonlShow cost and duration stats:
clox stats session.jsonl
clox stats *.jsonl # Multiple files
clox stats -t *.jsonl # Total only