Export Cursor / Claude Code / Codex chats and build a git-tracked, LLM-friendly project timeline.
Project description
chat-timeline
Export chat history from Cursor, Claude Code, and Codex and build a git-tracked, LLM-friendly project timeline.
The result is three artifacts that live inside your repo:
timeline/timeline.md— chronological, compact, ready for an LLM to read.timeline/contents/timeline.json— referenced content keyed by entry ID.timeline/sessions/session.md— full chat exports + git index context.
A built-in git pre-commit hook keeps the timeline in sync with your commits automatically.
Works on Windows, macOS, and Linux. Pure stdlib — no runtime dependencies.
Install + configure (one command)
pipx install chat-timeline && timeline init
pipx not available? The equivalent is:
python -m pip install --user chat-timeline && timeline init
timeline init is idempotent and does everything for you:
- Resolves the project root (
git rev-parse --show-toplevel). - Creates
timeline/withchats/,sessions/,contents/, and the archive folder. - Writes
timeline/.gitignoreand a managed block in the project's.gitignore. - Installs
LLM_INSTRUCTIONS.mdfor downstream prompts. - Installs the git pre-commit hook (calls
timeline -pon each commit).
To reverse: timeline deinit removes the hook and the managed .gitignore
block. Your exported data is left untouched.
Daily use
timeline # interactive selector → exports + session + timeline
timeline claude # claude only
timeline cursor 1-5 # cursor chats #1..#5
timeline -t # rebuild timeline only (incremental)
timeline -t -rt # rebuild timeline from scratch
timeline -p # pre-commit standalone (auto-detects modified chats)
Equivalent: python -m chat_timeline ….
Full flag reference: timeline --help.
Interactive selector keys
| Key | Action |
|---|---|
↑ ↓ |
move pointer |
PgUp PgDn |
page |
Home End |
jump to first/last |
Space |
toggle chat (or entry, when expanded) |
→ |
expand chat to entries |
← |
collapse / jump back to parent |
a |
toggle select-all |
t |
cycle tracking mode (chat) or toggle exclude/force-add (entry). Hold 3s to clear tracking. |
p |
toggle pre-commit auto mode |
o |
toggle timeline archive rotation for this run |
h |
toggle "hot entries only" filter |
Tab |
switch list ↔ numeric input |
Enter |
confirm · Esc cancel |
What it reads (per source)
| Source | Storage location | Notes |
|---|---|---|
| Cursor | %APPDATA%/Cursor/User/workspaceStorage/ (Win), ~/Library/Application Support/Cursor/User/workspaceStorage/ (mac), ~/.config/Cursor/User/workspaceStorage/ (linux) |
SQLite |
| Claude Code | ~/.claude/projects/<slug>/*.jsonl |
Cross-runtime: Windows reads WSL data, WSL reads Windows data |
| Codex | ~/.codex/sessions/**/*.jsonl |
Same cross-runtime discovery |
Nothing is transmitted anywhere. Everything runs locally on your machine.
Configuration
| Env var | Effect |
|---|---|
TIMELINE_PROJECT_ROOT |
Override the auto-detected git toplevel. |
TIMELINE_HOME |
Override the default <project>/timeline location. |
TIMELINE_AMEND |
Set by the pre-commit hook on git commit --amend. |
Pre-commit hook details
The hook is a POSIX shell script that:
- Detects
git commit --amendfrom the parent process'scmdline. - Calls the installed
timelineentry point, with fallbacks topython -m chat_timelineandwsl.exe timeline. - Stages any updated timeline files into the commit.
On Windows it runs under Git Bash (which ships with Git for Windows).
Status
v0.1.0 ships a working CLI based on a vendored monolithic implementation
(chat_timeline._legacy). v0.2.0 will split it into clean modules
(sources/, tui/, session.py, timeline.py) without breaking the CLI or
the on-disk format.
Contributing
See CONTRIBUTING.md. Bug reports welcome — please include
the output of timeline --version and your OS + Python version.
License
MIT. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file chat_timeline-0.1.1.tar.gz.
File metadata
- Download URL: chat_timeline-0.1.1.tar.gz
- Upload date:
- Size: 55.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ee2142b4661e0a6ae80872535dbf87c9b3e218be9ef8e253615dd57197a7363
|
|
| MD5 |
c58974ae96b9a034b6f7e10c1b59aaa5
|
|
| BLAKE2b-256 |
c6d8a8388f531fd8e69bcd87fc5840dc57db8b581ac33ac4af1cad5b017384cc
|
Provenance
The following attestation bundles were made for chat_timeline-0.1.1.tar.gz:
Publisher:
release.yml on fredfts/chat-timeline
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
chat_timeline-0.1.1.tar.gz -
Subject digest:
0ee2142b4661e0a6ae80872535dbf87c9b3e218be9ef8e253615dd57197a7363 - Sigstore transparency entry: 1660834170
- Sigstore integration time:
-
Permalink:
fredfts/chat-timeline@982b40431fef2dac4bb2a7c7927d90da0c0ec7e5 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/fredfts
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@982b40431fef2dac4bb2a7c7927d90da0c0ec7e5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file chat_timeline-0.1.1-py3-none-any.whl.
File metadata
- Download URL: chat_timeline-0.1.1-py3-none-any.whl
- Upload date:
- Size: 63.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
213cb7bd17dc617962ddee6a0eed0d88114a454698b1a26ed92014526afc6ca3
|
|
| MD5 |
d83908eda1a5dda57e3f1a8aa53dcc36
|
|
| BLAKE2b-256 |
f1d4c5a32c6f3612f596db564f5cdca7012dedb03951b72b99caf3befe24da85
|
Provenance
The following attestation bundles were made for chat_timeline-0.1.1-py3-none-any.whl:
Publisher:
release.yml on fredfts/chat-timeline
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
chat_timeline-0.1.1-py3-none-any.whl -
Subject digest:
213cb7bd17dc617962ddee6a0eed0d88114a454698b1a26ed92014526afc6ca3 - Sigstore transparency entry: 1660834255
- Sigstore integration time:
-
Permalink:
fredfts/chat-timeline@982b40431fef2dac4bb2a7c7927d90da0c0ec7e5 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/fredfts
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@982b40431fef2dac4bb2a7c7927d90da0c0ec7e5 -
Trigger Event:
push
-
Statement type: