Skip to content

DocterJac/claude-desktop-transcripts

Repository files navigation

claude-desktop-transcripts

Convert Claude Desktop conversation exports into browsable, self-contained HTML transcripts.

The Claude Desktop equivalent of warp-transcripts.

What it does

Claude Desktop stores conversations server-side. When you export your data (Settings > Privacy > Export Data), you get a conversations.json file — a dense JSON array that's technically complete but impossible to read.

This tool reads that export and generates clean HTML pages you can browse, search, and share.

Each transcript shows the full conversation flow:

  • User messages with timestamps
  • AI responses with basic markdown rendering
  • 💭 Thinking blocks (collapsible) — the model's internal reasoning when extended thinking was used
  • Tool calls — tool invocations and their results (collapsible)
  • Model badges — shows which model was used

All output is self-contained HTML with inline CSS, no external dependencies. Supports dark/light themes via prefers-color-scheme.

Quick start

# Interactive picker — select a conversation and open in browser
python3 claude_desktop_transcripts.py

# Export a specific conversation
python3 claude_desktop_transcripts.py conv <uuid> -o ./output

# Export all conversations to a browsable archive
python3 claude_desktop_transcripts.py all -o ./archive

# List recent conversations with IDs
python3 claude_desktop_transcripts.py list

Requirements

  • Python 3.7+
  • No third-party packages — standard library only
  • A conversations.json from Claude's data export

Getting your conversations.json

  1. Open Claude Desktop (or claude.ai)
  2. Click your initials in the bottom-left corner
  3. Select Settings
  4. Navigate to Privacy
  5. Click Export Data
  6. Check your email for the download link (arrives within minutes)
  7. Download and extract the ZIP — conversations.json is inside

Commands

Default (no subcommand)

Interactive picker showing your most recent conversations. Select one by number to export and open in your browser.

After the transcript opens, you're prompted to save it permanently with a readable filename derived from the conversation title. You can accept the default (~/Documents/<title>.html), enter a custom path or filename, or skip.

list

Print a table of recent conversations with UUIDs, timestamps, message counts, and model info.

conv <uuid>

Export a single conversation to HTML. When no -o is specified, the same save prompt appears after the transcript opens.

all

Export all conversations to a browsable archive with an index page linking to each conversation.

Options

Option Description
--input PATH Path to conversations.json (auto-detected if omitted)
-o, --output DIR Output directory (default: temp dir for single, ./claude-archive for all)
--no-open Don't open in browser after generating
--json Include raw JSON alongside HTML

all also accepts:

Option Description
--limit N Max conversations to export (default: 500)

Auto-detection

The tool automatically searches for conversations.json in:

Location Pattern
~/Downloads/ conversations.json or inside data-*/ subdirectories
~/Desktop/ Same
~/Documents/ Same
Current directory Same

The most recently modified match is used.

Data format

The tool handles known variants in the Claude export format:

Variant Values
Messages key chat_messages or messages
Author field sender or role (values: human/assistant)
Text source Flat text field, or content blocks array
Content blocks text, thinking (extended thinking), tool_use, tool_result

How it works

The Claude data export is a JSON array of conversation objects. Each conversation contains messages with optional structured content blocks (matching the Anthropic API format). The tool:

  1. Loads the JSON and normalizes format variants
  2. Extracts content blocks including thinking, text, and tool calls
  3. Renders each conversation as a self-contained HTML page with inline CSS
  4. Generates an index page for browsing the full archive

Related projects

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors