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-6.0.0.tar.gz (146.1 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-6.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-6.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-6.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-6.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-6.0.0.tar.gz.

File metadata

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

File hashes

Hashes for cc_transcript-6.0.0.tar.gz
Algorithm Hash digest
SHA256 f111ee1af581311aee10ef7cdead8780aee5799e516a53c5d7e5ec09da7b11b8
MD5 a030851342781094dafa95a8b45dc1c8
BLAKE2b-256 469baaa7484dcf24fb08d0aca069835e5f081194cce769fc98af2ff0727f3785

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cc_transcript-6.0.0-cp313-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3492c835f331833779817fcee40064597d7660c7911fc7c1c48d7ede534b96de
MD5 fc4986c0cc069a7a5448b45058fe6321
BLAKE2b-256 b006e95c32575d7b8ea14e7153818b6fcdddd0bc21450e7e680ee774b6224fb9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cc_transcript-6.0.0-cp313-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 3f374a57ecf818a9b148b3fe3e332f346826d91f64cb4a17152924c60447ee61
MD5 dfa78d8ad7a67f400501201e59d91792
BLAKE2b-256 43546068c776cdff9e143f35270521ec6f2d069f1e6e8dc0229a0ca4bd805685

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cc_transcript-6.0.0-cp313-abi3-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 10102a5bbe408b29b81cbeaf3b433494bb111e1172dc320353615496e82564ad
MD5 0b354817fcbd56efaf8f534655b4b485
BLAKE2b-256 2f95e0097b8d849b52850315c6875f81158a10a307bd6ca9dee85ee497900a37

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cc_transcript-6.0.0-cp313-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e4decb97669e5c508535e8bf9d34c3eea4c4d7326717923e7533ae02ff936879
MD5 f4711f8b09ac528510d98b92e405a6dc
BLAKE2b-256 aec35bdb4964c668c43a19889acfae87da78ded7b6e801d20402317f05e3a27e

See more details on using hashes here.

Provenance

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