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.1.tar.gz (47.7 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.1-py3-none-any.whl (42.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: codex_export_tool-0.2.1.tar.gz
  • Upload date:
  • Size: 47.7 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.1.tar.gz
Algorithm Hash digest
SHA256 62d760a4e7028c454e85559cbbf834e340f5e58059e6ba9136e2a3584f43f278
MD5 c01ead95db6bdc1749da87053d3bab40
BLAKE2b-256 9b8afec0f0cf5251d66113f663b74668eca3f67983298d79568b068d5153eac1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for codex_export_tool-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 301d9f5d1a06fb481af937cf5c8b2cde7689792e2e6aa678f66a9602c88bac25
MD5 d82660bf8ce4f04c4b07120d81a8d2eb
BLAKE2b-256 35b0a41da7d67270d655386759d31d5f60aeb00946562123424e9b2e5391d766

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