AI/Coding/Tool/Q/Are there options for exporting conversation history from AI coding agent CLIs into git for storage?
- Short answer: Three community tools cover the cross-tool gap (none of the four CLIs has a first-party "commit chats to this repo" command). convx is the best default for git storage of per-session transcripts; chat-timeline if you want a commit-coupled project narrative; session-report if you need Copilot CLI coverage or one-shot document export / clipboard paste across tools.
Comparison
- convx — archive-in-repo (PyPI
convx-ai)- Primary job: sync sessions into a git tree
- Git: writes under
.ai/history/; optional pre-commit hook (convx hooks install); backup to a separate history repo - Providers: Claude, Codex, Cursor, Gemini — not Copilot CLI
- Output: per-session Markdown + hidden JSON under
.ai/history/<user>/<source>/ - Re-sync: idempotent via fingerprint index in
.convx/index.json - Redaction: on by default; sanitize keywords in
.convx/config.toml - Install:
uvx --from convx-ai convx sync (Python ≥3.11) - Extra:
explore TUI, stats, skip marker CONVX_NO_SYNC - Maturity: PyPI 0.2.7; ~37★
- chat-timeline — narrative alongside commits
- Primary job: build a git-tracked project timeline
- Git:
timeline init creates timeline/, manages .gitignore, installs a pre-commit hook - Providers: Claude, Cursor, Codex — no Gemini, no Copilot CLI
- Output: compact
timeline/timeline.md (LLM-oriented) + contents/ + full sessions/ exports - Re-sync: incremental rebuild (
-t); pre-commit auto - Redaction: managed gitignore of cache; no advertised secret redactor
- Install:
pipx install chat-timeline (stdlib runtime) - Extra: interactive TUI selector for which chats to include
- Maturity: v0.2.0; 0★ — youngest / least starred of the three
- session-report — widest export, weakest git story (GitHub)
- Primary job: export / copy sessions as documents
- Git: none — write files then
git add yourself - Providers: Claude, Codex, Cursor, Gemini, OpenCode, and GitHub/CoPilot/CLI (
~/.copilot/session-state/**/*.jsonl) — only tool of the three with Copilot - Output: combined or split MD / JSON / DOCX under
./session-reports - Re-sync: re-export on demand (no sync index)
- Redaction: none advertised
- Install:
npm i -g session-report (Node ≥20) - Extra:
scan / list / copy for pasting context into another agent mid-rate-limit - Maturity: npm 1.0.11; ~5 weekly downloads
Pick by goal
- Keep transcripts in this project's git history, periodically: convx.
- Auto-refresh a project timeline on every commit: chat-timeline.
- Include Copilot CLI, or export/share without a sync workflow: session-report.
- All four CLIs named in the question: no single tool covers Claude + Codex + Cursor + Copilot; closest is session-report (has Copilot) plus convx or chat-timeline for the other three's git-shaped sync.
Caveats (all three)