Export a chosen coding conversation into readable messages and a provenance ledger without copying every internal event.
Python 3.11+. Run from this checkout:
python -m pip install -e .
codex-session-transcript-exporter examples/synthetic_session.jsonl output/demoInput: The included synthetic session mixes readable messages with events the default export omits.
Result: output/demo contains transcript.md, events.jsonl and manifest.json, including a source content hash and explicit export settings. Existing output is preserved.
Inspect the complete synthetic transcript, event ledger, and manifest. The walkthrough explains how their source lines fit together.
Explicit event selection creates a readable transcript and a compact ledger from the same source. Generic speaker labels and secret-shape redaction reduce unnecessary exported detail. Opted-in payloads omit images and encrypted_content keys recursively, including inside lists.
Source: codex_session_transcript_exporter/exporter.py, examples/synthetic_session.jsonl, tests/test_exporter.py.
Replace only the input argument with the chosen session file. Use codex-session-transcript-exporter --help to inspect opt-in event selection; never bulk-export a private session directory by default.
Default support covers the user_message and agent_message event shapes in the fixture. Tool/status inclusion is explicit. Message minimization does not anonymize the actual words; inspect exports before sharing.
Owned code is available under the MIT license.
The useful unit is one intentionally chosen session file. Source line numbers preserve traceability even when events are omitted: line 1 in the fixture is session metadata; readable messages retain their original line positions. include_tools and include_status add only the explicitly listed event types in exporter.py. Unsupported event shapes count as skipped; an empty transcript does not prove the session had no conversation.
A cutoff includes the matching user message and stops reading after it. Its manifest hash identifies the whole source file, while skipped_events counts only lines visited before the cutoff. Invalid JSON reports its source line; existing nonempty output is refused. Choose a new output directory for each export.
This public continuation is described in Origin. A useful future extension would add fixtures and explicit mappings for additional event schemas; no such support is implied today. For chronologically ordering and labeling ChatGPT export messages, see Conversation Target Tagger.