Metadata-Version: 2.4
Name: logactyl
Version: 0.1.3
Summary: Build a browsable local mirror site from ChatGPT or Claude data exports
Author: logactyl contributors
License-Expression: MIT
Project-URL: Homepage, https://latebrum.com/git/actx/logactyl/
Project-URL: Repository, https://latebrum.com/git/actx/logactyl/
Keywords: chatgpt,claude,export,mirror,archive,offline
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Utilities
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: markdown
Requires-Dist: markdown-it-py>=3.0; extra == "markdown"
Provides-Extra: encrypt
Requires-Dist: cryptography>=41.0; extra == "encrypt"
Provides-Extra: all
Requires-Dist: markdown-it-py>=3.0; extra == "all"
Requires-Dist: cryptography>=41.0; extra == "all"
Provides-Extra: test
Requires-Dist: pytest>=8.0; extra == "test"
Requires-Dist: build>=1.2.1; extra == "test"
Requires-Dist: twine>=5.1.0; extra == "test"
Dynamic: license-file

# logactyl

Build a browsable, fully offline local mirror site from your ChatGPT or Claude data exports.

## What it does

`logactyl` takes an official data export ZIP from ChatGPT or Claude and generates a static HTML site that you can open directly in any browser (no server required). The site includes:

- Per-conversation pages with rendered messages, code blocks, TeX math, and attachments
- Full-text offline search across all conversations
- Project/folder grouping and an interactive organizer
- Optional AES-256-GCM encryption at rest

## Installation

```bash
pip install logactyl
```

With optional dependencies for rich markdown rendering and encryption:

```bash
pip install "logactyl[all]"
```

Or pick what you need:

```bash
pip install "logactyl[markdown]"   # markdown-it-py for CommonMark rendering
pip install "logactyl[encrypt]"    # cryptography for AES-256-GCM encryption
```

## Known issues
There is currently no way to derive project names via inference using the official export archives.
When either OpenAI or Anthropic add some mapping for projects in their exports it will be added to this tool.

## Quick start

**ChatGPT export:**

```bash
logactyl --chatgpt-zip ~/Downloads/chatgpt-export.zip -o ~/chatgpt-mirror
```

**Claude export:**

```bash
logactyl --claude-zip ~/Downloads/claude-export.zip -o ~/claude-mirror
```

**Both together (merged site):**

```bash
logactyl \
  --chatgpt-zip ~/Downloads/chatgpt-export.zip \
  --claude-zip ~/Downloads/claude-export.zip \
  -o ~/chat-mirror
```

Then open `index.html` in the output directory.

## Appending new exports

Re-run with `--append` to merge new exports into an existing site without losing organizer edits:

```bash
logactyl --chatgpt-zip newer-export.zip -o ~/chatgpt-mirror --append
```

## Encryption

Encrypt the generated site at rest with a passphrase:

```bash
logactyl --chatgpt-zip export.zip -o ~/private-mirror --encrypt
```

Requires `pip install "logactyl[encrypt]"`.

Decrypt or re-key an existing encrypted site:

```bash
logactyl --decrypt ~/private-mirror
logactyl --rekey ~/private-mirror
```

## Options

| Flag | Description |
|------|-------------|
| `--chatgpt-zip PATH` | Path to a ChatGPT data export ZIP |
| `--claude-zip PATH` | Path to a Claude data export ZIP |
| `-o, --output DIR` | Output directory (default: derived from input) |
| `--append` | Merge into an existing site instead of overwriting |
| `--encrypt` | Encrypt the output site with a passphrase |
| `--decrypt DIR` | Decrypt an existing encrypted site |
| `--rekey DIR` | Change the passphrase on an encrypted site |
| `--render-markdown` | Enable CommonMark rendering (needs `markdown-it-py`) |
| `--no-render-markdown` | Disable markdown rendering (raw text) |
| `--zip` | Produce a `.zip` of the output site |
| `--add-search DIR` | Add search to an existing site that was built without it |

Run `logactyl --help` for the full list.

## Running as a module

```bash
python -m logactyl --chatgpt-zip export.zip -o ~/mirror
```

## Requirements

- Python 3.9+
- No required third-party dependencies (stdlib only)
- Optional: `markdown-it-py` for rich markdown rendering
- Optional: `cryptography` for site encryption

## License

MIT
