Setup Cursor Chat History Sync
We maintain a central corpus of Cursor chat histories to analyze usage patterns, extract common topics, and improve our prompts and skills.
Note: Cursor stores only a subset of your conversations on disk (under ~/.cursor/projects/). The in-app chat list may show many more threads; older or pruned ones are not retained locally. The collector picks up every transcript file that exists (including subagent threads), so you contribute everything Cursor has kept.
You can contribute your history in three ways:
Option 1: Using the Cursor Skill (Easiest)
Simply open Cursor’s chat (Cmd+L) and type:
/contribute-chat-history
The agent will walk you through uploading your chat logs securely.
Option 2: Run the CLI Manually
If you want to run it from the terminal periodically:
- Copy
.env.exampleto.env.localif you haven’t already. - Add your environment variables:
CURSOR_HISTORY_API_URL=https://your-supabase-project.supabase.co CURSOR_HISTORY_API_KEY=your-service-role-key CURSOR_USER_EMAIL=you@brainforge.ai - Run the script:
npx tsx scripts/contribute-cursor-history.ts
Option 3: Background Daemon (Automatic)
For continuous contribution without thinking about it, set up the background daemon to run hourly.
Installation
- Install dependencies:
cd apps/cursor-history-sync npm install - Build the app:
npm run build - Run the daemon using
pm2(recommended):npm install -g pm2 pm2 start dist/index.js --name "cursor-history-sync" pm2 save pm2 startup
Privacy & Security
- Identity: We store your email and machine ID for attribution and quality metrics.
- Content: The raw
.jsonltranscripts from your~/.cursor/projectsare securely uploaded to our internal Supabase database. - Deduplication: The script only uploads new or modified conversations, saving bandwidth and storage.