Cursor adapter

Status: Production (v0.5) Module: llmwiki.adapters.contrib.cursor Source: llmwiki/adapters/contrib/cursor.py Tracking issue: #37

What it reads

Cursor IDE stores conversation history in per-workspace directories under platform-specific paths:

# macOS
~/Library/Application Support/Cursor/User/workspaceStorage/<hash>/

# Linux
~/.config/Cursor/User/workspaceStorage/<hash>/

# Windows
%APPDATA%\Cursor\User\workspaceStorage\<hash>\

The adapter checks all three platform paths and discovers .jsonl files (and state.vscdb for future SQLite support). The <hash> is a workspace-specific identifier.

Project slug derivation

Cursor workspace directories use opaque hashes. The adapter truncates the hash to 12 characters and prefixes with cursor-:

workspaceStorage/a1b2c3d4e5f6789/session.jsonl
  -> cursor-a1b2c3d4e5f6

Future versions will read workspace.json from each workspace directory to extract the friendly project name.

Schema versions supported

SUPPORTED_SCHEMA_VERSIONS = ["v1"]

Configuration

Override roots in config.json:

{
  "adapters": {
    "cursor": {
      "roots": ["~/custom/cursor/path"]
    }
  }
}

Testing the adapter

python3 -m llmwiki adapters      # should list cursor as available (if installed)
python3 -m pytest tests/test_adapter_graduation.py -k cursor -v

Fixture

A minimal synthetic fixture is provided at tests/fixtures/cursor/minimal.jsonl for converter round-trip testing. It contains a single turn with a Write tool call.

Reference

Keyboard shortcuts

⌘K / Ctrl+KOpen command palette
/Focus search
g hGo to home
g pGo to projects
g sGo to sessions
j / kNext / prev row (tables)
?Show this help
EscClose dialogs

Structured queries

Mix key:value filters with free text in the palette:

type:sessionOnly session pages
project:llm-wikiFilter by project name (substring)
model:claudeFilter by model name (substring)
date:>2026-03-01Sessions after a date
date:<2026-04-01Sessions before a date
tags:rustPages mentioning a tag/topic
sort:dateSort results by date (newest first)

Example: type:session project:llm-wiki date:>2026-04 sort:date