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

File metadata

  • Download URL: cc_transcript-7.1.0.tar.gz
  • Upload date:
  • Size: 146.0 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.1.0.tar.gz
Algorithm Hash digest
SHA256 aff11654cd6c6b2b03cccf41ba5749e7f1be13437cc30bf66a4786be0f482cdd
MD5 c3ccf7565f796a9af84e0f1d81cdea5d
BLAKE2b-256 5a47e97d90335fc189c49aa8e872a3094bde361e04446b91337bbdcf8fa4788c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cc_transcript-7.1.0-cp313-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 af52fd7bb8551464c62f79655e17c8a226bcf8e0474ed9fa756792a82e757dd0
MD5 060e3e16d3f37a194a76cb4aa9fc9263
BLAKE2b-256 33b5e57e8840eb0bc28ae1709dbfa1a85a528aba90e54eb77a614a1a72ca492e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cc_transcript-7.1.0-cp313-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 37773e09c22bf0ec55154cb221aac985250408630c0667635c2186c20e6f40d7
MD5 5f54d6b1b8955db336e4c2a986879ec9
BLAKE2b-256 fc1300468a3a0ece19a86edb3d565c9b8c6fd4d0211c51889e9d125de0f737fb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cc_transcript-7.1.0-cp313-abi3-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 6140ffc3a740954309c068d8afca0740d5ac7ae5f58a8152f50a26c11b2d7300
MD5 f1493fe3dc08d8b58e221ffb19de17e5
BLAKE2b-256 8c1fa3dfb218e2af778cfdd32bde7a9b3e7a8e6e28628dae78b89f7678bb2e1f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cc_transcript-7.1.0-cp313-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6725823c488233e7be5ea9ed6ecd0b8654c05c3ae89ee1617fbbfc5aeac006c0
MD5 6a5747e5841ebda885b1d6e7f30f1288
BLAKE2b-256 44b0e243aadfb8985db73b71bd0f5acb1bd6b3e6e66c50784be90110344fde5e

See more details on using hashes here.

Provenance

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