PCTUTU.comBack to PCTUTU.com
GitHub projects
lastbookUtilities
Category
Utilities
Publisher
Immortal-Protocols
Repository
Open repository
Release
Open release
Current version
v1.1.19
Release date
2026-11-28
Package size
Windows 105.3 MB · macOS 29.4 MB
Utilities · Immortal-Protocols

lastbook

Lastbook is a community built and maintained offline survival library for Mac, Windows and Linux. Point your AI to our repo and contribute to humanity's survival. It puts manuals, videos, encyclopedias, an offline map and short practical guides on one computer. After setup, it works offline. The desktop sidebar opens Videos, Map and Chat. Chat answers questions using the library, including the offline encyclopedias when they are present, and links to its sources. Choose Appearance in the sidebar, phone header, or setup page for System, Light or Dark.

Version v1.1.19
Available for Windows and macOS

README

Lastbook

Lastbook is a community built and maintained offline survival library for Mac, Windows and Linux. Point your AI to our repo and contribute to humanity's survival. It puts manuals, videos, encyclopedias, an offline map and short practical guides on one computer. After setup, it works offline. The desktop sidebar opens Videos, Map and Chat. Chat answers questions using the library, including the offline encyclopedias when they are present, and links to its sources. Choose Appearance in the sidebar, phone header, or setup page for System, Light or Dark.

Website: https://lastbook.org. Contact: [email protected].

Lastbook’s original code and documentation are licensed under the MIT License. Contributions are welcome. See CONTRIBUTING.md to get started.

Release status

Platform Version Status
macOS (Apple Silicon, macOS 14 or later) 1.1.19 Live on lastbook.org, signed and notarized
Windows (64-bit, Windows 10 or later) 1.1.19 Live on lastbook.org, Authenticode signed
Linux (Ubuntu 24.04 or 26.04 LTS, x86_64) 1.1.19 Ubuntu packages; installation instructions below

iPad (development preview, source only)

A native iPad app (Videos, Map and Chat, offline, with optional on-device AI) is in mobile/ipad/.

  • It is source for contributors to build and sign themselves.
  • There is no App Store, TestFlight or downloadable iPad build.
  • See mobile/ipad/README.md for what works, the current limitations and how to build it.

Install on Linux

The Linux packages target Ubuntu 24.04 LTS and Ubuntu 26.04 LTS on Intel/AMD x86_64 computers, one package for each. Download Lastbook for Ubuntu 24.04 (or for Ubuntu 26.04), then install it with apt so Ubuntu resolves its dependencies.

sudo apt install ./Lastbook_1.1.19_amd64.deb                  # Ubuntu 24.04
sudo apt install ./Lastbook_1.1.19_ubuntu26.04_amd64.deb      # Ubuntu 26.04

Open Lastbook from the application menu. First-run setup downloads your chosen library, state map and optional local AI. The app uses Ubuntu's GTK, WebKitGTK and media codecs. Its own files install under /opt/lastbook, and your library and settings stay in your home folder. Removing the package leaves those downloaded files and settings in place.

The Linux release was tested on Ubuntu 24.04.5 in WSL2, including installation, setup, video playback, maps, address search, PDF reading, offline AI with citations, shutdown and uninstall. AI tests used the CPU. Native Linux GPU performance and other Linux distributions have not been validated for this release.

What it does

  • Guides first. Short, curated guides for urgent needs (content/topics/), each pointing to real pages in the library with page numbers, plus what curators looked for and did not find (content/gaps.json).
  • The full library. Manuals and PDFs (with a whole-PDF view), videos, and offline encyclopedias (ZIM files), with keyword search everywhere and meaning-based search on Windows.
  • Offline map. A base map of the world and the US, plus a detailed map for the state selected during setup: local streets, buildings, terrain, crops, and water, help and resource points. Addresses in that state can be found offline. The person picks the state; Lastbook never detects location.
  • Optional local AI. Ask questions in plain words and get answers that cite library pages, from a model that runs on the computer itself (see "The local AI" below). Without it, Chat still finds the right pages.
  • Saved video moments. Keep several named positions in a video and open them from the player or Saved. Names and positions stay on this device; the video and its captions are unchanged.
  • One-download setup. On first run, setup defaults to Small and selects local AI when the computer can run it. The person can choose Small, Medium or All, selects a state map, and starts the checked downloads. A library already on the computer (a folder or a pack zip) can be used instead of downloading.
  • App updates. Choose Notify me about app updates in Settings or during first-time setup. Lastbook checks at most once every 24 hours while it is open and online. If a compatible version is available, the sidebar shows Update available. On a Mac build that can update itself, About's Update now asks you to confirm, installs the signed update and restarts Lastbook. Elsewhere, Open download page opens the official download page: run the new installer. Either way your existing library, settings and chats stay as they are. You can also check manually in About or the Mac menu under Lastbook > Check for Updates….

Privacy and network use

  • No listening port. The desktop app opens no network port. The window and the engine talk through an in-memory bridge (app/bridge.py): WKURLSchemeHandler on macOS (app/shell_macos.py), WebView2 WebResourceRequested on Windows (app/shell_windows.py), and WebKitGTK URISchemeRequest on Linux (app/shell_linux.py). The local AI runner speaks JSON lines on standard input and output and opens no socket either.
  • Two uses of the network. (1) Setup's downloader (engine/setup/), when the person starts or resumes a download. (2) The app update check (engine/update.py, web/update.js), when the person checks manually or opts into daily checks. Both go through engine/setup/download.py, the only module that opens a connection: HTTPS on port 443 only, to allow-listed hosts only (downloads.lastbook.org for packs, maps, the manifest and update information; Hugging Face's download hosts for the AI model; the update check accepts downloads.lastbook.org alone), no proxy from the system, and a redirect is followed only to another allowed host.
  • Pinned trust. The downloader trusts only the root certificates in engine/setup/roots.pem (11 roots from Mozilla's bundle), never the system's trust store. The builds refuse to finish if those roots no longer cover the allowed hosts (packaging/check_tls_roots.py).
  • Checked files. Every download is checked against the SHA-256 in the manifest before it is used. Zips are checked for unsafe paths, links and sizes before anything is written.
  • Nothing else. The windows block web loads, and there is no telemetry or account. App update notices are off by default. With notices enabled, the app can check the release feed after launch or while the app is open.
  • A working library is never broken. New data is unpacked beside the old one, checked, and then switched in with a single rename. A failure at any step leaves the old library as it was.

The setup contract, including state maps, is in docs/SETUP-API.md; the engine side is described in engine/setup/README.md.

What's where

Path What it is
app/ The desktop app: entry point (main.py), the no-port bridge, the macOS, Windows and Linux shells, and tests (app/tests/).
engine/ Paths and data-folder lookup, library access, saved pages, offline address search (address_search.py), the update check (update.py) and first-run setup (engine/setup/). engine/vendor-macos/ holds pypdfium2 for the Mac build.
server.py, assistant.py, retrieval.py, llm_local.py The engine: request handler, the assistant and its citation checks, keyword plus meaning-based search, and the local AI (model pins, fit check, runner control).
web/ The interface, in plain HTML, CSS and JavaScript with no build step and nothing loaded from the web. setup.* is the setup screen, update.js the update check in About.
content/ The curated guides (topics/*.json) and what curators looked for and did not find (gaps.json). Format: content/SCHEMA.md.
packaging/ App builds (macOS, Windows and Linux), the Windows installer and its front (setup_stub/), signing helper (sign_windows.ps1), icons (icon/), pack and state-map builders, release manifest, TLS roots tools, package scans, and packaging/llm/ (the local AI runner).
derived/packs/pack-spec.json What goes into each download pack (Small, Medium, All and add-ons) and each state map. Everything else under derived/ is generated and not kept here.
tools/ Builders for the offline map, addresses and place finder, plus curator helpers (libq.py, validate_topics.py), and compare_packs.py, which compares two packs' file lists.
website/, website-next/ The earlier website and the current static lastbook.org site, respectively.
docs/ The setup contract (SETUP-API.md), how the offline map is put together (MAPS.md) and notes on the library server version (LIBRARY-SERVER.md).

Run from source

You need Python 3.11 or later and a data folder. A data folder holds library-data/catalog.json (the library) and gets a derived/ folder for indexes, caches and logs. Get one by running the app once and letting setup download a pack, or by unzipping a pack from lastbook.org.

python3 -m venv .venv
.venv/bin/pip install -r packaging/requirements_macos.txt
.venv/bin/python app/main.py --data /path/to/LastbookData

On Windows:

python -m venv .venv
.venv\Scripts\pip install -r packaging/requirements_app.txt
.venv\Scripts\python app\main.py --data C:\path\to\LastbookData

The Windows window also needs three files from the NuGet package Microsoft.Web.WebView2 1.0.3856.49 in app/webview2/: lib/net462/Microsoft.Web.WebView2.Core.dll, lib/net462/Microsoft.Web.WebView2.WinForms.dll and runtimes/win-x64/native/WebView2Loader.dll. A .nupkg file is a zip file. Download it from https://www.nuget.org/api/v2/package/Microsoft.Web.WebView2/1.0.3856.49 and copy the files out. You can check them against the hashes in packaging/build_app_windows.sh.

On Linux, start it through packaging/linux/run_source_linux.sh instead, or videos will not play. The window comes from the system (WebKitGTK 4.1 and PyGObject), so make the virtual environment with --system-site-packages and install one requirements file — packaging/linux/requirements_linux.txt on Ubuntu (or Arch), or packaging/linux/requirements_linux_fedora.txt on Fedora (and any source install on Python 3.15, where the packaged pins have no wheel):

Ubuntu (or Arch):

python3 -m venv --system-site-packages .venv
.venv/bin/pip install -r packaging/linux/requirements_linux.txt
bash packaging/linux/run_source_linux.sh --data /path/to/LastbookData

Fedora:

python3 -m venv --system-site-packages .venv
.venv/bin/pip install -r packaging/linux/requirements_linux_fedora.txt
bash packaging/linux/run_source_linux.sh --data /path/to/LastbookData

The packaged app plays library videos through lastbooksrc, its own GStreamer source for lastbook:// addresses (packaging/linux/gst/lastbooksrc.c). A source run has no copy of it. The script builds it into derived/gst/, points GStreamer and WebKit at it for that launch only, and warns about any missing decoders. It needs these packages:

Arch Ubuntu Fedora
Build the plugin gcc pkg-config gstreamer gcc pkg-config libgstreamer1.0-dev gcc pkgconf-pkg-config gstreamer1-devel gstreamer1-plugins-base-devel
Window webkit2gtk-4.1 python-gobject gir1.2-webkit2-4.1 python3-gi webkit2gtk4.1 python3-gobject
MP4, H.264, AAC gst-plugins-base gst-plugins-good gst-libav gstreamer1.0-plugins-good gstreamer1.0-libav gstreamer1-plugins-base gstreamer1-plugins-good gstreamer1-plugin-libav
AV1 (many of the library's videos) gst-plugin-dav1d gstreamer1.0-plugins-bad gstreamer1-plugin-dav1d

A source run was validated nativ

Publisher informationSoftware details and release files are provided by the publisher.