Skip to content

blakelohnwiley/NotebookLM_Offline

Repository files navigation

NotebookLM Offline

License: MIT Built with notebooklm-py TypeScript Python

A React PWA + Python FastAPI bridge that lets you export your NotebookLM notebooks and study them completely offline — including quizzes, flashcards, notes, mind maps, reports, and chat history.

Unofficial tool. Uses notebooklm-py under the hood.
Your Google session is stored locally only and never leaves your machine.


Features

Feature Description
📥 Sync Pull a full notebook bundle from NotebookLM via local API server
📂 Import Load a previously-exported JSON bundle without the server
📚 Library Browse all synced entries with full-text search
🃏 Flashcards Flip-card study mode with known/unknown tracking
🧠 Quiz Multiple-choice quiz with scoring and answer review
📝 Notes View notebook notes side-by-side
🗺️ Mind Map Collapsible JSON tree viewer for mind map data
📄 Reports Rendered markdown reports with raw/preview toggle
💬 Chat History Searchable Q&A conversation thread

Screenshots

Home Import
Home Import
Library Flashcards
Library Flashcards
Quiz Notes
Quiz Notes
Mind Map Reports Chat
Mind Map Reports Chat

Requirements

  • macOS / Linux
  • Python 3.10+
  • Node.js 18+
  • Google Chrome (for auth capture)

Quick Start

1 — Install & Authenticate

cd scripts
chmod +x setup.sh && ./setup.sh

This will:

  • Create a Python venv and install dependencies
  • Launch Chrome so you can log in to your Google account
  • Save scripts/storage_state.json (local only, gitignored)

2 — Install the notebooklm-py vendor library

cd scripts && source .venv/bin/activate
pip install git+https://github.com/teng-lin/notebooklm-py.git

3 — Start the local API server

cd scripts && source .venv/bin/activate && python3 server.py

Server runs on http://127.0.0.1:8765 (local only).

4 — Run the frontend

npm install
npm run dev

Open http://localhost:5173Sync → enter your notebook ID.


Notebook ID

Your notebook ID is the UUID in the NotebookLM URL:

https://notebooklm.google.com/notebook/0af122fb-9d20-4715-9a88-308fdc0d65df
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Export via CLI (no frontend)

cd scripts && source .venv/bin/activate
python3 extract.py <NOTEBOOK_ID> --out ../imports --generate

Writes imports/notebook-bundle-<title>.json which you can then import in the UI.


Project Structure

├── scripts/
│   ├── server.py          # FastAPI bridge (127.0.0.1:8765)
│   ├── extract.py         # CLI export tool
│   ├── capture_session.py # Auth capture via Playwright
│   ├── setup.sh           # One-command setup
│   └── requirements.txt
├── src/
│   ├── features/          # Page components (sync, import, quiz, flashcards, …)
│   ├── lib/               # IndexedDB, sync client
│   ├── types/             # TypeScript types
│   └── styles/
├── imports/               # Drop exported JSON bundles here (gitignored)
└── vendor/                # notebooklm-py (install separately — see above)

Security Notes

  • storage_state.json is gitignored — it contains your Google session cookies.
  • The API server binds to 127.0.0.1 only — never exposed to the network.
  • Exported bundles in imports/ are also gitignored.

Acknowledgements

This project would not be possible without notebooklm-py by @teng-lin — an unofficial async Python client for the NotebookLM API that handles all notebook, source, artifact, note, and chat interactions.

If you find this project useful, please consider starring their repo too.


License

MIT

About

React PWA + Python FastAPI bridge to export and study NotebookLM notebooks offline

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors