How simonw/claude-code-transcripts works
claude-code-transcripts is a CLI for turning Claude Code sessions into browsable, paginated HTML transcripts and archives. Users select local sessions, import web sessions, convert JSON/JSONL files, or process all local sessions; the result can be opened locally or shared as a GitHub Gist. The central workflow parses session data, analyzes conversations, renders transcript and index pages, and offers browser-side search. The main implementation is concentrated in one Python module. Relationships for documented workflows are based on the README; the excerpts do not expose the full CLI wiring or rendering implementation.
Main entry points: __init__.py Command interface · search.js Transcript search · page.html Transcript templates · master_index.html Archive indexes
Components 17
Session inputs
- Command interface
src/claude_code_transcripts/__init__.py - Local sessions
src/claude_code_transcripts/__init__.py - JSON/JSONL input
src/claude_code_transcripts/__init__.py - Web sessions
src/claude_code_transcripts/__init__.py
Transcript processing
- Session parser
src/claude_code_transcripts/__init__.py - Conversation analysis
src/claude_code_transcripts/__init__.py - Repository detection
src/claude_code_transcripts/__init__.py
HTML experience
- Transcript renderer
src/claude_code_transcripts/__init__.py - Transcript templates
src/claude_code_transcripts/templates/page.html - Archive indexes
src/claude_code_transcripts/templates/master_index.html - Transcript search
src/claude_code_transcripts/templates/search.js
Output and sharing
- HTML output
src/claude_code_transcripts/__init__.py
Other components
- CLI user
- Claude API
- Web browser
- GitHub Gist
- GitHub API
Connections 18
- CLI user → Command interface: runs command
README.md - Command interface → Local sessions: selects sessions
README.md - Command interface → JSON/JSONL input: converts file
README.md - Command interface → Web sessions: imports session
README.md - Web sessions → Claude API: fetches sessions
README.md - Command interface → Session parser: converts input
README.md - Session parser → Conversation analysis: analyzes messages
src/claude_code_transcripts/__init__.py - Session parser → Repository detection: detects repository
src/claude_code_transcripts/__init__.py - Command interface → Conversation analysis: builds archive
README.md - Command interface → Transcript renderer: generates HTML
README.md - Transcript renderer → Transcript templates: renders pages
README.md - Transcript renderer → Archive indexes: builds archive indexes
README.md - Transcript renderer → HTML output: writes pages
README.md - HTML output → Web browser: opens output
README.md - Transcript search → HTML output: fetches transcript pages
src/claude_code_transcripts/templates/search.js - Command interface → GitHub Gist: uploads output
README.md - Transcript search → GitHub API: looks up gist
src/claude_code_transcripts/templates/search.js - GitHub Gist → GitHub API: serves gist data