TranscriptDiscovery

Locates Claude Code transcript files on disk.

Usage

Source

TranscriptDiscovery()

Transcripts live as *.jsonl files under CLAUDE_PROJECTS_DIR (~/.claude/projects), one directory per project plus subagents/ sidechain files.

Methods

Name Description
find_in() Finds transcripts under directory newer than known mtimes.
find_transcripts() Returns every transcript under the projects directory, sorted.
transcript_mtime() Returns path’s modification time, raising if it cannot be read.

find_in()

Finds transcripts under directory newer than known mtimes.

Usage

Source

find_in(directory, *, name_contains=None, limit=None, known_mtimes=None)
Parameters
directory: Path

The directory to search recursively.

name_contains: str | None = None

When set, keep only files whose name contains it.

limit: int | None = None

When set, return at most this many paths.

known_mtimes: dict[str, float] | None = None
Map of path string to last-seen mtime; a file is kept only when absent from the map or modified since.
Returns
list[tuple[Path, float]]
Pairs of (path, mtime) sorted by path.

find_transcripts()

Returns every transcript under the projects directory, sorted.

Usage

Source

find_transcripts()

transcript_mtime()

Returns path’s modification time, raising if it cannot be read.

Usage

Source

transcript_mtime(path)