freedzhost.cloud

Take your Claude.ai history home: claude-archive, step by step

Level BeginnerEstimated time 20 minA word you don't know? Glossary

Months of conversations with an AI hold decisions, code and explanations you will want again. The official export gives them back, but as one big JSON file. claude-archive turns it into a folder you can read, search, index and keep under version control, and tells you exactly what the export could not give.

What you get. Your whole history, readable offline, in date order, with every snippet of code extracted as a file, and a count that proves the archive is complete. Ready to feed a local search over your notes.

1. Ask for the export

On Claude.ai: Settings → Privacy → Export data. You receive a link by e-mail to one or several ZIP files.

2. Run the script

chmod +x claude_archive.py
python3 claude_archive.py ~/Downloads/data-XXXX-batch-0000.zip -o ./old-claude
# or an already unzipped folder, anything that contains conversations.json
python3 claude_archive.py ~/Downloads/my-export -o ./old-claude

Python 3.10 or newer, standard library only: nothing to install, nothing sent anywhere.

Several ZIPs (batch-0000, batch-0001…)? Give each its own output folder: the numbering restarts at 1 for each run and the names would collide.

3. What you get

old-claude/
├── conversations/          one .md per conversation, numbered and dated
├── code/<conversation>/     every code block as a real file (.py, .html, .yml…)
├── TODO_attachments.md     the attachments to fetch by hand, with a link to each conversation
└── manifest.json           index, completeness counts, warnings

Code blocks are extracted and kept in the text, so each conversation still reads whole.

4. Check that nothing was lost

python3 -c "import json; print('\n'.join(json.load(open('old-claude/manifest.json'))['warnings']))"

5. Fetch what the export leaves out

The export has the text, not the binary attachments. A companion script narrows the list down to the files Claude generated (documents, spreadsheets, archives), the ones you can only download by hand:

python3 recover_generated.py old-claude/manifest.json
# -> RECOVER_generated.md: a checklist grouped by conversation, with direct links

Limits

Found this useful? Tell us what to measure next.