Export, migrate, and archive your Claude Code conversations with full control
A powerful CLI tool to export Claude Code session transcripts with complete conversation history, tool calls, subagent outputs, and full metadata. Perfect for migrating conversations to other AI platforms, archiving work, documentation, and analysis.
- π― Interactive Session Selection - Browse all projects and sessions with file size and dates
- π Detailed Statistics - View message counts, tool calls, and session metadata
- βοΈ Granular Control - Checkbox selection for exactly what to export
- π Multiple Formats - Export to Markdown, JSON, JSONL, or XML
- π§ Complete Tool Data - Captures tool inputs, outputs, and execution metadata
- π€ Subagent Support - Includes all subagent conversations and outputs
- β‘ Fast & Lightweight - No dependencies on external services
- π¨ Beautiful Output - Clean, readable formatting with timestamps and emojis
npm install -g claude-transcript-exporterOr use directly with npx:
npx claude-transcript-exporterExport your Claude Code sessions to continue work in:
- OpenAI Codex CLI - Terminal-based agentic coding tool (400K context with GPT-5.3-Codex)
- OpenAI Codex Desktop App - macOS/Windows app for managing multiple agents in parallel
- ChatGPT with GPT-5.4 - Latest flagship model with 1.05M token context window
- GPT-5.3-Codex - Specialized coding variant with 400K context
- Gemini Code Assist - Powered by Gemini 2.5 Pro with 1M token context (2M coming)
- Gemini 3 Pro - Latest Gemini model with extended context
- Gemini 3.1 Pro - Enhanced version with improved reasoning
- Gemini CLI - Terminal-based coding agent
- GitHub Copilot - Supports Claude, GPT, and Gemini models (128K-400K+ context)
- Cursor AI - AI-native editor with multi-model support ($500M ARR, $10B valuation)
- Windsurf - #1 ranked AI IDE with Cascade autonomous agent (1M context with Sonnet 4.5)
- Replit AI Agent 3 - Cloud IDE with 200-minute autonomous sessions
- Devin - Autonomous AI software engineer by Cognition AI
- Bolt.new - Browser-based AI app builder by StackBlitz
- v0 - Vercel's AI UI generation tool
- Amazon Q Developer - AWS's AI coding assistant
- Create permanent records of development sessions
- Archive important conversations before cleanup
- Generate project documentation from AI interactions
- Backup critical debugging sessions
- Preserve architectural decisions and discussions
- Compliance: Meet SEC 2025 AI audit trail requirements (62% of audits fail due to inconsistent records)
- Analyze your AI interaction patterns
- Study tool usage and effectiveness
- Review problem-solving approaches
- Extract code snippets and solutions
- Create training materials from real sessions
- Track context usage and optimization strategies
- Share AI-assisted solutions with teammates
- Document complex implementations
- Create reproducible development workflows
- Export for code review processes
- Generate reports for stakeholders
- Onboarding: 25-30% productivity boost when sharing AI context with new team members
# Install globally
npm install -g claude-transcript-exporter
# Run the exporter
claude-transcript-exporter
# Follow the interactive prompts to:
# 1. Select your project
# 2. Choose a session
# 3. Pick what to include
# 4. Select export formatclaude-transcript-exporterThe tool will guide you through:
- Project Selection - Choose from all your Claude Code projects
- Session Selection - Pick a session with size and date info
- Content Filtering - Select what to include:
- β User messages
- β Assistant responses
- β Tool calls (inputs)
- β Tool results (outputs)
- β System messages
- β Progress events
- β File snapshots
- Format Selection - Choose output format:
- Markdown (human-readable)
- JSON (structured data)
- JSONL (line-delimited)
- XML (hierarchical)
Perfect for documentation and reading:
## π€ User (3/6/2026, 2:30:00 PM)
How do I implement authentication?
## π€ Assistant (3/6/2026, 2:30:15 PM)
I'll help you implement authentication...
**π§ Tool: `Read`** (ID: `toolu_abc123`)
```json
{
"file_path": "/src/auth.ts"
}π₯ Tool Result toolu_abc123
[file contents...]
#### JSON
Structured data for programmatic access:
```json
[
{
"type": "user",
"timestamp": "2026-03-06T14:30:00.000Z",
"uuid": "abc-123",
"message": {
"role": "user",
"content": "How do I implement authentication?"
}
}
]
One entry per line for streaming/processing:
{"type":"user","timestamp":"2026-03-06T14:30:00.000Z","message":{"content":"..."}}
{"type":"assistant","timestamp":"2026-03-06T14:30:15.000Z","message":{"content":[...]}}Hierarchical structure with metadata:
<?xml version="1.0" encoding="UTF-8"?>
<session>
<entry type="user" timestamp="2026-03-06T14:30:00.000Z" uuid="abc-123">
<text>How do I implement authentication?</text>
</entry>
<entry type="assistant" timestamp="2026-03-06T14:30:15.000Z">
<tool_use name="Read" id="toolu_abc123">{"file_path":"/src/auth.ts"}</tool_use>
</entry>
</session>OpenAI Codex is OpenAI's agentic coding tool with both CLI and desktop app versions. It uses GPT-5.3-Codex with a 400K token context window.
Codex CLI:
# Export your Claude Code session
claude-transcript-exporter
# Select Markdown format
# Load context in Codex CLI:
codex chat --context export-*.md
# Or start a new task with context:
codex task "Continue this implementation" --context export-*.mdCodex Desktop App:
# Export as Markdown
claude-transcript-exporter
# In Codex Desktop:
# 1. Open the app (macOS/Windows)
# 2. Create a new agent or task
# 3. Click "Add Context" or drag-drop your export-*.md file
# 4. Say: "Continue from this Claude Code session"The desktop app supports managing multiple agents in parallel with "skills" that extend beyond code generation.
GPT-5.4 has a 1.05M token context window, making it ideal for large conversation imports.
# Export as Markdown
claude-transcript-exporter
# Upload to ChatGPT:
# 1. Open ChatGPT
# 2. Click the paperclip icon
# 3. Upload your export-*.md file
# 4. Say: "Continue from this development session"Google offers multiple Gemini products with large context windows.
Gemini Code Assist (Gemini 2.5 Pro - 1M context):
# Export as JSON for structured import
claude-transcript-exporter
# Use Gemini API:
curl -X POST https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-pro:generateContent \
-H "Content-Type: application/json" \
-H "x-goog-api-key: YOUR_API_KEY" \
-d @export-*.jsonGemini 3 Pro / Gemini 3.1 Pro:
# Export as Markdown
claude-transcript-exporter
# In Gemini web interface:
# 1. Open gemini.google.com
# 2. Upload your export-*.md file
# 3. Say: "Continue from this development session"
# Or via API:
curl -X POST https://generativelanguage.googleapis.com/v1beta/models/gemini-3-pro:generateContent \
-H "Content-Type: application/json" \
-H "x-goog-api-key: YOUR_API_KEY" \
-d '{"contents":[{"parts":[{"text":"Continue from: [paste export content]"}]}]}'Gemini CLI:
# Export full session
claude-transcript-exporter
# Load in Gemini CLI:
gemini chat --context export-*.mdGitHub Copilot supports multiple models including Claude Opus 4.6, Claude Sonnet 4.6, GPT-5.3-Codex, and Gemini 3 Pro.
# Export with tool calls included
claude-transcript-exporter
# Add to Copilot context:
# 1. Create .github/copilot-instructions.md in your repo
# 2. Paste relevant sections from your export
# Or use Copilot Spaces to load the full export as contextCursor is an AI-native code editor (VS Code fork) with $500M ARR and $10B valuation.
# Export as Markdown
claude-transcript-exporter
# In Cursor:
# 1. Open Command Palette (Cmd+Shift+P)
# 2. "Add Context File"
# 3. Select your exported .md file
# Or add to .cursorrules for persistent contextWindsurf (formerly Codeium) is ranked #1 in AI dev tool power rankings with its Cascade autonomous agent.
# Export full session
claude-transcript-exporter
# In Windsurf:
# 1. Open the Cascade panel
# 2. Click "Add Context"
# 3. Upload your export-*.md file
# Or use MCP to integrate programmaticallyReplit's Agent 3 can run autonomously for up to 200 minutes.
# Export as Markdown
claude-transcript-exporter
# In Replit:
# 1. Open your project
# 2. Start Agent 3
# 3. Paste: "Continue from this session:" + your export content- Original user input
- Command invocations (e.g.,
/export,/commit) - File references
- Images and attachments
- Timestamps and UUIDs
- Text responses
- Code blocks
- Explanations
- Thinking process (extended thinking blocks)
- Model information (Opus 4.6, Sonnet 4.6, etc.)
- Tool name and ID
- Input parameters (full JSON)
- Execution metadata
- Response codes and duration
- All Claude Code tools: Read, Write, Edit, Bash, Glob, Grep, Agent, etc.
- Output data
- Error messages
- File contents
- Command outputs
- Subagent responses
- Session metadata (cwd, git branch, version)
- Progress updates
- File snapshots
- Hook execution logs
- Permission mode changes
- Complete subagent conversations
- Nested tool calls
- Agent spawning and termination
- Cross-agent communication
Claude Code stores sessions in:
~/.claude/projects/
βββ -Users-yourname-project-name/
βββ session-id-1.jsonl
βββ session-id-2.jsonl
βββ agent-subagent-id.jsonl (subagent sessions)
βββ ...
Each .jsonl file contains the complete conversation history in JSON Lines format, with one JSON object per line.
This tool helps with:
- Claude Code export
- Claude Code transcript
- Claude conversation export
- AI chat history backup
- Claude session archive
- Export Claude to GPT
- Migrate Claude to Gemini
- Claude to Codex migration
- Claude to Cursor migration
- AI conversation migration
- Claude transcript exporter
- Claude Code backup tool
- AI session documentation
- Claude conversation history
- Export AI chat logs
- Claude Code session export
- Anthropic Claude export
- Claude conversation backup
- AI transcript archival
- Claude session migration
- Export Claude conversations
- Claude Code to Copilot
- Claude Code to Windsurf
- AI coding assistant migration
- Claude tool call export
- Claude subagent export
- Claude Code JSONL parser
- AI development session backup
- Claude Code conversation archive
| Feature | claude-transcript-exporter | claude-conversation-extractor | /export command |
|---|---|---|---|
| Interactive UI | β | β | β |
| Multiple formats | β (MD, JSON, JSONL, XML) | β (MD, JSON, HTML) | β (MD only) |
| Granular filtering | β | β | β |
| Tool call metadata | β | β | β |
| Subagent support | β | β | β |
| Timestamps | β | β | β |
| Session stats | β | β | β |
| Installation | npm | pip/pipx | Built-in |
| Last updated | 2026 | Jan 2025 | Always current |
Contributions welcome! Please feel free to submit a Pull Request.
MIT Β© Gunit Bindal
Found a bug or have a feature request? Open an issue
If this tool helped you, please give it a star on GitHub!
Made with β€οΈ for the Claude Code community
Note: This is an independent tool and is not officially affiliated with Anthropic.