Convert Claude Code session files to HTML transcripts
npm install cc-transcriptTypeScript library that converts Claude Code session files (JSON/JSONL) to paginated HTML transcripts.
``bash`
npm install cc-transcript
`bash`
npx cc-transcript
Example:
`bash`
npx cc-transcript ~/.claude/projects/myproject/session.jsonl ./output
npx cc-transcript session.jsonl ./output --repo myorg/myrepo
`typescript
import { renderTranscriptFromFile } from "cc-transcript";
const output = await renderTranscriptFromFile("session.jsonl", {
githubRepo: "owner/repo", // optional: enables commit links
});
await output.writeTo("./output");
`
Generates:
- index.html - Index page with prompts, tool stats, and assistant previewspage-001.html
- , page-002.html`, ... - Paginated transcript pages
Ported from simonw/claude-code-transcripts.