Transform your Claude Code chat history into beautiful, shareable documentation
Extract and convert Claude Code chat history (.jsonl files) into clean Markdown or interactive HTML formats with syntax highlighting, search, and filtering.
🎨 Two Output Formats
- Markdown - Clean, portable text format perfect for documentation
- HTML - Interactive dark theme with syntax highlighting, search, and filters
🔍 Powerful Filtering
- Date filters (today, week, month)
- Full-text search in titles
- Flexible selection (single, range, multiple)
⚡ Interactive UI
- Arrow key navigation
- Live preview and pagination
- Batch conversion support
🛠️ Developer-Friendly
- Preserves tool usage details
- Structured content blocks
- Timestamp tracking
cd claude-chat-extract
npm install -g .After installation, use either cce or claude-chat commands.
Claude Code stores chat history in the following directories:
Windows:
%USERPROFILE%\.claude\projects
C:\Users\YourName\.claude\projects
macOS:
~/.claude/projects
/Users/YourName/.claude/projects
Linux:
~/.claude/projects
/home/username/.claude/projects
Each project folder contains .jsonl files with chat history.
Simply run the command to browse and convert chats interactively:
cce# Convert everything to Markdown
cce -a
# Convert to HTML
cce -a -f html
# Convert to both formats
cce -a -f both# Today's chats only
cce -t -a
# Last week, HTML format
cce -w -a -f html
# Search for specific topics
cce -s "api" -a
# Combine filters
cce -t -s "bug" -a -f both| Option | Alias | Description |
|---|---|---|
-h |
--help |
Show help message |
-a |
--all |
Convert all chats (non-interactive mode) |
-f <format> |
--format |
Output format: md, html, or both (default: md) |
-t |
--today |
Filter: only today's chats |
-w |
--week |
Filter: last 7 days |
-m |
--month |
Filter: last 30 days |
-s <text> |
--search |
Filter: search in chat titles |
-l |
--list |
List chats without converting |
-n <num> |
--limit |
Limit number of results |
[directory] |
- | Specify custom directory to scan |
| Command | Description |
|---|---|
↑ / ↓ |
Navigate through chats |
Enter |
Convert selected chat |
PgUp / PgDn |
Navigate pages |
[number] |
Select single chat (e.g., 5) |
[start-end] |
Select range (e.g., 1-10) |
[n,m,k] |
Select multiple (e.g., 1,3,5) |
[a]ll |
Convert all filtered chats |
[f]ilter |
Change date filter |
[s]earch |
Search in titles |
[r]eset |
Clear all filters |
[q]uit |
Exit program |
Clean, portable format with emoji indicators for different message types:
Features:
- 👤 User messages
- 🤖 Claude responses
- 🔧 Tool usage blocks
- 📋 Tool results
- Metadata (timestamps, message counts)
Interactive, responsive HTML with dark theme:
Features:
- 🎨 Beautiful dark theme UI
- 🔍 Live search with highlighting
- 🎯 Message type filters (User/Claude/System)
- 📋 One-click copy buttons
- 📱 Responsive mobile design
- 🔽 Collapsible tool blocks
- 💾 Self-contained single file
cce C:\Users\YourName\.claude\projects# List all chats
cce -l
# List today's chats
cce -t -l
# List with search filter
cce -s "refactor" -l# Convert last week's chats to both formats
cce -w -a -f both
# Find and convert API-related chats
cce -s "api" -a -f html
# Limit to 10 most recent
cce -n 10 -aclaude-chat-extract/
├── index.js # Main executable
├── package.json # NPM package configuration
└── README.md # This file
Input: .jsonl files from Claude Code chat history
Output: .md and/or .html files in the same directory as source files
- 📚 Documentation - Convert technical discussions into shareable docs
- 🔄 Knowledge Base - Archive important conversations
- 📊 Code Review - Export code-related chats for team review
- 🎓 Learning - Save tutorial sessions for reference
- 🔍 Analysis - Search through conversation history
Found a bug or have a feature request? Feel free to open an issue or submit a pull request.
MIT License - feel free to use this tool for personal or commercial projects.
Built for the Claude Code community to make chat history more accessible and shareable.


