Skip to main content

The Claude Code session-activity platform: a superset JSONL parser (Rust fast path, Python reference), typed tool calls with a cross-language content digest, turns/edits/evidence over one spine, context windows with labeled fidelity, unified decision and correction ledgers, LLM judging, and a transcript-investigation CLI.

Project description

cc-transcript

cc-transcript banner

PyPI Python Docs License: PolyForm Noncommercial

A non-lossy parser for Claude Code's on-disk JSONL transcripts, plus a CLI to investigate sessions.

cc-transcript parses Claude Code's JSONL transcripts into a typed superset event model — every entry type preserved, nothing dropped. The parser never silently discards sidechains, synthetic turns, tool results, or unrecognized entries; filtering is opt-in and lives in your code, not buried in the parser. It ships as a Python library, a uvx-runnable CLI, and a Claude Code plugin.

Install

uvx cc-transcript --help    # run the CLI

Quickstart

Discover the transcripts on disk, parse one, and walk the events:

import anyio

from cc_transcript import AssistantEvent, TranscriptDiscovery, UserEvent, parse_events_from_bytes

path = anyio.run(TranscriptDiscovery.find_transcripts)[0]
events = parse_events_from_bytes(path.read_bytes())

for event in events:
    match event:
        case UserEvent(text=text):
            print("user:", text[:80])
        case AssistantEvent(model=model, text=text):
            print(f"assistant ({model}):", text[:80])

Filtering is opt-in. Compose a spec from small builders and apply it — build_spec assembles clauses, apply_spec yields the survivors. NOISE_SPEC is a ready-made spec for universal structural noise (system reminders, local-command output, skill banners):

from cc_transcript import apply_spec, build_spec, keep_only, drop_junk, drop_short

spec = build_spec(keep_only("user", "assistant"), drop_junk("structural"), drop_short(2))
clean = list(apply_spec(events, spec))

CLI

Every command runs as uvx cc-transcript <command> ...; see --help on any command for its flags.

Command What it does
list Find transcripts on disk, newest first
stats Summarize a session — counts, kinds, models, tools, token sizes, span
show Render one compact line per event (--signal keeps the conversational spine)
grep Search event content; hit indexes feed back into show --range
slice Emit per-tool-call JSONL for a session UUID and time window (the bridge cc-review consumes)
digest Generate and check the cross-language fixture corpus for the tool-digest contract

The output is compact by design — one line per event, hard truncation — so an agent triages a session in a few hundred tokens instead of paging through megabytes of JSONL:

$ uvx cc-transcript stats ~/.claude/projects/-Users-yasyf-Code-cc-transcript/4c77d556-8694-4613-8f50-253d905da68e.jsonl
files        1
events       181
kinds        other 68 · assistant 53 · user 33 · mode 22 · system 5
models       claude-fable-5 53
tools        TaskCreate 10 · Agent 5 · Read 5 · TaskUpdate 5 · Bash 2 · ToolSearch 2 · AskUserQuestion 1 · ExitPlanMode 1
text         14.8KB
thinking     8.7KB
tool io      89.0KB
sessions     1
span         2026-06-12 01:07:55 → 2026-06-12 02:28:03
interrupts   0
tool errors  0
sidechain    0

Claude Code plugin

Install the bundled plugin from inside Claude Code:

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

The plugin's skill teaches Claude to answer questions about its own history — "what did I ask yesterday", "find the session where we fixed the parser" — by funneling through the CLI's list, stats, grep, and show commands instead of reading raw JSONL.

How it works

The event model is a superset: sidechains, <synthetic> turns, thinking blocks, and unrecognized entry types all survive parsing, so you decide what to drop via composable filter specs. Two engines sit behind one Backend protocol — RustBackend (PyO3 + rayon) is the default fast path, PythonBackend is the readable reference, parity-asserted against each other. On top of the spine, SessionActivity lifts events into turns and typed tool calls, FileStateStore tracks per-file mtimes in SQLite for incremental re-parses, and cc_transcript.mining/judge/sentiment extract feedback, run LLM verdict passes, and score conversational sentiment. The docs site covers each of these in depth.

Docs

Each section of the docs site is a focused guide:

License

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-7.0.0.tar.gz (145.7 kB view details)

Uploaded Source

Built Distributions

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

cc_transcript-7.0.0-cp313-abi3-manylinux_2_28_x86_64.whl (2.5 MB view details)

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

cc_transcript-7.0.0-cp313-abi3-manylinux_2_28_aarch64.whl (2.4 MB view details)

Uploaded CPython 3.13+manylinux: glibc 2.28+ ARM64

cc_transcript-7.0.0-cp313-abi3-macosx_11_0_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.13+macOS 11.0+ x86-64

cc_transcript-7.0.0-cp313-abi3-macosx_11_0_arm64.whl (2.3 MB view details)

Uploaded CPython 3.13+macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: cc_transcript-7.0.0.tar.gz
  • Upload date:
  • Size: 145.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cc_transcript-7.0.0.tar.gz
Algorithm Hash digest
SHA256 ef4156e5fb7512f2589666abc8541c0a9d89c5f82054daba2e806a642f1f2530
MD5 ff53c3bae512c8c181aa0deeb45b43c5
BLAKE2b-256 5d50d9ad4632dd340fdd8312b8c6737d0399d696671f30a42e94e6e9bc8fd056

See more details on using hashes here.

Provenance

The following attestation bundles were made for cc_transcript-7.0.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-7.0.0-cp313-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cc_transcript-7.0.0-cp313-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c97ba51cce9cb93d38e44b3657669c93853cd5f0a3f5f91b89e77edf06d52c99
MD5 44b38dbbbe861d9e49c090e1426ea626
BLAKE2b-256 24c45b2810c6c3876a80e20741d24369c382048d88883bced30f9d6afa4b5c56

See more details on using hashes here.

Provenance

The following attestation bundles were made for cc_transcript-7.0.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-7.0.0-cp313-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for cc_transcript-7.0.0-cp313-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 79bd6cd32314ea8d848df103495ab76edf1b6462e4d3772563210c321ae918fe
MD5 8d27e2bf8fa4f24e2e0e8b0e9bc8c430
BLAKE2b-256 e4c26fd50f644ee3b88df32407fe35db7f29aeb308d769c379cfe08e79f0fae3

See more details on using hashes here.

Provenance

The following attestation bundles were made for cc_transcript-7.0.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-7.0.0-cp313-abi3-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for cc_transcript-7.0.0-cp313-abi3-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 16c440d74ec1963e9a5e6a30d2cd909435d4182dea17bbceb508121c88e036df
MD5 7a8139ff02ce5644cdb40fb1d620efbf
BLAKE2b-256 2f2dbf3b9c9961af8491bdfdda3e751ecfff0ebbde8018d98ef88f525a4210e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for cc_transcript-7.0.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-7.0.0-cp313-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cc_transcript-7.0.0-cp313-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dd39df07c62a05a35f57e87aec9f8cc569e88241b9f2a383a2822ba6b2a41347
MD5 13135111474c5713549cc2de1b10fbaf
BLAKE2b-256 0fd6e2ac17ff4d129e8408703143747c25c41db69ebb7ac1d7ca599ed2f76d95

See more details on using hashes here.

Provenance

The following attestation bundles were made for cc_transcript-7.0.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