🚀 The ONLY tool to export Claude Code conversations. Extract Claude chat history from ~/.claude/projects, search through logs, and backup your AI programming sessions.
claude-start- Interactive UI with ASCII art logo, real-time search, and menu-driven interface (recommended)claude-extract- Plain CLI for command-line operations and scripting
Export Claude Code conversations with the #1 extraction tool. Claude Code stores chats in ~/.claude/projects as JSONL files with no export button - this tool solves that.
🔥 What users search for: Export Claude conversations | Claude Code logs location | Backup Claude sessions | Claude JSONL to Markdown
Claude Code has no export button. Your conversations are trapped in ~/.claude/projects/ as undocumented JSONL files. You need:
- ❌ Export Claude Code conversations before they're deleted
- ❌ Search Claude Code chat history to find that solution from last week
- ❌ Backup Claude Code logs for documentation or sharing
- ❌ Convert Claude JSONL to Markdown for readable archives
This is the ONLY tool that exports Claude Code conversations:
- ✅ Finds Claude Code logs automatically in ~/.claude/projects
- ✅ Extracts Claude conversations to clean Markdown files
- ✅ Searches Claude chat history with real-time results
- ✅ Backs up all Claude sessions with one command
- ✅ Works on Windows, macOS, Linux - wherever Claude Code runs
- 🔍 Real-Time Search: Search Claude conversations as you type - no flags needed
- 📝 Claude JSONL to Markdown: Clean export without terminal artifacts
- ⚡ Find Any Chat: Search by content, date, or conversation name
- 📦 Bulk Export: Extract all Claude Code conversations at once
- 🎯 Zero Config: Just run
claude-extract- we find everything automatically - 🚀 No Dependencies: Pure Python - no external packages required
- 🖥️ Cross-Platform: Export Claude Code logs on any OS
- 📊 97% Test Coverage: Reliable extraction you can trust
# Using pipx (solves Python environment issues)
pipx install claude-conversation-extractor
# OR using pip
pip install claude-conversation-extractormacOS
# Install pipx first
brew install pipx
pipx ensurepath
# Then install the extractor
pipx install claude-conversation-extractorWindows
# Install pipx
py -m pip install --user pipx
py -m pipx ensurepath
# Restart terminal, then:
# Install the extractor
pipx install claude-conversation-extractorLinux
# Ubuntu/Debian
sudo apt install pipx
pipx ensurepath
# Install the extractor
pipx install claude-conversation-extractor# Run the interactive UI with ASCII art logo and real-time search
claude-start
# Run the standard CLI interface
claude-extract
# Search for specific content directly
claude-search "API integration"
# Note: claude-logs also works for backward compatibilityThat's it! The tool will:
- Find your Claude Code conversations in ~/.claude/projects
- Show an interactive menu to search or export
- Convert Claude JSONL files to readable Markdown, JSON, or HTML
# Interactive mode with UI - easiest way to export Claude conversations
claude-start
# CLI mode - command-line interface
claude-extract
# List all Claude Code conversations
claude-extract --list
# Export specific Claude chats by number
claude-extract --extract 1,3,5
# Export recent Claude Code sessions
claude-extract --recent 5
# Backup all Claude conversations at once
claude-extract --all
# Save Claude logs to custom location
claude-extract --output ~/my-claude-backupsExport conversations in multiple formats:
# Export as JSON for programmatic processing
claude-extract --format json --extract 1
# Export as HTML with beautiful formatting
claude-extract --format html --all
# Include tool use, MCP responses, and system messages
claude-extract --detailed --extract 1
# Combine options for complete exports
claude-extract --format html --detailed --recent 5Supported Formats:
- Markdown (default) - Clean, readable text format
- JSON - Structured data for analysis and processing
- HTML - Beautiful web-viewable format with syntax highlighting
Detailed Mode (--detailed):
Includes complete conversation transcript with:
- Tool use invocations and parameters
- MCP server responses
- System messages and errors
- Terminal command outputs
- All metadata from the conversation
Search across all your Claude conversations:
# Method 1: Direct search command
claude-search # Prompts for search term
claude-search "zig build" # Search for specific term
claude-search "error handling" # Multi-word search
# Method 2: From interactive menu
claude-extract
# Select "Search conversations" for real-time searchSearch features:
- Fast full-text search across all conversations
- Case-insensitive by default
- Finds exact matches, partial matches, and patterns
- Shows match previews and conversation context
- Option to extract matching sessions directly
- macOS/Linux:
~/.claude/projects/*/chat_*.jsonl - Windows:
%USERPROFILE%\.claude\projects\*\chat_*.jsonl - Format: Undocumented JSONL with base64 encoded content
~/Desktop/Claude logs/claude-conversation-2025-06-09-abc123.md
├── Metadata (session ID, timestamp)
├── User messages with 👤 prefix
├── Claude responses with 🤖 prefix
└── Clean Markdown formatting
Install with pipx install claude-conversation-extractor then run claude-extract. The tool automatically finds all conversations in ~/.claude/projects.
Use the --detailed flag to include tool invocations, MCP responses, terminal outputs, and system messages:
claude-extract --detailed --format html --extract 1This gives you the complete conversation as seen in Claude's Ctrl+R view.
Claude Code saves all chats in ~/.claude/projects/ as JSONL files. There's no built-in export feature - that's why this tool exists.
Yes! Run claude-search or select "Search conversations" from the menu. Type anything and see results instantly.
Run claude-extract --all to export every conversation at once, or use the interactive menu option "Export all conversations".
No, this tool specifically exports Claude Code (desktop app) conversations. Claude.ai has its own export feature in settings.
Yes! Version 1.1.1 supports multiple export formats:
- Markdown - Default clean text format
- JSON - Structured data with timestamps and metadata
- HTML - Beautiful web-viewable format with modern styling
Use
--format jsonor--format htmlwhen extracting.
No, this is an independent open-source tool. It reads the local Claude Code files on your computer - no API or internet required.
| Feature | Claude Conversation Extractor | Manual Copy | Claude.ai Export |
|---|---|---|---|
| Works with Claude Code | ✅ Full support | ✅ Tedious | ❌ Different product |
| Bulk export | ✅ All conversations | ❌ One at a time | ❌ N/A |
| Search capability | ✅ Real-time search | ❌ None | ❌ N/A |
| Clean formatting | ✅ Perfect Markdown | ❌ Terminal artifacts | ❌ N/A |
| Zero configuration | ✅ Auto-detects | ❌ Manual process | ❌ N/A |
| Cross-platform | ✅ Win/Mac/Linux | ✅ Manual works | ❌ N/A |
- Locates Claude Code logs: Scans ~/.claude/projects for JSONL files
- Parses undocumented format: Handles Claude's internal data structure
- Extracts conversations: Preserves user inputs and Claude responses
- Converts to Markdown: Clean format without terminal escape codes
- Enables search: Indexes content for instant searching
- Python 3.8+ (works with 3.9, 3.10, 3.11, 3.12)
- Claude Code installed with existing conversations
- No external dependencies for core features
# For semantic search capabilities
pip install spacy
python -m spacy download en_core_web_smHelp make the best Claude Code export tool even better! See CONTRIBUTING.md.
# Clone the repo
git clone https://github.com/ZeroSumQuant/claude-conversation-extractor.git
cd claude-conversation-extractor
# Create virtual environment
python3 -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install dev dependencies
pip install -r requirements-dev.txt
# Run tests
pytest- Ensure Claude Code has been used at least once
- Check
~/.claude/projects/exists and has .jsonl files - Verify read permissions on the directory
- Try
ls -la ~/.claude/projects/to see if files exist
- Claude Code must be installed and used before exporting
- Check the correct user directory is being scanned
- Ensure you're running the tool as the same user who uses Claude Code
See INSTALL.md for:
- Fixing "externally managed environment" errors
- PATH configuration help
- Platform-specific troubleshooting
- ✅ 100% Local: Never sends your Claude conversations anywhere
- ✅ No Internet: Works completely offline
- ✅ No Tracking: Zero telemetry or analytics
- ✅ Open Source: Audit the code yourself
- ✅ Read-Only: Never modifies your Claude Code files
- Export Claude Code conversations to Markdown
- Real-time search for Claude chat history
- Bulk export all Claude sessions
- Export to JSON format with metadata
- Export to HTML with beautiful formatting
- Detailed transcript mode with tool use/MCP responses
- Direct search command (
claude-search)
- Export to PDF format
- Automated daily backups of Claude conversations
- Integration with Obsidian, Notion, Roam
- Watch mode for auto-export of new conversations
- Filter by date range (--after, --before flags)
- Export statistics and analytics dashboard
This tool accesses Claude Code conversation data stored locally in ~/.claude/projects on your computer. You are accessing your own data. This is an independent project not affiliated with Anthropic. Use responsibly and in accordance with Claude's terms of service.
MIT License - see LICENSE for details.
If this tool helps you export Claude Code conversations:
- ⭐ Star this repo to help others find it
- 🐛 Report issues if you find bugs
- 💡 Suggest features you'd like to see
- 📣 Share with other Claude Code users
Keywords: export claude code conversations, claude conversation extractor, claude code export tool, backup claude code logs, save claude chat history, claude jsonl to markdown, ~/.claude/projects, extract claude sessions, claude code no export button, where are claude code logs stored, claude terminal logs, anthropic claude code export
Note: This is an independent tool for exporting Claude Code conversations. Not affiliated with Anthropic.
