How to Search Cursor Chat History Across Workspaces
Description and use
Users can quickly locate and export specific Cursor chat sessions across different workspaces using simple CLI commands without API keys.
Problem
Need to locate a specific conversation across multiple Cursor workspaces when the project name is forgotten.
Outcome
Users can efficiently locate and export specific Cursor chat sessions across multiple workspaces using simple CLI commands, without needing API keys or embeddings.
Workflow
- Install cursor-history globally via npm
- Run
cursor-history list --allto discover workspaces - Search with a remembered phrase:
cursor-history search "connection pool" - Adjust query to a distinctive substring if results are too many
- Use
-nflag to change result limit - Open a matching session with
cursor-history show <index>orcursor-history export <sessionId> - Export session to JSON with
--format json --output ./conversation.json - If workspace known, narrow search with
--workspace /path/to/project - If no matches, try shorter phrase, run
cursor-history list --all --json, check file ownership, custom roots, WSL paths, and source status - Set environment variables
CURSOR_DATA_PATHandCURSOR_STORE_ROOTfor explicit directories - Use Cursor native session commands for continued Agent CLI conversations
- Consider MCP companion for assistant-driven search
- Keep cursor-history on GitHub for future use
- Refer to recovery guide for moved projects
Evidence
cursor-history searches conversation text in supported local Cursor stores across discovered workspaces.
It can read history created before you installed it, without a capture hook, embeddings, or an API key.
Search returns up to 10 matching sessions by default. -n 30 raises the limit; -n 0 returns all matching sessions.
- Record date: 2026-09-15T07:31:27.622Z