outdex
v1.0.1
Published
Convert Codex session logs (JSONL) into clean markdown -- copy to clipboard or save as a file.
Readme
outdex
Convert Codex session logs (JSONL) into clean markdown -- copy to clipboard or save as a file.
Codex (OpenAI's coding agent) stores session logs as JSONL files under ~/.codex/sessions/. These files contain full interaction history but aren't human-readable. outdex lets you search sessions by text, pick a match, and export a clean markdown transcript.
Install
npm install -g outdexOr run without installing:
npx outdex "your search term"Usage
Search for a session
outdex "refactor the auth module"Searches all sessions for the given text (case-insensitive). If one session matches, it selects automatically. If multiple match, you get a picker:
Found 3 matching sessions.
Matching sessions:
1) 2026-02-04 16:11:59 rollout-2026-02-04T16-11-59-019c28fe...
2) 2026-02-05 14:41:06 rollout-2026-02-05T14-41-06-019c2dd2...
3) 2026-02-06 09:14:49 rollout-2026-02-06T09-14-49-019c31cd...
Select a session (number):List all sessions
outdexRunning with no arguments lists every session and lets you pick one.
No matches
outdex "xyznonexistent"
# No sessions found matching: "xyznonexistent"Output options
After selecting a session, you choose how to export it:
Output:
1) Copy to clipboard
2) Save as markdown file
Choose (1/2):Skip the prompt with flags:
outdex "search term" --copy # or -c: straight to clipboard
outdex "search term" --file # or -f: save as markdown file in current directoryThe file is saved as codex-session-YYYY-MM-DD-HH-MM-SS.md in your current working directory.
Markdown format
The output includes:
- A header with session date, model, working directory, and git branch
## Userand## Assistantsections for each message- Internal entries (reasoning, function calls, token counts) are skipped
Example output:
# Codex Session: 2026-02-04
- **Model:** openai (CLI 0.94.0-alpha.10)
- **CWD:** /Users/you/project
- **Branch:** main
---
## User
deeply analyse our project to fully understand it
---
## Assistant
This is a PNPM monorepo with a family of Cloudflare Agent integration packages...Environment
- Session location:
~/.codex/sessions/(override with$CODEX_HOME) - Clipboard: uses
pbcopy(macOS),xclip(Linux), orclip(Windows). Falls back to stdout if unavailable. - Dependencies: none -- uses only Node.js built-ins.
License
ISC
