Skip to main content

ClaudeTimeline

Stop losing your conversation to terminal scrollback. A thin wrapper for claude --resume that dumps the session's chat history to less -R before Claude Code starts, so you can scroll back through long conversations that would otherwise be gone.

Python 3.10+ License: MIT PyPI

The Problem

When you run claude --resume <session-id>, the terminal scrollback gets overwritten as Claude Code starts. If you scroll up to find context from earlier in the conversation, it's gone. For long sessions — multi-hour debugging marathons, complex refactors, design explorations — losing that history is painful.

The Solution

ClaudeTimeline installs a tiny claude shim on your PATH that intercepts --resume, dumps the session transcript to your terminal's pager (less -R with ANSI colors), and only then hands off to the real claude:

$ claude --resume 4779032a-...
    ┌──────────────────────────────────────────────┐
    │  ─── User ───                               │
    │  Please analyze this codebase...            │
    │                                              │
    │  ─── Assistant ───                           │
    │  [previous Claude response, in color]        │
    │                                              │
    │  ─── User ───                               │
    │  Now add OAuth support...                   │
    │  ...                                        │
    └──────────────────────────────────────────────┘
    (press q to exit less)
[Claude Code starts with full history visible]

Bare claude (no --resume) is passed through with zero overhead.

Install

pipx install claude-resume-dump   # recommended: isolated env, adds to PATH
# or
pip install --user claude-resume-dump

Then install the shim:

claude-resume-dump install
# → Shim written to ~/.local/bin/claude
# → Add ~/.local/bin to your PATH if not already (the command prints the export line)

Verify:

which claude                   # should print ~/.local/bin/claude
claude-resume-dump --version

Quickstart

# 1. Find a session to resume
claude-resume-dump list
# SESSION_ID                          MTIME               MSGS  PATH
# 4779032a-2cf3-4564-b24d-...        2026-06-08 11:53    110   ...

# 2. Resume it — history is dumped to less first
claude --resume 4779032a-2cf3-4564-b24d-15438c83b3c5

# 3. Or inspect without launching
claude-resume-dump show 4779032a-2cf3-4564-b24d-15438c83b3c5 | less -R

# 4. Search across all your sessions
claude-resume-dump grep "OAuth"

# 5. Export a session as markdown
claude-resume-dump export 4779032a-2cf3-4564-b24d-15438c83b3c5 --output session.md

Subcommand reference

Command Purpose
install [--target-dir PATH] Install the claude shim.
uninstall [--target-dir PATH] Remove the shim.
dump <encoded-cwd> <resume-id> [--no-color] Render a session to stdout (used by the shim).
list List recent sessions in the current project.
show <session-id> [--cwd PATH] [--no-color] Render one session.
grep <pattern> [--cwd PATH] Substring search across all sessions.
export <session-id> --output PATH [--cwd PATH] Markdown export.

The --cwd flag uses the Claude Code project encoding (slashes and spaces become dashes). For most users the auto-detection from pwd is correct.

How it works

The shim is a 50-line bash (or Windows .cmd / .ps1) script that:

  1. Checks if $@ contains --resume.
  2. If not: execs the real claude "$@" — zero overhead, transparent.
  3. If yes: extracts the resume ID, computes the encoded cwd (same scheme Claude Code uses for ~/.claude/projects/), calls claude-resume-dump dump <encoded-cwd> <resume-id> | less -FRX, then execs the real claude --resume <id> "$@".

The dump subcommand reads ~/.claude/projects/<encoded-cwd>/<resume-id>.jsonl, parses out user/assistant messages, and prints them with ANSI colors. tool_use and thinking blocks are filtered out — only the actual conversation renders.

Platform notes

OS Shim flavor Install dir (default)
Linux / macOS POSIX bash ~/.local/bin/claude
Windows cmd.exe batch %LOCALAPPDATA%\Programs\claude-timeline\claude.cmd

PowerShell flavor is shipped (claude.ps1) but not auto-installed on Windows. To use it manually, point your PowerShell profile's $env:PATH at the PowerShell shim location.

Troubleshooting

claude-resume-dump: command not found — your pipx/pip install dir isn't on PATH. Re-run claude-resume-dump install and follow the printed export PATH=... line.

Permission denied when running claude after install — the shim isn't executable. Fix: chmod +x ~/.local/bin/claude.

History dump is empty — your session ID is wrong, or the .jsonl file was rotated. Run claude-resume-dump list to find valid IDs.

claude is the wrong binary (still the real one, not the shim) — your shell is hashing claude from a different PATH entry. Verify with which -a claude; the shim should come first.

Want to uninstall — claude-resume-dump uninstall removes the shim and the persisted config. The real claude binary is untouched.

Development

git clone https://github.com/yourname/claude-timeline
cd claude-timeline
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"

pytest                  # 54 tests, ~1s
ruff check src/ tests/
ruff format src/ tests/
mypy src

Project layout follows the standard src/ layout for hatchling:

src/claude_timeline/
  __init__.py        # version
  cli.py             # Click commands (7 subcommands)
  jsonl_parser.py    # .jsonl → list[Message]
  render.py          # list[Message] → ANSI string
  shim.py            # shim template + install/uninstall
  config.py          # XDG/Roaming TOML config

tests/
  test_jsonl_parser.py   # uses tests/fixtures/real-session.jsonl
  test_render.py
  test_config.py
  test_shim.py
  test_cli.py            # Click CliRunner integration
  fixtures/real-session.jsonl

See docs/001-claude-timeline-prd.md for the full design rationale and docs/progress.md for current phase status.

License

MIT — see LICENSE.

Metadata

Release files for claude-resume-dump 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for claude-resume-dump 0.1.4
File Size Uploaded Provenance
claude_resume_dump-0.1.4.tar.gz 44.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for claude-resume-dump 0.1.4
File Interpreter ABI Platform
claude_resume_dump-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 60.0 kB

Release files / claude_resume_dump-0.1.4.tar.gz

Download URL claude_resume_dump-0.1.4.tar.gz
Size 44.1 kB
Tags Source
SHA-256 checksum
How to use checksums
ad5d76b08ff8b1a899ebc715f9f76c6b825797c88f0d4b96299621f1abc37af0
BLAKE2b-256 checksum
How to use checksums
b6996430102592bded848f21617d5ebe0148a248dadc479dfb6fa042526da98f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / claude_resume_dump-0.1.4-py3-none-any.whl

Download URL claude_resume_dump-0.1.4-py3-none-any.whl
Size 15.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7b03e8b0e65be297f1c763931d9d76ada9d0fd893d7be89c4eac69afffee1377
BLAKE2b-256 checksum
How to use checksums
8a15f00433f874e1c86f6817a4955fe56af4eafe91de31279e93c76082c6ec74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Security for claude-resume-dump 0.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page