Skip to main content

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 shortcuts — j/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

Metadata

Release files for codex-export-tool 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for codex-export-tool 0.2.1
File Size Uploaded Provenance Actions
codex_export_tool-0.2.1.tar.gz 47.7 kB Without provenance Details for codex_export_tool-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for codex-export-tool 0.2.1
File Interpreter ABI Platform Actions
codex_export_tool-0.2.1-py3-none-any.whl Python 3 none any Details for codex_export_tool-0.2.1-py3-none-any.whl

Total release size: 90.1 kB

Release files / codex_export_tool-0.2.1.tar.gz

Download URL codex_export_tool-0.2.1.tar.gz
Size 47.7 kB
Tags Source
SHA-256 checksum
How to use checksums
62d760a4e7028c454e85559cbbf834e340f5e58059e6ba9136e2a3584f43f278
BLAKE2b-256 checksum
How to use checksums
9b8afec0f0cf5251d66113f663b74668eca3f67983298d79568b068d5153eac1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.6

Release files / codex_export_tool-0.2.1-py3-none-any.whl

Download URL codex_export_tool-0.2.1-py3-none-any.whl
Size 42.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
301d9f5d1a06fb481af937cf5c8b2cde7689792e2e6aa678f66a9602c88bac25
BLAKE2b-256 checksum
How to use checksums
35b0a41da7d67270d655386759d31d5f60aeb00946562123424e9b2e5391d766
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.6

Security for codex-export-tool 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page