Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

justyn-clark/chat-notebook

Repository files navigation

chat-notebook

Go CI License: MIT SQLite Astro

Local-first notebook for importing your own ChatGPT export zips into a canonical SQLite history browser.

Why this exists

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.git
  • cd chat-notebook
  • make viewer-build build

Quickstart after install:

  • chat-notebook query --q "OpenClaw handoff" --db ./chat-notebook.db --json
  • chat-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:

ChatGPT data export screen

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

About

Local-first ChatGPT export notebook with SQLite search and a built-in viewer.

Topics

Resources

License

Stars

Watchers

Forks

Packages

Contributors

AltStyle によって変換されたページ (->オリジナル) /