explaingit

farique/cursor-chat-explorer

5TypeScriptAudience · developerComplexity · 2/5ActiveSetup · easy

TLDR

Terminal app that reads Cursor's local SQLite databases on macOS so you can browse past AI chats and export them as Markdown.

Mindmap

mindmap
  root((cursor-chat-explorer))
    Inputs
      Cursor workspace state.vscdb
      Cursor global state.vscdb
      Optional workspace filter
    Outputs
      Terminal TUI
      Markdown exports
      Stdout listings
    Use Cases
      Recover missing chats
      Archive past conversations
      Grep across chat history
    Tech Stack
      TypeScript
      Ink
      React
      SQLite
      Node

Things people build with this

USE CASE 1

Recover Cursor chats that disappeared when reopening a workspace

USE CASE 2

Archive a folder of Markdown exports of every Cursor conversation

USE CASE 3

Pipe chat history into grep to find an old assistant snippet

USE CASE 4

Scope an export to a single project before sharing with a teammate

Tech stack

TypeScriptInkReactSQLiteNode

Getting it running

Difficulty · easy Time to first run · 5min

macOS only and requires a local Cursor install with existing chat history.

In plain English

cursor-chat-explorer is a small terminal application that reads the local databases of the Cursor code editor and lets you browse and export the AI chat history saved inside them. Cursor stores every chat conversation a user has with its built-in AI in SQLite files on disk, and sometimes when reopening a project the chats appear to be missing. This tool finds them anyway, by joining the per-workspace database with the global database that holds the actual messages. The README warns that the tool currently supports only macOS paths and was vibecoded, meaning it was put together quickly with AI assistance. The README documents where the data lives. On macOS, Cursor keeps a per-workspace state.vscdb file holding chat IDs and the project folder path, and a global state.vscdb file holding the message contents under keys like composerData and bubbleId. The tool only opens these files with a read-only handle, so it is safe to run while Cursor itself is open. The user interface is a TUI (a terminal user interface, drawn with text characters) built with Ink, which is a library for making React-style terminal apps. There are three screens: a list of workspaces sorted by most recent activity, a list of chats in the selected workspace, and a chat detail view showing user messages, assistant text, reasoning blocks, and tool calls with their arguments and results. Keyboard shortcuts cover navigation, opening, filtering the current list with /, exporting one chat with e, exporting all chats in the current list with E, and jumping to the top or bottom of a long chat. There is also a headless mode for use in scripts. --list prints everything to standard output, which is handy for piping into grep, and --export-all writes every chat to a folder of Markdown files named by date, chat name, and composer ID. The output can be scoped to a single project with --workspace and the destination folder set with --out. Tool calls in the exported Markdown are rendered with the tool name, the arguments, and the result inline. The README notes that Cursor sometimes stores the same project under several workspace hashes, that very new or untitled chats appear as (unnamed), and that exported Markdown should be treated as sensitive because it can contain prompts, assistant responses, reasoning, tool inputs and outputs, and local file paths. Planned work includes Windows and Linux support.

Copy-paste prompts

Prompt 1
Port cursor-chat-explorer's db.ts to also read Cursor's Windows AppData paths and add tests for the path resolver
Prompt 2
Add a Linux path branch to cursor-chat-explorer that finds state.vscdb under ~/.config/Cursor
Prompt 3
Write a wrapper script that runs cursor-chat-explorer --export-all nightly and commits the diffs to a private repo
Prompt 4
Add a JSON output flag to cursor-chat-explorer --list so I can pipe it into jq for filtering
Prompt 5
Build a small Express server that serves the exported Markdown files with full-text search using SQLite FTS5
Open on GitHub → Explain another repo

Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.