I use Claude.ai a lot. One feature that I wish Anthropic offered was to search for text _inside_ the chats.*
I often come back and want to use search to review previous chats, continue a thread, or find when I had a certain discussion.
But I can’t.**
What’s a boy to do?
I realized that I could hack this, with some assistance from Claude.
Claude allows users to download all their data. So I figured: download the data and make it all searchable by Spotlight (I’m on MacOS).
So I downloaded the data, which was all in JSON. I then threw it at Claude to analyze the structure and make a Python script to convert that JSON into individual, human- and MacOS-readable RTF files.***
The script was ridiculously fast, blowing thru the 200 or so convos I had, practically instantaneously, creating, based on my requirements, RTF files with dates in the chat names and messages (yeah, Claude doesn’t show dates in its UI), and human-readable formatting of the RTF to distinguish me and Claude in the text by color.
Good enough for gov’t work
Now I have all my convos up to certain date, searchable in MacOS. Very handy. And all the messages have timestamps, so I know _when_ I wrote something. And I kept the original URL of the convo, so I can go back as needed to the original chat thread to review or continue it or even access any artifacts or documents (tho I see Claude has recently added an artifact section – good move).
There are some tweaks still I’d make to the output (there’s some duplication of messages in each convo), but I’m in no rush. This system works, and searching the repository has been extremely helpful.
Next time I want an updated repository of my convos, I just need to repeat the steps. The JSON file is small – about 11MB for the 200 or so convos I had. And the conversion script is practically instantaneous.
Claude, as always, was a great help in making this happen. While I could have done this all by myself, Claude is definitely a force multiplier for all my programming needs.
*I swear Claude had search in chats at some point. Might it have been the Pro version and not the free version, which I currently have?
**ChatGPT does search in chat messages.
***I admit, I didn’t do any deep research to see if I could have used the Claude API to do this. But I do not think I can. Feel free to correct me.
