Small script to export chat history

I know there have been several tools to export chat history, but after Cursor updates, the storage has been changed.

Previous, it’s in the ItemTable table, but now looks like it’s in cursorDiskKV.

I write a small script to export all chat history to markdown files, and you can easily adapt the script as need.

Usage: python export-cursor-chat.py [output_directory]
If no output directory is specified, /tmp/cursor will be used

This is awesome, @fankaidev ! We were hitting the same problem so my team and I at https://specstory.com built a Cursor Extension to make these exports more pushbutton. It works with the latest Cursor updated.
We haven’t open sourced the code yet, but we are giving it away for free (we have our sights set on tackling bigger challenges around spec writing for AI-driven software development). In case you or others can benefit from it: SpecStory (Cursor Extension) - Visual Studio Marketplace

1 Like