daaain/claude-code-log

A Python CLI tool that converts Claude Code transcript JSONL files into readable HTML / Markdown format.

Claude Code Log – What It Is

Claude Code Log is a Python command‑line tool that turns the JSONL transcript files produced by Anthropic’s Claude Code IDE into clean, searchable HTML pages or Markdown documents. It lets you browse, filter, and export every conversation you have had with Claude Code – from a single session file to an entire ~/.claude/projects/ hierarchy.


Why Someone Would Use It

  • Review past work – see all prompts, assistant replies, tool calls and token usage in a readable timeline.
  • Cost awareness – token‑usage counters show how much each session (or the whole project) has cost.
  • Sharing & archiving – generated HTML pages can be opened in a browser or shared with teammates.
  • Search & analysis – filter by date, message type, or keywords; export a compact Markdown version that can be fed back to an LLM for pattern‑recognition.
  • Live monitoring – a watch mode re‑generates the output as a Claude session is being written, keeping an Obsidian note or browser view up‑to‑date.

Core Features (as described in the README)

Feature What It Does
Interactive TUI Terminal UI for browsing sessions, seeing summaries, and triggering HTML/Markdown export with keyboard shortcuts.
Watch / Serve Modes claude-code-log watch updates files on‑the‑fly; serve --watch runs a local server that refreshes as new messages arrive.
Project‑wide processing Scans ~/.claude/projects/, creates a top‑level index page and per‑project combined transcripts.
Single‑file or directory conversion Convert any JSONL file or a folder of them, with --output to choose the destination.
Token usage tracking Shows token count per message and totals per session/project.
Runtime filtering JavaScript controls in the HTML let you hide/show user, assistant, system, tool‑use, etc., without re‑building.
Chronological ordering & timeline All messages are sorted by timestamp; an interactive zoomable timeline visualises conversation flow.
Themes classic (default) and minimal – the latter is a dense light/dark layout with foldable branches for sub‑agents.
Date‑range filtering Natural‑language dates (today, last week, 3 days ago) limit which messages are included.
Rich message types Supports user, assistant, summaries, system commands, tool invocations/results, thinking steps, and embedded images.
Markdown export Server‑side rendering with syntax highlighting; --detail and --compact flags let you produce a concise version for downstream LLM analysis.
Git commit linking Detects SHA strings in transcripts and turns them into clickable links to GitHub/GitLab/Bitbucket or a custom URL template.
Provider hooks Experimental support for Antigravity CLI (agy) and Codex CLI (codex) via --provider and --session-id.

Who Is It For?

  • Developers who use Claude Code and want a permanent, searchable archive of their interactions.
  • Teams that need to share conversation logs for audits, onboarding, or reproducibility.
  • Researchers / Prompt engineers looking to analyse token consumption or tool‑use patterns across many sessions.
  • Anyone who prefers a static HTML view or a compact Markdown dump to feed back into another LLM.

How to Get Started (quick‑start from the README)

# Run the latest version without installing permanently
uvx claude-code-log@latest --open-browser

The command scans your Claude Code project folder, builds the HTML archive, and opens it in your default browser. For a terminal‑based experience, add --tui.


Installation Options

  • uv tool (recommended): uv tool install claude-code-log
  • uvx (run‑once): uvx claude-code-log@latest
  • pip: pip install claude-code-log
  • From source: clone the repo, run uv sync, then uv run claude-code-log or install editable with uv tool install --editable .

Limitations & Open Items (from the TODO section)

  • No built‑in tutorial overlay yet.
  • Image optimisation (e.g., converting PNG screenshots to WebP) is planned but not implemented.
  • Deeper integration with other Claude‑related logs (claude‑trace, GitHub Action outputs) is still a work‑in‑progress.
  • Some UI polish (gradient animation, work‑tree merging) remains on the roadmap.

Bottom Line

claude-code-log is a practical, open‑source utility for turning Claude Code’s raw JSONL transcripts into human‑friendly, searchable archives. It focuses on usability (TUI, watch mode, themes) and on giving developers the data they need to audit costs, share work, or feed past sessions back into LLM pipelines.

Related

  • Project
  • Project
  • Project
  • Project
  • Project