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.1.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.1-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.1-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.1-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.1-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.1.tar.gz.

File metadata

  • Download URL: cc_transcript-7.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 cd7056e7919ce6384629498bc14486653ffd6487cb3402ae465b0adf85835ec5
MD5 45c95dc2311f4d1ac06154338e1b67f7
BLAKE2b-256 fed4bb442ae80bf836dfe1c00067e625663e8327fbb9531c15942255ccf943b2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cc_transcript-7.0.1-cp313-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d99ecba2431fd68ab6cd81e6c6c4618fe857ae5311ab32126e2dc425f30e1686
MD5 5f757a2476093e884d81499add444183
BLAKE2b-256 9d0702103e238c8018ffc62f8f48f97c1fc3a6ec61b45d605982aecc06981532

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cc_transcript-7.0.1-cp313-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 bfaefea64eff1e56eb898765d2df6f4bd943e106f5f92fab8ae4242bbbe66817
MD5 289ff80034f591783d0d2fb4153060dd
BLAKE2b-256 f7be7063a13d4785a897df9779581b4718453f748fcd98a6a5f559b293d436b9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cc_transcript-7.0.1-cp313-abi3-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 294a3a0f8886995b58c5c8d9459ebaadf34b30b27055d7ba7e48057a7b5173c9
MD5 d066f436c38ab7e624d744df0c69cedd
BLAKE2b-256 8b110a94614e514d57a668c653e321175103a3ae2bf05157fdf738600e399239

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cc_transcript-7.0.1-cp313-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3232c5ca189fbf4973037473f85d9edc79e912d00871120e27bac0bdd5b2c5e4
MD5 eecdb4acd7c916825b14054f4add304f
BLAKE2b-256 1bc38ca3391f9d1936fc855e3b44e6735e0844ec9c7f606244abc8b4e94df035

See more details on using hashes here.

Provenance

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