Skip to main content

Grep every Claude Code session you've ever run.

Project description

cc-transcript

Grep every Claude Code session you've ever run. The lossless Rust parser reads Claude Code's on-disk JSONL at 169 MB/s; the compiled CLI greps it and renders one line per event, 25 ms cold.

CI PyPI License PolyForm Noncommercial

Get started

uvx cc-transcript list

Every session is already on disk under ~/.claude/projects. list finds them newest first, and stats collapses one into a screenful:

Terminal running 'uvx cc-transcript stats' — one session summarized as counts, kinds, models, and tool names

Driving with an agent? Paste this:

/plugin marketplace add yasyf/cc-transcript
/plugin install cc-transcript@cc-transcript

The plugin's skill teaches Claude to answer "what did I ask you yesterday" from its own history, funneling through the CLI instead of reading raw JSONL.

No Claude Code? Point any agent at the CLI
Use `uvx cc-transcript` to investigate my Claude Code sessions: `list` finds
transcripts on disk, `stats` summarizes one, `grep` searches content, and `show`
renders one compact line per event. Start by listing my newest sessions and
summarizing the most recent one. Docs: https://yasyf.github.io/cc-transcript/

Use cases

Ask Claude what you asked Claude yesterday

Yesterday's session is a megabyte of JSONL, and pasting it into a chat blows the context window. Render the spine instead:

uvx cc-transcript show --signal --tail 20 ~/.claude/projects/<project>/<session>.jsonl

--signal keeps only the substantive user and assistant turns. One line per event, a few hundred tokens for the whole exchange. With the plugin installed, skip the command and ask Claude directly; its skill runs this funnel for you.

Find the session where you fixed that bug

The fix happened weeks ago, in one of a few hundred transcripts. Search them all:

uvx cc-transcript grep "TranscriptExpiredError" --project cc-transcript

Hits print under their transcript's path, each line carrying its raw event index; feed an index back into show --range to re-read the conversation around the fix. grep searches your newest 50 transcripts by default; --all takes it to every session on disk, and a no-match run exits 1 so it scripts cleanly.

Debug a token blowup from transcript evidence

A session burned through the context window and you want the culprit, not a guess. Rank the evidence:

uvx cc-transcript stats --per-file --project myapp

Each block reports text, thinking, and tool-io bytes plus per-tool call counts; the blowup stands out as an outsized tool io line. Then grep --tool <name> --with-result pins it to the exact calls.

Script it from Python

The CLI's funnel is four commands; your own tooling wants the events themselves. parse turns a path into a Transcript of typed lazy views, with the noise already dropped inside the engine:

from cc_transcript import NOISE_SPEC, discover, parse

transcript = parse(discover()[0], drop=NOISE_SPEC)
print(len(transcript.events), "events after the noise drop")

discover() lists every transcript on disk newest first, stream fans a whole corpus across the parse pool, and resolve finds one session by UUID. parse also reads OpenAI Codex CLI rollouts — hand it a path from ~/.codex/sessions and the same typed events come back. The getting-started guide builds this out to a composed filter and a sentiment score.

JSON output schema

show --json and grep --json emit JSONL, with one object per event. Each event uses the envelope {i, kind, meta, model, text, blocks, stop_reason, usage}; fields that do not apply to its kind are omitted. Every object in blocks has a type discriminator such as text, thinking, tool_use, tool_result, or fallback.

More in the docs

  • The Python library turns a transcript into typed lazy views, a composed filter, and a score in a dozen lines.
  • Filtering events covers composable clauses, specs, and the ready-made NOISE_SPEC.
  • Sentiment scoring buckets conversations and scores them around any inference engine.
  • Feedback mining runs detectors, confidence calibration, and LLM verdict passes over your corpus.
  • The Rust engine is the implementation — parsing, filtering, scoring, and mining — its correctness pinned by hand-owned literals and golden fixtures.
  • Codex rollouts make the parser two-provider: OpenAI Codex CLI sessions lower into the same typed events, with rollout discovery, subagent joins, and per-session lifecycle and token totals. list --provider codex finds them from the shell.
  • API reference documents the complete typed surface, from TranscriptEvent to SessionActivity.

Read the docs for the full guide. Licensed under PolyForm Noncommercial 1.0.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cc_transcript-14.14.0.tar.gz (12.2 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

cc_transcript-14.14.0-cp313-abi3-manylinux_2_28_x86_64.whl (28.0 MB view details)

Uploaded CPython 3.13+manylinux: glibc 2.28+ x86-64

cc_transcript-14.14.0-cp313-abi3-manylinux_2_28_aarch64.whl (27.7 MB view details)

Uploaded CPython 3.13+manylinux: glibc 2.28+ ARM64

cc_transcript-14.14.0-cp313-abi3-macosx_11_0_x86_64.whl (27.8 MB view details)

Uploaded CPython 3.13+macOS 11.0+ x86-64

cc_transcript-14.14.0-cp313-abi3-macosx_11_0_arm64.whl (27.6 MB view details)

Uploaded CPython 3.13+macOS 11.0+ ARM64

File details

Details for the file cc_transcript-14.14.0.tar.gz.

File metadata

  • Download URL: cc_transcript-14.14.0.tar.gz
  • Upload date:
  • Size: 12.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for cc_transcript-14.14.0.tar.gz
Algorithm Hash digest
SHA256 9bc7f4a5e2e6600665d1a39dfe03c874aa446b008d2e6e19af03a7c4634e9c90
MD5 224046cab08f8f1d078a50ff1228ca4d
BLAKE2b-256 862101e91fde7c4def3c6d22636ea0ed34748d8bf23033957f573ccd3714a843

See more details on using hashes here.

Provenance

The following attestation bundles were made for cc_transcript-14.14.0.tar.gz:

Publisher: release-pypi.yml on yasyf/cc-transcript

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cc_transcript-14.14.0-cp313-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cc_transcript-14.14.0-cp313-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 eca09c283250c1a18cce3098ea99f2955cdf7d4569516fbf31246e391f457708
MD5 dee56709116ec490a6503e0923c16578
BLAKE2b-256 48f080d60a58eee67dbb9997828588b574fc8bd91f4a4e393dbc0e969a9def2f

See more details on using hashes here.

Provenance

The following attestation bundles were made for cc_transcript-14.14.0-cp313-abi3-manylinux_2_28_x86_64.whl:

Publisher: release-pypi.yml on yasyf/cc-transcript

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cc_transcript-14.14.0-cp313-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for cc_transcript-14.14.0-cp313-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 a5e870ad4a15b4cc44579e73024820750aa81f9041af6a1d896384c386285b4a
MD5 083efa08e7243ac553fad46ad837d576
BLAKE2b-256 02a21cad47dca590009a0a5dcc7234daa5b08647dc08dbd57c4e4d1651909f9b

See more details on using hashes here.

Provenance

The following attestation bundles were made for cc_transcript-14.14.0-cp313-abi3-manylinux_2_28_aarch64.whl:

Publisher: release-pypi.yml on yasyf/cc-transcript

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cc_transcript-14.14.0-cp313-abi3-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for cc_transcript-14.14.0-cp313-abi3-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 4063846cdac222d93fb420ab5a6b1658953f80d6232f6fd78e6135d4a73f8e93
MD5 686f426ee25c0782a5a67ddaf0d1ab91
BLAKE2b-256 3b725c7e1fdcf8b75e9b1d5398a2fbe4db557cde7e2301224ad3f1250884fc66

See more details on using hashes here.

Provenance

The following attestation bundles were made for cc_transcript-14.14.0-cp313-abi3-macosx_11_0_x86_64.whl:

Publisher: release-pypi.yml on yasyf/cc-transcript

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cc_transcript-14.14.0-cp313-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cc_transcript-14.14.0-cp313-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2ac7cb6686716fd9ef853f5dbc2f828c1cf3d96061bd31e74f6f74a1a7abf8a9
MD5 647cca36062cf8ec990c230fe7811642
BLAKE2b-256 77040ead7c381e877799ee7450cb318747d6e34685a0479044df60e65cc103d9

See more details on using hashes here.

Provenance

The following attestation bundles were made for cc_transcript-14.14.0-cp313-abi3-macosx_11_0_arm64.whl:

Publisher: release-pypi.yml on yasyf/cc-transcript

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page