Skip to content

Commit 1bca120

Browse files
committed
v2.6.2: improve export destinations and session lookup
1 parent 50ca0be commit 1bca120

3 files changed

Lines changed: 391 additions & 17 deletions

File tree

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,3 @@ __pycache__/
44

55
# Backups & scratch
66
*.bak
7-
8-
# Local release helper — contains a personal access token, never commit
9-
create_release.py

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,16 @@ Because it’s a pure Python CLI tool, it's completely **portable**. You can use
3737
## ✨ Features
3838

3939
- **Project View & Pagination *(New in v2.6)*:** Just like Codex Desktop, your sessions are now grouped by **project** (their working directory). Toggle between a flat **All Sessions** list and a **Projects** view with a single key, drill into any project to see only its threads, and page through large histories cleanly with `n`/`p` — no more giant unreadable walls of sessions.
40+
- **Find by Session ID:** Paste a full session ID, rollout filename, or long ID prefix to jump straight to the matching session and see its title, workspace, date, size, and source file before exporting.
4041
- **20 Filterable Sections:** Toggle everything from User/Agent messages to hidden agent reasoning, terminal commands, MCP tool calls, git snapshots, and more.
4142
- **Parallel Exports:** Select and process multiple sessions at the same time. The filter will show you the combined line counts and will export them simultaneously in one batch.
4243
- **Dynamic Output Capping:** Terminal payloads can be hundreds of thousands of lines long. Instantly cap output blocks to exactly 1, 5, 8, 10, or up to 500 lines to keep your context windows lean.
4344
- **Granular Message Filtering:** Independently control how many of the last N blocks you want from each message type — 👤 User, 🤖 Agent, 🧠 Agent Reasoning, and 🔒 Internal Reasoning — all separately adjustable with ``/``. Each defaults to showing all, so you only cut what you need.
4445
- **Last N Turns *(New in v2.4)*:** Don't need the full session? Select only the most recent N turns to export. A "turn" is one user message plus all the agent work that followed (reasoning, tool calls, outputs, responses). Perfect for extracting just the last few interactions without wading through the entire history.
4546
- **Live Context *(New in v2.5)*:** Want to see *exactly* what the LLM is seeing right now? The "Live Context" option parses the raw JSON logs to reverse-engineer Codex's memory state. It dynamically tracks the model's exact context limit (e.g. 258k), displays real-time token usage, resolves all your `Undo`/`Rollback` actions, and processes session compactions so you export the strict active memory window.
4647
- **"Clean Chat" Mode:** Instantly strips messy IDE background data, active-file streams, and open-tab XML that the agent silently attaches to your prompt, leaving just your actual words.
48+
- **Save Location Prompt:** When exporting to a file, choose the script directory, the selected session's project directory, or a custom folder, then optionally reveal the saved output in File Explorer, Finder, or your Linux file manager.
49+
- **Overwrite Protection:** If an output file already exists, choose overwrite, rename, or skip. Overwrite is the default.
4750
- **7 Built-in Presets:** Jump straight to "Chat Only", "Terminal Only", "Outputs Only", or "Full Export" with a single keystroke.
4851
- **Real-Time Context Math:** See exactly how many lines you are selecting *before* you export, complete with a live progress bar.
4952

@@ -94,6 +97,7 @@ python codex-md.py
9497
* `` / `` (or `` / ``, or `n` / `p`) — previous / next page.
9598
* **Type a number** — convert the session(s) on the **current page** (e.g. `1`, or `1, 3, 5`; numbers are page-local, press Enter to confirm). In the **Projects** view a number instead opens that project.
9699
* `a` — convert every session shown on the current page.
100+
* `s` — find a session by session ID, rollout filename, or long ID prefix.
97101
* `m` — toggle between **All Sessions** and **Projects** views.
98102
* `b` — back to the project list (when you're inside a project).
99103
* `q` — quit.
@@ -111,9 +115,18 @@ python codex-md.py
111115
* `` / `` on **🔒 Internal Reasoning Cap** - Keep only the last N internal reasoning blocks
112116
* `1`-`7` - Load presets
113117
4. **Export Destination:** Press `Q` when you're ready, and you will be asked where to send the output:
114-
* **[F]ile:** Save directly to a `.md` file in the current directory (Default).
118+
* **[F]ile:** Save directly to a `.md` file.
115119
* **[C]lipboard:** Instantly copy the raw Markdown so you can paste it straight into ChatGPT or Claude.
116120
* **[B]oth:** Save to disk *and* copy to clipboard simultaneously.
121+
5. **Save Location:** If you choose **File** or **Both**, choose where the `.md` file should go:
122+
* **[S]cript directory:** Save beside `codex-md.py` (Default).
123+
* **[P]roject directory:** Save into the selected session's recorded project `cwd`, when that folder exists locally. Multi-project exports save each session beside its own project.
124+
* **[C]ustom directory:** Enter any folder path and create it if needed.
125+
6. **Existing Files:** If the file already exists, choose:
126+
* **[O]verwrite:** Replace the existing file (Default).
127+
* **[R]ename:** Save with a suffix like `-2.md`.
128+
* **[S]kip:** Leave the existing file unchanged.
129+
7. **Open Output:** After saving, choose whether to open the Markdown file in the default app, show the output folder in File Explorer/Finder/Linux file manager, or do nothing.
117130

118131
---
119132

0 commit comments

Comments
 (0)