Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Leaf app icon

Leaf

A thoughtful EPUB reader for macOS, built for focused reading, bilingual books, and notes you can take with you.

macOS 14 or later Swift 5.10 Version 1.0.0

Leaf library showing books, collections, search, and reading progress

Leaf brings the calm of a dedicated reader together with practical tools for studying, translating, and organizing books. Read EPUBs offline, switch into a bilingual layout when you need it, capture ideas without leaving the page, and export your annotations as portable Markdown.

Why Leaf

  • Read without friction. Choose paginated or scrolling layouts, navigate with the keyboard or trackpad, search within a book, and resume exactly where you stopped.
  • Read bilingually. Translate the current chapter with OpenRouter and display the result interleaved, side by side, or translation-first. Leaf caches completed translations for later reading.
  • Read with an AI assistant. Select a passage, ask a question, and get a contextual answer from your configured OpenRouter model.
  • Keep better notes. Highlight in five colors, attach notes, copy passages, create quote cards, and export annotations as Markdown.
  • Build a useful library. Search book metadata and annotations, add tags and favorites, sort your collection, edit covers and metadata, detect duplicate imports, and repair moved files.
  • Make reading comfortable. Adjust themes, typefaces, font size, line spacing, and margins for each reading session.

Leaf reader showing bilingual translation and the text-selection annotation menu

Bilingual reading

Turn on bilingual mode from the reader toolbar, choose a target language and layout, then start translation. Leaf sends the current chapter text to OpenRouter and stores successful paragraph translations in a local cache, so previously translated content can be reused when you reopen the book.

Supported target languages include Simplified and Traditional Chinese, English, Japanese, Korean, French, German, and Spanish. A custom glossary helps keep names and specialist terms consistent.

Bilingual translation requires your own OpenRouter API key and an internet connection. The key is stored in the macOS Keychain; ordinary EPUB reading remains offline.

Ask AI

Select text in the reader and choose Ask AI from the instant selection popover. Enter a question to send the selected passage and your question to the OpenRouter model configured in Settings. Answers appear in the same popover and can be selected or copied. Nothing is sent merely by opening the Ask AI panel.

Build from source

Leaf requires macOS 14 or later, Xcode command-line tools, and Swift 5.10 or later.

Clone this repository, then run:

make app
open build/Leaf.app

The packaged application will be created at build/Leaf.app.

To run the test suite:

swift test

Your reading data

Books stay where you imported them from. Reading progress, bookmarks, annotations, library metadata, and translation caches are stored locally on your Mac. Annotation exports use plain Markdown so your notes remain useful outside Leaf.

Contributing

Bug reports, feature ideas, and pull requests are welcome. If you are planning a larger change, open an issue first so the approach can be discussed.

About

A thoughtful EPUB reader for macOS with bilingual translation, Markdown annotations, and powerful library management.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages