claude-code-transcripts  by simonw

AI chat transcript publishing and archiving CLI

Created 2 weeks ago

New!

716 stars

Top 48.0% on SourcePulse

GitHubView on GitHub
Project Summary

This tool addresses the need to convert Claude Code session files (JSON or JSONL) into clean, mobile-friendly, paginated HTML transcripts. It targets users of Claude Code seeking to easily share, archive, or review their AI-assisted coding sessions, providing a browsable and accessible format for these interactions. The primary benefit is transforming raw session data into easily digestible web pages.

How It Works

The project converts Claude Code session files into browseable multi-page HTML documents. It processes JSON or JSONL data, generating an index.html file that serves as a timeline of prompts and commits, alongside paginated transcript pages (page-001.html, etc.). The tool offers flexibility by supporting local sessions stored in ~/.claude/projects, direct conversion of specified JSON/JSONL files via the json command, and fetching sessions directly from the Claude API using the web command. A comprehensive all command aggregates all local sessions into a single, browsable HTML archive structure.

Quick Start & Requirements

Installation is straightforward using uv tool install claude-code-transcripts or by running directly without installation via uvx claude-code-transcripts. Key prerequisites include the uv package manager. For the --gist publishing feature, the GitHub CLI (gh) must be installed and authenticated. Web sessions require Claude API credentials; these are automatically retrieved from the keychain on macOS but need manual --token and --org-uuid arguments on other platforms.

Highlighted Details

  • GitHub Gist Publishing: Automatically uploads generated HTML transcripts to a GitHub Gist, providing shareable preview URLs via gistpreview.github.io. This simplifies sharing complex session logs.
  • Comprehensive Archiving: The all command creates a master HTML archive of all local sessions, featuring a top-level index and per-project session listings for extensive project history review.
  • Interactive Session Selection: The default command (claude-code-transcripts) offers an interactive picker for selecting recent local Claude Code sessions, streamlining access to current work.
  • Auto-Generated Directories: Supports auto-naming output subdirectories based on session IDs or filenames using the -a flag, aiding organization. The --json flag can also include the original source file in the output.

Maintenance & Community

Development details suggest running tests via uv run pytest and contributing by checking out the code. No specific information regarding maintainers, sponsorships, community channels (like Discord or Slack), or project roadmaps is provided in the README.

Licensing & Compatibility

The provided README text does not specify the software license or any compatibility notes for commercial use or closed-source linking.

Limitations & Caveats

The --gist feature necessitates the GitHub CLI. Manual API credential input is required for web sessions on non-macOS systems. Agent session files are excluded by default from the all conversion command, requiring an explicit flag to include them.

Health Check
Last Commit

1 week ago

Responsiveness

Inactive

Pull Requests (30d)
29
Issues (30d)
22
Star History
736 stars in the last 18 days

Explore Similar Projects

Starred by Boris Cherny Boris Cherny(Creator of Claude Code; MTS at Anthropic), Nat Friedman Nat Friedman(Former CEO of GitHub), and
40 more.

aider by Aider-AI

0.6%
40k
AI pair programming in your terminal
Created 2 years ago
Updated 1 week ago
Feedback? Help us improve.