Skip to main content

Export Codex session logs to a self-contained, browsable static HTML site (ZIP archive)

Project description

codex-export-tool

Export Codex session logs to a self-contained, browsable static HTML site.

Installation

pip install codex-export-tool

Or from source:

git clone <repo-url>
cd codex-export-tool
pip install -e .

Windows setup

After pip install codex-export-tool, if the command is not found, the Python Scripts folder is not in your system PATH.

Option A -- Add to PATH (recommended) Run PowerShell as Administrator and paste:

[Environment]::SetEnvironmentVariable(
    "Path",
    [Environment]::GetEnvironmentVariable("Path", "User") +
    ";C:\Users\poon9\AppData\Local\Programs\Python\Python312\Scripts",
    "User"
)

Restart your terminal -- codex-export-tool will work anywhere.

Option B -- Use python -m (no PATH change needed)

python -m codex_export

Both options work identically.

Usage

Interactive mode

codex-export-tool

Shows a list of available sessions, then lets you pick records to export.

Non-interactive mode

# Export entire session by ID
codex-export-tool --session <session-id>

# Custom output path
codex-export-tool --output my_export.zip

# Standalone HTML (no ZIP)
codex-export-tool --session <session-id> --format html

# Open in browser after export
codex-export-tool --session <session-id> --open

# Filter by role
codex-export-tool --session <session-id> --role user
codex-export-tool --session <session-id> --role assistant

# Exclude file diffs
codex-export-tool --session <session-id> --no-diffs

# Time range filter
codex-export-tool --session <session-id> --after "2026-01-01T00:00:00Z" --before "2026-06-01T00:00:00Z"

# Custom session directory
codex-export-tool --session-dir ~/custom/sessions

Output

The output is a ZIP archive (or standalone HTML with --format html). Extract the ZIP and open index.html in any modern browser.

Features

  • Turn structure — Messages are grouped into conversational turns for easy reading
  • TOC sidebar — Jump between turns from the sidebar (mobile-friendly toggle)
  • File diffs — File edits shown with green (add) / red (delete) highlighting
  • Dark mode — Toggle with toolbar button or t key; follows system preference
  • Search — Real-time full-text search with highlighted matches
  • Copy buttons — One-click copy for code blocks
  • Keyboard shortcutsj/k for navigation, / for search, t for dark mode, ? for help

Configuration

Add a .codex-export.toml file in your home or project directory:

[display]
date_format = "%Y-%m-%d %H:%M:%S"
summary_length = 60

[export]
max_file_size_kb = 200
max_diff_lines = 500

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

codex_export_tool-0.2.0.tar.gz (47.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

codex_export_tool-0.2.0-py3-none-any.whl (42.5 kB view details)

Uploaded Python 3

File details

Details for the file codex_export_tool-0.2.0.tar.gz.

File metadata

  • Download URL: codex_export_tool-0.2.0.tar.gz
  • Upload date:
  • Size: 47.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.6

File hashes

Hashes for codex_export_tool-0.2.0.tar.gz
Algorithm Hash digest
SHA256 0bd2a8a6c13d4d935109d0493387b46353e262c5aed8fdc98db47fe248cd3618
MD5 cc38ae1c4b1936b975f2d2273ba405ef
BLAKE2b-256 bbee44db7fc51b053729c73ae10cb46e846eeca0c892e8a25661c3acc81b3021

See more details on using hashes here.

File details

Details for the file codex_export_tool-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for codex_export_tool-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dda04b41c835db8012774ca91689033e86ff1fb3875106a125288c3efcbaaa44
MD5 19161e9835a1a380d9d21d7f96ed1382
BLAKE2b-256 4064244044b024ad1a4805c79dcea4709db6c03aa459b3893fdbc31fcbf92d21

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page