Illustration for: Tool Extracts Detailed Claude Code Transcripts via Reverse‑Engineered API
Open Source

Tool Extracts Detailed Claude Code Transcripts via Reverse‑Engineered API

2 min read

Why does this matter for anyone who’s tried to pull a readable record out of Claude Code’s web interface? The platform’s native export options are sparse, leaving developers and hobbyists with half‑baked screenshots or raw JSON that’s hard to digest. While the tool is impressive in its own right, the real value lies in its ability to tap a hidden endpoint and turn a session into clean, navigable HTML.

That means you can revisit a conversation, share it with teammates, or archive it without wrestling with the UI. The approach isn’t officially supported, so the author warns that it could stop working at any moment. Still, the command‑line shortcut—run a single uvx command, pick the session, and get a formatted page—makes the process almost frictionless.

For open‑source enthusiasts, it’s a practical workaround that sidesteps the usual limitations. Below is the exact snippet that shows how to fetch and render those transcripts.

claude-code-transcripts can also fetch sessions from Claude Code for web. I reverse-engineered the private API for this (so I hope it continues to work), but right now you can run: uvx claude-code-transcripts web --gist Then select a Claude Code for web session and have that converted to HTML and published as a Gist as well. The claude-code-transcripts README has full details of the other options provided by the tool. Why I built this These days I'm writing significantly more code via Claude Code than by typing text into a text editor myself.

Related Topics: #Claude Code #reverse-engineered API #uvx #HTML #Gist #Simon Willison #private API #command-line

The claude-code-transcripts tool offers a straightforward way to turn Claude Code sessions into readable HTML. By wrapping a reverse‑engineered private API, it can pull a web session and spit out a static page that can be hosted anywhere, even as a GitHub Gist. Installation is optional for users who already have uv; a single uvx command launches the process.

The resulting pages claim to present more detail than Claude Code’s own interface, which could help developers audit model behavior. Yet the reliance on an undocumented endpoint raises questions about long‑term reliability—if the API changes, the tool may break without warning. The author acknowledges this risk, noting “so I hope it continues to work.” No additional dependencies are required beyond Python and uv, keeping the barrier to entry low.

Sharing is built in, but the article stops short of describing how authentication or rate limits are handled. Overall, the utility appears functional for now, though its durability remains uncertain.

Further Reading

Common Questions Answered

How does the claude-code-transcripts tool retrieve Claude Code sessions?

The tool uses a reverse‑engineered private API endpoint to fetch a Claude Code for web session. By calling this hidden endpoint, it can pull the raw conversation data and convert it into a readable format.

What command is required to export a Claude Code session to HTML and a GitHub Gist?

You run the single command `uvx claude-code-transcripts web --gist`. This launches the process, selects the desired session, converts it to static HTML, and publishes the result as a Gist on GitHub.

Why might developers prefer the HTML output from claude-code-transcripts over Claude Code’s native export options?

Claude Code’s native export provides only sparse screenshots or raw JSON, which are hard to read. The tool’s HTML output is clean, navigable, and includes more detail, making it easier to audit model behavior and share with teammates.

Is installing the tool necessary if I already have the uv package installed?

No separate installation is required; you can invoke the tool directly with the `uvx` command. As long as uv is present, `uvx claude-code-transcripts` will download and run the script on demand.