claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

Feature request: Support multiple conversation export formats (.md, .html, .json)

Open mvorpagel-gif opened this issue 11 months ago • 1 comments

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

Feature Request

The /export command currently ignores file extensions and always outputs .txt files.

Current behavior:

  • /export conversation.md → exports to conversation.txt
  • /export conversation.json → exports to conversation.txt

Proposed Solution

Desired behavior: Support exporting to different formats based on file extension:

  • .md - Markdown (content is already markdown-formatted, just preserve it)
  • .json - Structured JSON with messages, timestamps, tool calls
  • .html - Rendered HTML for sharing/viewing in browser

Alternative Solutions

Workaround: Currently requires manually renaming: mv conversation.txt conversation.md

This would be a small quality-of-life improvement since Claude's responses already use markdown formatting.

Priority

Medium - Would be very helpful

Feature Category

CLI commands and flags

Use Case Example

No response

Additional Context

No response

mvorpagel-gif avatar Dec 11 '25 18:12 mvorpagel-gif

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

github-actions[bot] avatar Jan 11 '26 10:01 github-actions[bot]

This request is only applicable to Claude's CLI or TUI (unclear in request) but NOT the Mac OS desktop application and UI.

Recommendation

  • Retain https://github.com/anthropics/claude-code/issues/13714 and an assign to the appropriate team or RE that works on the CLI or TUI.
  • Retain https://github.com/anthropics/claude-code/issues/19233 as it pertains specifically to the Mac OS desktop application.

alexniemi avatar Jan 19 '26 16:01 alexniemi

+1 for JSON export.

Would also love a batch export option for all conversations:

claude --export-all ./exports/ --format json

Use case: reviewing conversation history across sessions to assess prompting patterns and optimize workflows. Currently requires manually /exporting each session.

AndrewColbeck avatar Jan 30 '26 06:01 AndrewColbeck

While native format support in /export would be ideal, I built a tool that already covers the HTML + batch export use cases mentioned here:

Code Chat Viewer — Converts JSONL session files into standalone HTML pages with rendered conversation view (code blocks, collapsible tool results, message navigation), plus an interactive dashboard to browse, filter, and organize all your sessions at once — which addresses @AndrewColbeck's point about reviewing history across sessions.

It works as a Claude Code skill, so Claude Code itself handles the setup and generation. You can just ask Claude to run it, or create a custom /export command to launch it directly.

Python standard library only, no dependencies. Tested on Windows; should work on Mac/Linux.

Image

oskar-gm avatar Feb 02 '26 09:02 oskar-gm

+1 on this. Beyond just fixing the export format, I'd love to see an automatic conversation archiving feature.

My use case: I have long coding sessions with Claude Code where conversations get compacted. The full history lives in .jsonl files, but those are unreadable for humans. I'd like to be able to go back days later and review what I discussed, like decisions made, approaches explored, and problems solved.

Something like an option to automatically save each conversation as a readable Markdown file to a configured directory (e.g., ~/.claude/archives/) would be incredibly useful. Think of it as a personal knowledge base of all your Claude Code sessions.

Right now the data is there but locked in raw JSON. Having proper export formats (especially .md) would be a great first step toward this.

juanjosemayorga avatar Feb 18 '26 20:02 juanjosemayorga

I want this feature too because I use CC for learning and I've had sessions valuable enough to keep around. I made an /md skill for exporting sessions to markdown and a hook for doing it implicitly when I terminate a session but the "mouthfeel" is completely lost. I would very much love to have a way to reconstitute and reference sessions that look and feel like they did when I first saw them.

mwood-nsg avatar Apr 14 '26 17:04 mwood-nsg

Closing for now — inactive for too long. Please open a new issue if this is still relevant.

github-actions[bot] avatar May 23 '26 22:05 github-actions[bot]

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Jul 15 '26 14:07 github-actions[bot]