Skip to content

Latest commit

 

History

History
64 lines (43 loc) · 1.14 KB

README.md

File metadata and controls

64 lines (43 loc) · 1.14 KB

clox - Claude Code Session Log Viewer

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.

clox in action

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>.jsonl

Clox can also tally up the cost and duration of multiple sessions. For a fun exercise, run

> clox stats -t ~/.claude/projects/*/*.jsonl

Installation

You must have a Rust toolchain installed with version 1.85 or higher.

Clone this repository and run

cargo install --locked --path .

Usage

View a session log:

clox session.jsonl

Read from stdin:

cat session.jsonl | clox

Follow a live session:

clox --follow ~/.claude/projects/.../session.jsonl

Show cost and duration stats:

clox stats session.jsonl
clox stats *.jsonl          # Multiple files
clox stats -t *.jsonl       # Total only