Local-only extractor and HTML report generator for AI coding chat artifacts on macOS: GitHub Copilot (VS Code), GitHub Copilot CLI, Cursor, Claude Code, and Codex.
- Scans VS Code / Copilot
workspaceStorage/*/chatSessions/*.json - Scans Cursor agent transcripts at
~/.cursor/projects/*/agent-transcripts/*/*.jsonl - Scans Claude Code sessions at
~/.claude/projects/*/*.jsonl - Scans Codex rollouts at
~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl - Scans GitHub Copilot CLI sessions at
~/.copilot/session-state/*/events.jsonl - Optionally rsyncs science-server histories (
--remote-defaults) before scanning - Resolves workspace folders and SSH remote hosts from
workspace.json/ session metadata - Extracts user/assistant messages with tool/thinking/code-diff details collapsed behind click-to-expand
- Generates a browsable offline HTML report with filters for host, workspace path, SSH host, date bucket, and keyword search
- Writes
schema_probe.jsondescribing discovered storage shapes
- macOS (local paths are tuned for VS Code / Cursor on macOS)
- Python 3.10+
- SSH access to
scienceif you use--remote-defaults
git clone git@github.com:zoutei/Github_Copilot_Cursor_Chat_History_Viewer.git
cd Github_Copilot_Cursor_Chat_History_Viewer
pip install -e .Or run without installing:
PYTHONPATH=src python -m copilot_chat_history.cli --output out/reportLocal sources only:
python -m copilot_chat_history.cli --output out/reportLocal sources plus science (Cursor, Claude Code, Codex, Copilot CLI):
python -m copilot_chat_history.cli --remote-defaults --output out/reportOpen out/report/index.html in a browser.
Schema probe only:
python -m copilot_chat_history.cli --probe-only --output out/probe| Host | Default local path | Science (--remote-defaults) |
Canonical artifact |
|---|---|---|---|
| VS Code / Copilot | ~/Library/Application Support/Code |
— | workspaceStorage/*/chatSessions/*.json |
| Cursor | ~/.cursor/projects |
science:~/.cursor/projects and ~/.cursor/plans |
agent-transcripts/**/*.jsonl |
| Claude Code | ~/.claude/projects |
science:~/.claude/projects |
projects/*/*.jsonl |
| Codex | ~/.codex/sessions |
science:~/.codex/sessions |
rollout-*.jsonl |
| Copilot CLI | ~/.copilot/session-state |
science:~/.copilot/session-state |
*/events.jsonl |
Remote sync skips secrets (auth.json), SQLite WAL files, Codex debug logs, and Copilot CLI rewind backup blobs. Code diffs are taken from the session transcripts themselves (Codex FileChange.unified_diff, Copilot CLI edit / apply_patch / create).
| Flag | Description |
|---|---|
--source PATH |
Source root to scan. Can be passed multiple times. Defaults to standard VS Code / Cursor / Claude / Codex / Copilot locations. |
--remote HOST:PATH |
Sync a remote path before scanning, e.g. science:~/.codex/sessions. Repeatable. |
--remote-defaults |
Include default science paths (Cursor, Claude Code, Codex, Copilot CLI). |
--remote-host |
SSH host alias used with --remote-defaults (default: science). |
--remote-refresh |
Delete cached remote data before syncing. |
--output PATH |
Output directory for the HTML report (required). |
--probe-only |
Only run schema probing and write schema_probe.json. |
--redact-paths |
Redact filesystem paths in the rendered report. |
--no-redact-secrets |
Disable token and secret redaction (enabled by default). |
- Host (
VS Code / Copilot,Cursor,Claude Code,Codex,Copilot CLI) - Source type (chat session, agent transcript, Claude/Codex/Copilot CLI session, subagents)
- Date bucket (Today, Yesterday, This week, month groups)
- Workspace path fragment (local or remote path)
- SSH / remote host fragment
- Keyword search across titles and message previews
- Start / end date
After a full extraction to --output out/report:
out/report/index.html— browsable offline reportout/report/data/summary.json— full extracted conversation dataout/report/data/schema_probe.json— discovered storage shapesout/report/.remote-cache/— rsynced remote artifacts (gitignored)
Tool calls, thinking traces, and code edits are hidden by default; expand each assistant message to view them.
The generated report contains your real chat history, workspace paths, and possibly API tokens from pasted content. By default, common secret patterns are redacted in the HTML output. Keep reports local and do not commit them to a public repository. Use --redact-paths if you want to hide filesystem paths in shared screenshots or exports.
MIT — see LICENSE.
