Skip to content

Batch save all your Claude AI chats to local Markdown files. Converts Anthropic's data export (JSON) to searchable format with interactive HTML index. 批量备份Claude对话到本地。

License

Notifications You must be signed in to change notification settings

Snowsword168/claude-chat-saver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Claude Chat Saver

Batch save all your Claude AI chats to local Markdown files. Converts Anthropic's data export (JSON) to searchable format with interactive HTML index. 批量备份Claude对话到本地。

The Problem

  • 😩 Saving Claude chats one-by-one is tedious
  • 📦 Anthropic's official data export gives you a huge JSON file - not human-readable
  • 🔍 You can't search through your chat history locally

The Solution

  1. Download your data from Claude.ai (Settings → Export Data)
  2. Run this converter on the conversations.json file
  3. Get beautifully formatted Markdown files + interactive HTML index

Now you can search all your Claude conversations in Sublime Text, VS Code, or any text editor!

Features

  • ✅ Batch convert all chats to readable Markdown format
  • ✅ Incremental updates (only converts changed chats)
  • ✅ Interactive HTML index with search, filter & sort
  • ✅ Track chat updates (⚡ badge for recently updated)
  • ✅ Full-text searchable in any text editor

Installation

pip install -r requirements.txt

Usage

First-time conversion

python converter.py -i conversations.json -o ./Claude_Chats/

Incremental update (auto-detects changes)

python converter.py -i conversations.json -o ./Claude_Chats/

Force re-convert all

python converter.py -i conversations.json -o ./Claude_Chats/ --force

Update index only

python converter.py -i conversations.json -o ./Claude_Chats/ --index-only

Output Structure

Claude_Chats/
├── _INDEX.html          # Interactive web index (open in browser)
├── _INDEX.md            # Markdown index (for text editors)
├── _SYNC_LOG.json       # Sync history (tracks conversions)
└── YYYY-MM-DD_Title.md  # Individual chat files

HTML Index Features

  • Search: Real-time search through chat titles
  • Filter: Filter by month/year
  • Sort: Click column headers to sort by Created, Updated, or Title
  • Update Badge: ⚡ indicates chats updated after creation

Troubleshooting

"ModuleNotFoundError: No module named 'tqdm'"
→ Run: pip install -r requirements.txt

HTML index shows no conversations
→ Delete _SYNC_LOG.json and run conversion again

Force full re-conversion
→ Delete _SYNC_LOG.json or use --force flag

License

MIT

About

Batch save all your Claude AI chats to local Markdown files. Converts Anthropic's data export (JSON) to searchable format with interactive HTML index. 批量备份Claude对话到本地。

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages