Skip to content
Projects

About

Local-first EPUB & PDF reader for books and papers — layout-aware translation, local OCR, annotations, paper library, and source-grounded AI reading.

Productivity & Automation

How these counts are measured

Measured star growth

in 24h
+9
in 7 days
+101
in 15 days
+267
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README.en.md

Original

NeoRead logo

NeoRead

简体中文 · English · Website · Download

The name NeoRead is inspired entirely by NeoVim — a tribute to the classic editor slowly drifting further away from me.

A local-first EPUB / PDF reader built for reading itself — crafting the finest PDF and EPUB reading experience, with source-grounded AI assistance when you want it.

NeoRead reading a PDF, with contents on the left and AI assistance on the right

NeoRead focuses on books and academic papers, refining typography, navigation, annotations, notes, and side-by-side translation so reading feels effortless. Your files, reading progress, annotations, and notes stay on your machine. AI is strictly optional, powered by a built-in Pi runtime that connects to ChatGPT, Claude, or Kimi Code accounts as well as compatible provider API keys.

Learn more at neoread.app. New stable GitHub releases mirror official signed NeoRead Pro installers (Apple Silicon macOS DMG / in-app update ZIP and Windows x64 EXE; Intel Mac and Linux installers are not provided). Those binaries are not built from this repository; this repository hosts the public source code, which you can build and run directly. See the packaging and release guide (Chinese) for upgrade rules from older open-source versions.

Built for Reading Itself

Each format keeps the reading model that fits its typography — EPUB is never flattened into PDF page numbers, and PDF layouts stay intact:

Capability EPUB PDF
Reader engine Sanitized chapter rendering with Readium Go Toolkit PDF.js original rendering + local layout analysis
Navigation Nested TOC, chapter jumps, intra- and cross-chapter links Outline TOC, page jumps, hover preview & back-jump for internal references
Layout & views Continuous scroll / paginated, font, size, line height, margins Zoom & viewport restore, source reflow, side-by-side & translation views
Translation & OCR On-demand chapter translation with synced source/translation view Local layout model + local OCR, text/caption translation, formula-to-LaTeX
Search SQLite FTS5 with literal substring matching Per-page text search (including local OCR text layers)
Locations & annotations Chapter resource, stable block ID, and character range Page number and normalized selection rectangles

Reading and annotations

  • Multi-document tabs & restrained layout: open multiple books or papers in tabs while preserving reading positions and conversations (tab guide (Chinese)). Contents/search on the left, text in the center, notes and AI on the right — pane widths and split ratios are remembered per library. Light, dark, paper, and system themes.
  • Deep PDF reading: a bundled local layout model extracts page structure and figures offline, paired with local OCR for scanned PDFs (macOS system OCR / Paddle). Switch freely among original pages, source reflow, side-by-side bilingual view, and translation view. While scrolling the source in bilingual mode, the translation stays still and aligns once scrolling settles. Hover over paragraphs or figures to copy, inspect at full resolution, or ask AI.
  • Fluid EPUB reading: continuous scroll or paginated reading inside the app with on-demand chapter translation, sentence-level hover sync across source and translation, and independent translation typography controls.
  • Annotations and rich notes: highlights, underlines, question annotations, annotation tags, and Markdown notes with pasted images. Annotations are shared between source and translation, with hover previews, filtering, search, undo, export to annotated PDF / Markdown / image-bundled ZIP, and desktop neoread:// links.
PDF Reflow Paper Notes
PDF Reflow Paper Markdown Notes

Book and paper libraries

  • Separate libraries: manage books (EPUB / PDF) and papers (PDF) separately and move documents between them, with nested categories, tags, smart tag categories, list/table views, reading statuses, batch actions, and trash recovery.
  • Paper metadata, rankings, and graph: automatic metadata lookup (authors, year, venue, DOI, arXiv, abstract) with a built-in conference full-name/abbreviation catalog; optional easyScholar venue rankings; bilingual titles, duplicate detection and merging, two-way related papers, and a paper relation graph. See paper library notes (Chinese).
  • Capture, migration, and citations: import by identifier, URL, or title; capture PDFs, metadata, and offline snapshots from Chrome or Edge with NeoRead Connector (Chinese); migrate from local Zotero (Chinese) or EndNote (Chinese); export GB/T 7714, APA, BibTeX, and RIS citations or cite directly with the Word plugin (Chinese).
Paper Library Paper Detail
Paper Library Paper Detail
Book Library Book Detail
Book Library Book Detail

Source-grounded AI assistance (optional)

  • Anchored to the text: selection translation and explanation, multi-selection quoting, chapter/page summaries, custom prompts, and optional web search. Citations in AI replies jump straight back to and highlight the exact source passage — even while the reply is still streaming.
  • Flexible providers: sign in to ChatGPT, Claude, or Kimi Code, or configure OpenAI / Anthropic compatible API keys. Pick separate models and reasoning levels for chat and translation.
Grounded Citations Agent Settings
AI answer citations Agent Settings

Desktop & CLI

  • Updates & diagnostics: in-app update checks and downloads, system/manual proxy configuration, and redacted diagnostic bundles (Chinese).
  • Command-line client: includes the neoread CLI to interact with the running local service (CLI docs (Chinese)).

In an empty library, click "Try sample documents" to load the bundled 3-chapter EPUB and 2-page PDF.

Quick start

Requires Node.js 22+, pnpm 10.30.3, and Go 1.26.5+.

git clone https://github.com/cynicalight/NeoRead.git
cd NeoRead
pnpm install
pnpm desktop

pnpm desktop builds the Go service, web UI, and Electron app, then opens the desktop window. The local API listens on a random loopback port and shuts down with the app.

If Electron's binary fails to download during install, run:

node apps/desktop/node_modules/electron/install.js

AI usage and privacy boundaries

AI is optional. Local reading, search, OCR, and annotations work without any AI account.

  • Account connections: open Settings → Agent and connect ChatGPT, Claude, or Kimi Code via browser authorization or device code; available models follow your account probe results.
  • API keys: configure endpoint URL, API key, and model, using automatic protocol detection or explicit OpenAI Chat Completions / Anthropic Messages mode. Keys stay on the local backend. See API provider compatibility (Chinese).
  • Local models: a ~67 MB layout model is bundled for offline PDF layout extraction and figure detection — no Python required. Without an active Agent, reading, local OCR, and figure previews still work normally.
  • What leaves your machine: when AI is enabled, PDF text and captions are sent for translation and formula images are sent for LaTeX conversion (charts and ordinary figures are not sent by default). EPUB chapters are sent only when you trigger chapter translation. Chat requests include your selection, title/abstract, optional chapter context, and recent turns. Pi workers run in private temporary directories; see the agent streaming contract (Chinese).

Local data

Original files live on the filesystem; document metadata, reading progress, annotations, conversations, and full-text search indexes live in SQLite. This repository has no built-in cloud sync.

Mode Default data directory
Installed desktop app Electron userData/library/ (macOS: ~/Library/Application Support/NeoRead/library/)
Unpackaged desktop (pnpm desktop) macOS: ~/Library/Application Support/NeoRead Dev/library/
Browser dev mode (pnpm dev) .neoread/ at the repo root

You can relocate the library in Settings → Library location (paths cannot contain ?); custom locations are stored in userData/library-location.json. See migration notes (Chinese) for automatic migration from legacy Reader libraries.

library/
├── neoread.sqlite       # Metadata, reading state, chats, settings, and FTS index
├── books/               # EPUB / book PDF originals
├── papers/              # Paper PDF originals
├── cache/               # EPUB assets; PDF analysis Markdown, images, and parsed output
└── ai-work/             # Temporary Pi worker directory, removed after each request

Close the app before backing up the data directory. The local API uses a per-launch random token and validates Host / Origin headers; EPUB imports sanitize active content while leaving original files untouched.

Development & architecture

Start the Go service and Vite dev server with hot reload:

pnpm dev

Open the full http://127.0.0.1:5173/#token=… URL printed in the terminal (do not share URLs containing the token). Set NEOREAD_DEV_CONNECTOR=1 or NEOREAD_DEV_PROTOCOL=1 to enable the connector port or neoread:// protocol in development.

The first pnpm dev, pnpm desktop, or pnpm build downloads the pinned ~67 MB layout model into apps/processor/models/ (gitignored). For offline builds, set NEOREAD_BUILD_LAYOUT_MODEL to the absolute path of a local copy.

pnpm typecheck     # TypeScript type checking
pnpm test          # Go integration tests and Vitest
pnpm build         # Build Agent, Processor, Go, Web, Electron, and Connector
pnpm api:generate  # Regenerate client types from OpenAPI

The frontend uses React, TypeScript, Vite, Tailwind CSS, shadcn/ui (Base UI), and Zustand. Electron manages windows, updates, and service lifecycle. Go manages local storage, SQLite, search, and AI orchestration. PDF layout analysis runs locally in Node via ONNX Runtime.

apps/
├── desktop/       # Electron main / preload
├── web/           # React UI, PDF.js, and EPUB reader adapters
├── server/        # Go local server and neoread CLI
├── processor/     # PDF layout analysis, local layout model, and OCR
├── agent/         # Built-in Pi runtime and worker
├── connector/     # NeoRead Connector browser extension
└── cite-plugins/  # Word citation plugin
packages/
├── ui/            # shadcn/ui + Base UI components
├── neoread-core/  # Document, Location, TOC, Annotation, ReaderAdapter
└── api-client/    # OpenAPI types and API client
docs/              # Specs, roadmap, API contract, and verification notes
website/           # Static project website and README screenshots
assets/            # Logo sources and app icons

Current limitations

Currently focused on DRM-free, horizontal left-to-right reflowable EPUBs and PDFs. Password-protected PDF input, PDF thumbnails, background PDF full-text indexing, cross-document AI retrieval, Ollama, and reading statistics are not yet supported; complex cross-page PDF selections do not create highlights. Fixed-layout EPUBs, vertical text, RTL, and complex footnotes still need more real-world testing.

See the roadmap (Chinese) for upcoming work.

Star History

Acknowledgments

Thanks to Readium, PDF.js, shadcn/ui, and Base UI. The shadcn components live in packages/ui under packages/ui/LICENSE.md. See third-party sources (Chinese) for further attribution.

Project scope · Roadmap · OpenAPI · Verification notes


Today's world is filled with the noise and anxiety of AI. I see technology behind me and history before my eyes. Models, propelled by capital and politics, sweep history along and relentlessly crush yesterday. Even if everything else is destroyed, reading can never be replaced. You cannot ask an AI to savor a novel and pass the feeling of reading on to you, because reading is a private act—or rather, an act between one human being and another. Reading is communion, a meeting of human minds. It is the last thing that belongs to humanity.

Explore related projects

Loading…