Extract and export your Cursor IDE conversation history
Project description
๐ MyCursorData
Extract and export your Cursor IDE conversation history.
MyCursorData reads Cursor's internal SQLite database and exports all your AI conversations to readable text files, organized by project.
โจ Features
- ๐ Auto-discovery - Automatically finds your Cursor databases on macOS, Linux, and Windows
- ๐ Project organized - Exports conversations grouped by workspace/project
- ๐ ๏ธ Tool call tracking - Includes full tool call details (file edits, terminal commands, searches)
- โ Approval tracking - Shows which changes were approved/rejected by the user
- ๐ Statistics - Get quick stats about your conversation history
๐ฆ Installation
With pip
pip install mycursordata
With uv (recommended)
uv pip install mycursordata
Run directly with uvx
uvx mycursordata ~/my-cursor-export
๐ Usage
Quick Export
Export all conversations to a directory:
# Export to a directory
mycursordata export ~/cursor-export
# Or simply (export is the default command)
mycursordata ~/cursor-export
Discover Databases
Find all available Cursor databases on your system:
mycursordata discover
Output:
๐ Searching for Cursor databases...
Default search paths:
โ
/Users/you/Library/Application Support/Cursor/User/globalStorage/state.vscdb
โ /Users/you/Library/Application Support/Cursor Nightly/User/globalStorage/state.vscdb
...
๐ Found 1 database(s):
1. [GLOBAL] cursor/global
Path: /Users/you/Library/Application Support/Cursor/User/globalStorage/state.vscdb
Conversations: 42, Messages: 1337
View Statistics
Get quick stats about your conversation history:
mycursordata info
Export with Options
# Use a specific database file
mycursordata export ~/output -d /path/to/state.vscdb
# Show summary before exporting
mycursordata export ~/output --summary
# Verbose output for debugging
mycursordata export ~/output -v
๐ Output Format
Conversations are exported as text files organized by project:
output/
โโโ my-project/
โ โโโ 2024-01-15_10-30-00_Add_dark_mode_toggle.txt
โ โโโ 2024-01-16_14-22-10_Fix_login_bug.txt
โโโ another-project/
โ โโโ 2024-01-17_09-00-00_Refactor_API.txt
โโโ unknown/
โโโ 2024-01-18_11-45-00_abc123.txt
Each file contains:
- Conversation metadata (name, timestamps, message count)
- Full message history with thinking blocks
- Tool calls with arguments and results
- Code blocks and diffs
- Approval summary (what was approved/rejected)
๐ง How It Works
Cursor stores its conversation history in a SQLite database called state.vscdb. This tool:
- Discovers the database by checking common locations for your OS
- Parses the key-value store to extract conversation data
- Groups conversations by project/workspace
- Formats everything into readable text files
Database Locations
| OS | Path |
|---|---|
| macOS | ~/Library/Application Support/Cursor/User/globalStorage/state.vscdb |
| Linux | ~/.config/Cursor/User/globalStorage/state.vscdb |
| Windows | %APPDATA%\Cursor\User\globalStorage\state.vscdb |
๐ Python API
You can also use MyCursorData as a library:
from mycursordata import CursorDataParser, discover_cursor_databases
# Discover databases
databases = discover_cursor_databases()
for db in databases:
print(f"Found: {db['path']} ({db['source']})")
# Parse and export
with CursorDataParser("/path/to/state.vscdb") as parser:
# Get stats
stats = parser.get_bubble_stats()
print(f"Total conversations: {stats['conversations']}")
# Export all conversations
parser.export_all("./output")
# Or get raw data
conversations = parser.get_all_conversations()
for project, convs in conversations.items():
print(f"Project: {project}, Conversations: {len(convs)}")
๐ Requirements
- Python 3.11+
- No external dependencies (uses only stdlib!)
๐ค Contributing
Contributions are welcome! Please open an issue or PR on GitHub.
๐ License
MIT License - see LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mycursordata-0.1.0.tar.gz.
File metadata
- Download URL: mycursordata-0.1.0.tar.gz
- Upload date:
- Size: 16.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
39df409d00a00cbe2335e5050a50f2e4d774d612778732bcaab8771d1c195881
|
|
| MD5 |
a1997169236c1730b5528252fa72b693
|
|
| BLAKE2b-256 |
27c392bea4dd7ce32d35977be894c4fc55bee460ba6c1cc63c659946303ce661
|
File details
Details for the file mycursordata-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mycursordata-0.1.0-py3-none-any.whl
- Upload date:
- Size: 18.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8410d230e9f3de5400ab681d839c0ecc45f8bba71d643e2108faccb681c5e1cc
|
|
| MD5 |
d6d7f7019bd1f87269c9a900e50d06de
|
|
| BLAKE2b-256 |
082a761bf2d69ca104fd303870bdd367d15b0ada2c726d17902ef5e4e712fd67
|