Your AI IDE Has Been Keeping a Diary
Extracts complete conversation histories, code context, and diffs from Cursor, Claude Code, Codex, and five other AI coding assistants to build custom training datasets.

What it does
This is a collection of Python scripts that scrape your local chat history from eight popular AI coding assistants, including Cursor, Claude Code, Windsurf, and Trae. It hunts through hidden directories, SQLite databases, and JSONL logs to reconstruct every message, code snippet, suggested diff, and tool invocation you’ve exchanged with these tools. Everything gets normalized into timestamped JSONL files ready for analysis or fine-tuning.
The interesting bit
The real work here is forensic: the scripts reverse-engineer undocumented storage schemas, like Cursor’s evolution from workspace SQLite blobs through three separate Composer key formats between v0.x and v2.0+. It handles OS-specific paths across macOS, Linux, and Windows using only the Python standard library—no external dependencies required.
Key highlights
- Covers eight tools: Cursor, Claude Code, Codex, Trae, Windsurf, Continue, Gemini CLI, and OpenCode
- Reconstructs code context with file paths, line numbers, suggested diffs, and tool execution results
- Auto-detects installations and handles multiple storage backends (SQLite, JSONL, Tauri .dat files)
- Outputs a unified JSONL schema with timestamps, model names, and session metadata
- Runs offline with zero third-party dependencies
Caveats
- Extracted data may contain proprietary code, API keys, or secrets that need sanitizing before reuse
- Partial or missing data is possible for deleted sessions, user-only conversations, or corrupted database entries
- SQLite databases may be locked if the target AI tool is still running during extraction
Verdict
Worth a look if you’re building a personal coding dataset or auditing what these tools silently retain on disk. Skip it if you just want cloud-exported chat history—this is strictly local forensics.
Frequently asked
- What is 0xSero/ai-data-extraction?
- Extracts complete conversation histories, code context, and diffs from Cursor, Claude Code, Codex, and five other AI coding assistants to build custom training datasets.
- Is ai-data-extraction open source?
- Yes — 0xSero/ai-data-extraction is an open-source project tracked on heatdrop.
- What language is ai-data-extraction written in?
- 0xSero/ai-data-extraction is primarily written in Python.
- How popular is ai-data-extraction?
- 0xSero/ai-data-extraction has 1.2k stars on GitHub.
- Where can I find ai-data-extraction?
- 0xSero/ai-data-extraction is on GitHub at https://github.com/0xSero/ai-data-extraction.