Go CI License: MIT SQLite Astro
Local-first notebook for importing your own ChatGPT export zips into a canonical SQLite history browser.
Some of us have been building with ChatGPT since the subscription first became available. Years of conversations become more than chat logs: they are research trails, project memory, debugging sessions, writing drafts, product ideas, lessons learned, and thousands of small moments where thinking turned into work.
OpenAI's export feature is useful, but a zip file is not a notebook. It is a backup, not a retrieval system. chat-notebook turns that export into a local, searchable, inspectable archive that you own.
The point is simple: if you have invested years of input, exploration, assistance, and learning into a system, you should not lose access to that history because the internet is down, a product changes, an account breaks, or a company crisis changes the trust equation overnight. Your exported conversations should be useful on your own machine, in a format you can keep, search, and build on.
Input:
- OpenAI export zip (must contain
conversations.json)
Output:
- SQLite database (source of truth)
- blob directory for extracted attachments/media (best-effort)
Install:
go install github.com/justyn-clark/chat-notebook/cmd/chat-notebook@latest- Or from a release tag:
go install github.com/justyn-clark/chat-notebook/cmd/chat-notebook@v0.1.0
Build from source:
git clone https://github.com/justyn-clark/chat-notebook.gitcd chat-notebookmake viewer-build build
Quickstart after install:
chat-notebook query --q "OpenClaw handoff" --db ./chat-notebook.db --jsonchat-notebook serve --db ./chat-notebook.db --blobs ./blobs --addr 127.0.0.1:8787
Quickstart after a source build:
./target/chat-notebook query --q "OpenClaw handoff" --db ./chat-notebook.db --json./target/chat-notebook serve --db ./chat-notebook.db --blobs ./blobs --addr 127.0.0.1:8787
First run:
./target/chat-notebook serve --db ./chat-notebook.db --blobs ./blobs --addr 127.0.0.1:8787- Open the app in your browser.
- Request your ChatGPT export, download the zip, and import the untouched zip from the setup screen.
- After import completes, browse conversations, search history, and inspect artifacts locally.
Where to request the export:
Build requirements:
- Go 1.25+
- Node.js 22.12+ for the Astro viewer build
Repeat imports:
- Export newer ChatGPT data later and import the new zip from the app.
- Existing rows are deduped; new conversations, messages, and artifacts are merged into the same notebook.
Import fidelity:
- plain text parts are normalized into readable message text
- structured attachment/media parts are summarized instead of dumped as raw JSON blobs
- best-effort attachment/media files are materialized under
--blobs - attachment artifacts include local
/api/blobs/...links when a matching file is found in the export zip
CLI import remains available:
./target/chat-notebook import --zip export.zip --db ./chat-notebook.db --blobs ./blobs --json./target/chat-notebook inspect stats --db ./chat-notebook.db --json
Invariants:
- deterministic import
- no data loss (raw JSON is always stored)
- idempotent re-import with dedupe by stable IDs and hashes