从Cursor、Codex、Claude-Code、Windsurf和Trae提取你所有的个人数据历史
概览
完整的工具包,从AI编码助手中提取所有聊天、代理和代码上下文数据,用于机器学习训练。 自动发现并提取包括:- ✅ 用户消息和AI响应 - ✅ 代码上下文(文件路径、行号、摘要)- ✅ 代码差异和建议编辑 - ✅ 多文件上下文 - ✅ 工具使用和执行结果 - ✅ 时间戳和元数据 Claude Code / Claude Desktop 的提取 - : ~/.claude, ~/.claude-code, ~/.claude-local, ~/.claude-m2, ~/.claude-zai - : JSONL 会话文件 - : 消息、工具使用、文件上下文、diffs 从Codex(如果已安装)提取 - : ~/.codex, ~/.codex-local - : Rollout JSONL文件 - : 用户/代理消息、工具结果、差异 从光标提取(聊天 + 作曲器 + 代理)- 所有版本 - : ~/Library/Application Support/Cursor(macOS)或等效工具 - : SQLite 数据库(state.vscdb,cursorDiskKV) - : - 旧聊天模式(工作区存储) - Composer 内联存储(v1.
概述(AI 翻译)
完整的工具包,从AI编码助手中提取所有聊天、代理和代码上下文数据,用于机器学习训练。
🎯 这会带来什么
自动发现并提取完整的对话历史,包括:
- ✅ 用户消息与AI响应
- ✅ 代码上下文(文件路径、行号、片段)
- ✅ 代码差异及建议编辑
- ✅ 多文件上下文
- ✅ 工具使用与执行结果
- ✅ 时间戳和元数据
Pi和OMP会话导出使用一个共享解析器。默认解析器紧随激活解析器
分支;python3 extract_pi.py --all-branches 和 python3 extract_omp.py --all-branches
导出带有祖先和分支ID的单独叶对话。字符串
答案、自定义上下文、推理、工具调用ID、模型变更、顾问/子代理
会话和分支摘要被保留。OMP 还支持 --prompt-history
用于单独的只读 SQLite 快照,包括已提交的 WAL 行。
extract_droid.py 读取 ~/.factory/sessions 下的工厂/机器人会话和设置。
聚合脚本包含这三种。解析器合并包含
PR #26的Pi/OMP工作,#17的Joshua Warren的OMP报道,以及Umang Bhalla的
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
AI Coding Assistant Training Data Extraction Toolkit
Complete toolkit to extract ALL chat, agent, and code context data from AI coding assistants for machine learning training.
🎯 What This Does
Automatically discovers and extracts complete conversation history including:
- ✅ User messages & AI responses
- ✅ Code context (file paths, line numbers, snippets)
- ✅ Code diffs and suggested edits
- ✅ Multi-file contexts
- ✅ Tool use and execution results
- ✅ Timestamps and metadata
Pi and OMP session exports use one shared parser. The default follows the active
branch; python3 extract_pi.py --all-branches and python3 extract_omp.py --all-branches
export separate leaf conversations with their ancestry and branch IDs. String
answers, custom context, reasoning, tool-call IDs, model changes, advisor/subagent
sessions and branch summaries are preserved. OMP also supports --prompt-history
for a separate read-only SQLite snapshot, including committed WAL rows.
extract_droid.py reads Factory/Droid sessions and settings under ~/.factory/sessions.
The aggregate script includes all three. The parser consolidation carries the
Pi/OMP work from PR #26, Joshua Warren’s OMP coverage from #17 and Umang Bhalla’s
Droid contribution from #7, with regression fixes and attribution.
📦 Included Scripts
1. extract_claude_code.py
Extracts from Claude Code / Claude Desktop
- Searches:
~/.claude,~/.claude-code,~/.claude-local,~/.claude-m2,~/.claude-zai - Formats: JSONL session files
- Includes: Messages, tool use, file contexts, diffs
2. extract_codex.py
Extracts from Codex (if installed)
- Searches:
~/.codex,~/.codex-local - Formats: Rollout JSONL files
- Includes: User/agent messages, tool results, diffs
3. extract_cursor.py
Extracts from Cursor (Chat + Composer + Agent) - ALL VERSIONS
- Searches:
~/Library/Application Support/Cursor(macOS) or equivalent - Formats: SQLite databases (
state.vscdb,cursorDiskKV) - Handles:
- Old Chat mode (workspace storage)
- Composer inline storage (v1.x - messages in composerData array)
- Composer separate storage (v1.x-v2.0 transition - messages in bubbleId keys)
- Latest Composer/Agent (v2.0+)
- Includes:
- Code context, selections, diffs
- Suggested edits and code blocks
- Tool results and execution outputs
4. extract_trae.py
Extracts from Trae
- Searches:
~/.trae,~/Library/Application Support/Trae - Formats: JSONL and SQLite databases
- Includes: Chat, agent data, tool use, diffs
5. extract_windsurf.py
Extracts from Windsurf
- Searches:
~/Library/Application Support/Windsurfor equivalent - Formats: SQLite databases (VSCode-like format)
- Includes: Chat, agent/flow conversations, code context
6. extract_continue.py
Extracts from Continue AI Assistant
- Searches:
~/.continue/sessions/ - Formats: JSON session files
- Includes:
推荐工具
换一个关键词,或者移除筛选条件。
安装
npx skillfish add 0xsero/ai-data-extraction