Skip to content

Repository files navigation

 delryn

A fast, keyboard-driven terminal reader for EPUB, PDF, and MOBI / AZW3 — with real graphics: syntax-highlighted code, tables, inline figures, and typeset math.

CI License: MIT Rust 1.96+ Sponsor


delryn — a two-page spread with syntax-highlighted code and a live table of contents

Syntax-highlighted code, a live table of contents, and a two-page spread — and it follows your terminal's light or dark theme.

See more screenshots

Real tables and an inline figure in a two-page academic paper

Tables & figures — real tables and inline diagrams, in a two-page spread



Captured on Ghostty, which renders real inline graphics.


Features

Formats & rendering

  • EPUB (reflowable), PDF (page-image), and MOBI / AZW3
  • Syntax-highlighted code (syntect) — a listing that doesn't say what language it is follows the rest of its section, then the book's own language, rather than going grey
  • Inline figures & diagrams, and typeset math — LaTeX and MathML, laid out by a built-in engine and never left blank (typeset → publisher figure → Unicode)
  • DPI-independent equation & image sizing, with theme-aware image recolour

Reading

  • Single column or two-page spread, which turns a whole spread at a time
  • Page mode (turn whole pages) and continuous scroll (chapters flow together) as independent settings, in either view
  • Justified text with hyphenation (English patterns) and optimal (Knuth–Plass) line breaking, and a capped measure so a maximised terminal still reads like a page
  • RTL (manga) direction, per-chapter lock, and a distraction-free focus mode
  • Jump by element type (code · table · math · figure); vim motions with counts
  • Code folding, plus fullscreen code and figure browsers

PDF

  • Continuous page stacking, zoom / pan, fit modes (page / width / height), and margin trim

Annotations, search & lookup

  • Bookmarks, colour highlights, and notes, in a tabbed annotations browser
  • Vim-style visual selection to copy, highlight, or note a range; Markdown export
  • A highlight pen — the selection is washed in the colour before you commit it, so you pick by looking at it rather than blind
  • In-book search — plain, regex, or fuzzy — with match navigation and history
  • Word lookup (K) — dictionary and Wikipedia, with translation

Library

  • Multi-folder sources with background scanning, and a "find my books" search that proposes the folders in your home directory that hold books, with counts, to add in one go
  • Sections (Recent, Favorites, Currently Reading, Series, Duplicates) and collections / shelves
  • Ratings, reading status, and tags; list, compact, or cover-grid layouts
  • CSV export, statistics, and duplicate detection (metadata + deep cover-hash)
  • Metadata editor with Open Library lookup for details and cover art

Interface

  • 9 built-in themes (auto, dark, oled, high-contrast, solarized dark / light, dracula, gruvbox, light) plus custom TOML
  • Command palette (:), a configurable status bar, and full mouse support

Requirements

delryn's text UI runs in any terminal, but images, PDF pages, and graphical math need a terminal that speaks the Kitty graphics protocol. Without one, EPUB / MOBI text still reads fine — figures fall back to placeholders, graphical math to a Unicode approximation, and PDF won't open.

Important

delryn is developed on Ghostty, where everything works. Detection is automatic — delryn --terminal reports what your terminal claims and which protocol was chosen — but the implementations differ enough to be worth stating:

Terminal Status
Ghostty Everything: covers, figures, math, PDF pages, continuous page scroll
iTerm2 ≥ 3.6 Everything except continuous scrolling of PDF pages, which falls back to turning pages (the status bar says pages (terminal))
WezTerm Renders correctly; a two-page spread (v) on a PDF can crash the terminal itself
Kitty Expected to work — not yet verified

iTerm2 answers the Kitty capability query affirmatively without implementing all of it, so covers and the image viewer switch to its own protocol. Its Kitty implementation also has no cheap way to move a placed image, which is what a continuous page stack does on every scrolled row — hence the page-mode fallback there.

Note

tmux / screen intercept the graphics protocol, so images and PDF render blank inside them — run delryn outside a multiplexer for now (passthrough is planned). PDFs are parsed by PDFium in-process and unsandboxed, as in most desktop readers — open PDFs you trust.

Note

What talks to the network. Only two things, both on demand and both optional: the metadata/cover editor (Open Library, Google Books) and word lookup K. Lookup queries the Free Dictionary API and Wikipedia by default and translation is off by default; each is an independent toggle in Settings ▸ Lookup, and turning all three off — or installing sdcv for offline StarDict lookup — makes delryn fully offline. Nothing is sent in the background, and there is no telemetry.


Install

Prebuilt binaries

Download your platform's tarball from the Releases page. Nothing to install and nothing to configure — PDF support is built into the binary, so you can move delryn anywhere on your PATH and it keeps working:

tar xzf delryn-<version>-<target>.tar.gz
cd delryn-<version>-<target>
./delryn

Prebuilt targets: Linux x86_64, macOS arm64 & x86_64. Each archive ships a .sha256 to verify.

Note

macOS Gatekeeper. The binaries aren't notarized, so clear the quarantine flag once: xattr -d com.apple.quarantine ./delryn

From source

Requires Rust 1.96+ (edition 2024) — rustup update if you're behind:

git clone https://github.com/dilmun/delryn
cd delryn
cargo build --release
./target/release/delryn

A source build has no PDF support out of the box — release binaries embed libpdfium, but cargo build can't. EPUB and MOBI/AZW3 read fine; for PDF, drop a libpdfium beside the binary or point DELRYN_PDFIUM_DIR at one. docs/RELEASING.md has the pinned build and a copy-paste setup.


Usage

delryn                       # open the library
delryn path/to/book.epub     # open a book straight away (EPUB / PDF / MOBI / AZW3)
delryn ~/Books ~/Papers      # register folder(s) as library sources, then open
delryn --add <dir># register + index folder(s), no UI  (also: -a)
delryn --rescan              # re-read metadata for every book, prune missing files
delryn --index               # build the full-text search index
delryn --export-annotations  # dump all notes & bookmarks as Markdown to stdout
delryn --clear-cache         # delete cached page / figure / equation images
delryn --terminal            # what this terminal says about its graphics support
delryn --help                # usage  (also: -h)   ·   --version / -V

If images, PDF pages, or math render wrongly — blank, doubled in size, in the wrong place — run delryn --terminal first: it prints what your terminal calls itself, which image protocol was chosen, and the two cell sizes it reports. Two overrides exist for when detection is wrong: DELRYN_IMAGE_PROTOCOL=kitty|iterm2|sixel|halfblocks and DELRYN_CELL_SIZE=WxH.

Don't know where your books are? Press ;SourcesFind my books (or :Find my books) and delryn searches your home folder, then offers the folders that hold books — with a count each — for you to tick.

Registered folders re-sync by themselves: every launch runs a background scan that picks up new and changed books and forgets ones whose files are gone. It's incremental, so a large library costs little. Rescan now on the Sources tab (or delryn --rescan) forces a full re-read and also drops books that no longer sit under any configured folder. Books on an unmounted drive are kept, not pruned.


Key bindings

Vim-style and count-aware (10j, 50G). Every screen shows its own legend in the status bar — the essentials:

Reader — navigation
Key Action
j k · line down / up
Space · Ctrl-f Ctrl-b page down / up
Ctrl-d Ctrl-u half-page down / up
gg · G top · bottom (NG → page/section N)
J K next / previous chapter
Ctrl-o Ctrl-p jump-list back / forward
w b next / prev rich element (code · table · math · figure)
Tab · s focus / toggle the table-of-contents sidebar
/ · n N search (plain / regex / fuzzy) · next / prev match
q · Q back to library · quit
Reader — layout, modes & PDF
Key Action
v center ⇄ two-page
p page mode — turn whole pages ⇄ scroll by rows (continuous flow is a setting)
c chapter lock — stop at the chapter edge instead of flowing on
t · M cycle theme · reading preset (Default / Study / Research / Presentation)
[ ] · { } reading column narrower / wider · line spacing
f · z focus (distraction-free) mode · toggle status bar
+ - 0 · W · x (PDF) zoom / reset · fit mode · margin trim
Reader — annotations & selection
Key Action
m · H · a bookmark · highlight (repeat to recolour) · note
' open annotations browser (Bookmarks / Notes / Highlights)
V cursor / visual selection (v or Space anchors it; Esc leaves)
↳ in V y copy · c/Tab step the pen · /H highlight · 15 pick a colour
↳ in V a note · m bookmark the line · K look the word or phrase up
I · O figure browser · code browser (fullscreen, scroll + copy)
Z · F fold all long code · pick a visible code block to fold (19)
Library
Key Action
h j k l · Enter o move · open
Ctrl-n Ctrl-p next / previous in any list — including while typing a filter
/ · s S filter · sort / reverse
f · 05 · m favorite · rate · reading status
e · T · c edit metadata · tags · add to collection
v · + - cycle layout (list / compact / grid) · grid card size
Space V A mark · visual-range · mark all
r rename the file
D · R · I resolve duplicates · deep content scan · ignored groups
: · i · ; command palette (incl. "Find my books") · statistics · settings
? key reference — every binding for the current screen
Delete move to trash (with confirm)

Configuration

delryn reads ~/.config/delryn/config.toml (TOML), but everything is also editable live in the app — press ; for the Settings overlay, which writes the file on close (atomically, and owner-only: the config and the library database hold your reading history, notes and highlights). Highlights: theme, typography (margins, max text width, line & paragraph spacing, justify, hyphenation), pagination (page mode, continuous scroll, chapter lock), reading mode & direction, image / math scaling, PDF trim, cache_limit_mb (disk ceiling for cached page/figure images — default 512 MB, 0 for unlimited), and a [status] block to compose the status bar (per-zone segment order, separator, clock). The same folder holds the library database, cover cache, and themes/ for your own *.toml themes.


Contributing & releases

Branch → PR → squash-merge, with the PR title a Conventional Commit. Releases are automated — merge the standing release PR to publish. The full workflow, the commit / version / changelog conventions, and the pipeline internals live in docs/RELEASING.md.

Before pushing, run the same gate CI does:

cargo fmt --all --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace

License

MIT © 2026 dilmun

Built on ratatui, syntect, pdfium, RaTeX, hypher, and the epub / scraper / image crates — thank you to those projects.

About

Terminal EPUB/PDF reader

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages