codex-transcriber
v0.0.6
Published
Codex セッション の 会話 を TUI で 抽出 する ツール
Readme
codex-transcriber
A TUI tool to browse Codex session JSONL files and export them as Markdown.
Languages
- English README:
README.md - 日本語 README:
README.ja.md
Requirements
- Node 18 or later
Setup
npm installRun
npm startOr:
node src/cli.jsEnvironment variables
CODEX_SESSIONS_DIRsets the sessions directory- Default is
~/.codex/sessions
Key bindings
- Quit:
q - Switch focus:
Tab(left),1(left),2(right) - Left pane move:
jkgGfbArrowUpArrowDown - Resume in Codex:
c(left pane) - Right pane scroll:
jkgGfbArrowUpArrowDownCtrl+uCtrl+d - Toggle view:
m(Markdown or Pretty) - Export:
eto start,Enterto save,Escto cancel
Internals
src/cli.jsboots the Ink renderer withAppsrc/app.jshandles TUI layout, session loading, and export
Session loading
- Recursively scans JSONL files under
CODEX_SESSIONS_DIR - Reads
session_metafrom the first line of each file - Builds the label from
session_meta.timestampor the timestamp in the file name - Sorts by file
mtimein descending order - Falls back to
session_meta.timestampand then file name timestamp whenmtimeis unavailable
Conversation extraction
- Reads JSONL line by line and prefers
event_msg - Treats
user_message,agent_message, andassistant_messageas conversation entries - Falls back to
response_itemwithmessage - Skips lines starting with
# AGENTS.md,<environment_context>,<permissions instructions>,<INSTRUCTIONS> - Appends
[image N]to user messages when images exist
Export
- Default output directory is
process.cwd() - File name uses the session id when present, otherwise the JSONL file name
- Output format is Markdown with
### Userand### Assistant
