Metadata-Version: 2.4
Name: codex-export-tool
Version: 0.1.0
Summary: Export Codex session logs to a self-contained, browsable static HTML site (ZIP archive)
Author: Codex Export Contributors
License: MIT
Project-URL: Homepage, https://github.com/your-username/codex-export-tool
Keywords: codex,session,export,cli
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Software Development :: Version Control
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: jinja2>=3.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"
Requires-Dist: ruff>=0.1.0; extra == "dev"
Dynamic: license-file

# codex-export-tool

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

## Installation

```bash
pip install codex-export-tool
```

Or from source:

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

## Usage

### Interactive mode

```bash
codex-export-tool
```

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

### Non-interactive mode

```bash
# 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:

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

[export]
max_file_size_kb = 200
max_diff_lines = 500
```

## License

MIT
