A command-line tool to export chat history and composer data from Cursor IDE.
npm install -g cursor-export
Or run directly with npx:
# Replace {scott} with your username
npx cursor-export --workspacePath="/Users/scott/Library/Application Support/Cursor/User/workspaceStorage"
cursor-export [options]
Options:
-w, --workspacePath Path to Cursor workspace storage
[default: "/Users/scott/Library/Application Support/Cursor/User/workspaceStorage"]
-h, --help Show help information
Example Output:
Export completed successfully!
Total workspaces processed: 1
Output directory structure:
cursor-export-output/
├── html/
│ └── <workspace_folders>/
│ └── <timestamp>--<chat_title>.html
├── markdown/
│ └── <workspace_folders>/
│ └── <timestamp>--<chat_title>.md
└── json/
└── <workspace_name>.json
Example html file:

# Clone the repository
git clone https://github.com/yourusername/cursor-chat-composer-export.git
cd cursor-chat-composer-export
# Install dependencies
npm install
# Install globally for local testing
npm install -g .
# Run the tool locally
npm run dev
index.js - Core functionality for exporting chat historycli.js - Command line interface implementationindex.test.js - Test suitegit checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)To enable debug logs, set the DEBUG environment variable:
# On Unix-like systems
DEBUG=cursor-export:* npm start
# On Windows
set DEBUG=cursor-export:* && npm start
MIT