Export a Codex session JSONL from ~/.codex/sessions into a clean Markdown transcript in ~/Documents/Exports. Use when the user wants to export, save, or conv...
文档
codex-export
试用Export a Codex CLI or Codex Desktop (App) session to Markdown, HTML, or Obsidian notes. Use when the user asks to export, save, share, or review a past chat, session, or transcript. Supports --brief, --redact, --since/--until, --grep, --append (incremental), --interactive (message picker), --sessions (merge), --watch (auto-incremental), and --list. Works with both Codex CLI and Codex Desktop app sessions.
它能做什么
Export a Codex CLI or Codex Desktop (App) session to Markdown, HTML, or Obsidian notes. Use when the user asks to export, save, share, or review a past chat, session, or transcript. Supports --brief, --redact, --since/--until, --grep, --append (incremental), --interactive (message picker), --sessions (merge), --watch (auto-incremental), and --list. Works with both Codex CLI and Codex Desktop app sessions.
技能文档
codex-export
Export any Codex session ($CODEX_HOME/sessions/**/*.jsonl, default ~/.codex/sessions) to a clean Markdown file.
Usage
# List recent sessions (pick by number or copy the ID)
python3 scripts/export.py --list
# Export by session ID
python3 scripts/export.py output.md
# Brief mode: user + assistant only, no tool calls
python3 scripts/export.py output.md --brief
# Time range
python3 scripts/export.py output.md --since 2026-08-10 --until 2026-08-11 --brief
# Content filter (a matched question pulls in its full turn)
python3 scripts/export.py output.md --grep "Typora" --brief
# Incremental export: append only new messages, preserving manual edits
python3 scripts/export.py output.md --brief --append
# Redact emails/tokens/paths for safe sharing
python3 scripts/export.py output.md --brief --redact
# HTML or Obsidian output
python3 scripts/export.py session.html --format html
python3 scripts/export.py session.md --format obsidian
# Interactive picker
python3 scripts/export.py picked.md --interactive
# Merge sessions
python3 scripts/export.py --sessions id1,id2 merged.md --brief
# Auto-incremental watch mode
python3 scripts/export.py notes.md --brief --watch 60
Notes
- Honors
$CODEX_HOME; falls back to~/.codex - Merges multi-rollout sessions and dedups by message ID
- Explicit UTF-8 I/O; works on Windows/zh-CN without
PYTHONUTF8 - Injected system blocks (app-context, in-app-browser-context, etc.) are stripped
- System/developer messages and injected context blocks are filtered automatically
- Tool call outputs are included by default; use
--briefto strip them - Checkpoint for
--appendlives in.state.json
相关技能
Use this skill when the user wants to inspect, search, export, verify, clean up, delete, restore, or purge local Codex sessions stored under a Codex root suc...
Summarize Codex token usage from local Codex Desktop or CLI session JSONL logs. Use when the user asks to count, audit, total, compare, or report Codex/OpenA...
安全诊断、备份并修复项目存在但历史聊天仍然不显示的问题
Safely inspect and remove locally archived Codex conversation data on Windows, macOS, and Linux, including archived rollout JSONL files, archived session row...
Structured session lifecycle for Claude Code — start, checkpoint, end, and daily heartbeat commands that maintain project state across conversations.