Skip to main content

Claude Code transcripts - Setup

Convert Claude Code sessions into clean HTML transcripts on your VPS.

Daniel avatar
Written by Daniel
Updated over a month ago

Claude Code transcripts is a CLI utility included on your Claude Code VPS. It helps turn raw Claude Code session files into readable HTML pages you can browse, share, or archive.

You can use it to review past coding sessions, publish transcripts to GitHub Gist, or keep a local archive for reference.


What Claude Code transcripts does

Claude Code transcripts converts Claude Code session data stored as JSON or JSONL into paginated HTML files.

The generated output is mobile-friendly and easy to navigate, with timelines and clear separation between prompts and responses.

Typical use cases include reviewing long sessions, sharing debugging context, and keeping records of important work.


One-time OAuth setup

On first launch, you’ll be guided through a one-time OAuth flow to connect your Anthropic account.

Follow the on-screen instructions to authorize Claude Code and choose your preferred terminal style. This step is required only once.

Viewing a recent local session

The fastest way to view a recent session is to run the tool without arguments.

claude-code-transcripts


This opens an interactive picker showing recent local sessions. After selection, HTML is generated and opened in your default browser.

Local sessions are stored in ~/.claude/projects.

Available commands

The tool supports four main commands:

  • local selects from local Claude Code sessions

  • web imports sessions from the Claude API

  • json converts a specific JSON or JSONL file

  • all converts all local sessions into an archive

If no command is specified, local is used by default.

Limiting local session results

You can control how many local sessions are shown in the picker.

claude-code-transcripts local --limit 20


This is useful if you have many saved sessions and want a wider selection.

Importing web sessions

Sessions can be imported directly from the Claude API.

claude-code-transcripts web


You can also import a specific session by ID.

claude-code-transcripts web SESSION_ID


On macOS, credentials are retrieved automatically from the keychain. On other platforms, you must provide an API token and organization UUID.

Output options

All commands support the same output flags.

Common options include:

  • -o to choose an output directory

  • -a to auto-name the output folder

  • --open to open the result in a browser

  • --json to include the source session file

If no output directory is set, files are written to a temporary location and opened automatically.

Publishing transcripts to GitHub Gist

You can publish transcripts using the --gist flag.

claude-code-transcripts --gist


This uploads the HTML files to a GitHub Gist and outputs a preview URL.

The GitHub CLI must be installed and authenticated using gh auth login.

Converting all sessions

To build a complete archive of all local sessions, use the all command.

claude-code-transcripts all


This creates a structured archive with a master index, project pages, and individual session transcripts.

Options like --dry-run, --open, and --include-agents help control what gets generated.

Where files are stored

Local Claude Code sessions are saved as JSONL files in ~/.claude/projects.

Converted archives default to ./claude-archive unless another output directory is specified.


For more information, check the official Claude documentation.

Did this answer your question?