Foliate: a GTK4 e-book reader that runs directly from source with gjs
GitHub RepoImpressions57
View on GitHub
@githubprojectsPost Author

Foliate: A GTK4 E-Book Reader You Can Run Straight from Source with GJS

You know that feeling when you find a project that makes you think, "Wait, that's how you build a modern Linux app?" That's Foliate for e-book readers. It's a GTK4 reader that doesn't need a build step or a complex dependency chain—it just runs from source using GJS, the JavaScript bindings for GNOME. If you're into Linux desktop dev or just want a clean, fast way to read EPUBs, PDFs, or Mobis, this is worth a look.

What It Does

Foliate is a full-featured e-book reader for Linux. It supports EPUB, PDF, MOBI, AZW, and a bunch of other formats. You get the typical stuff: bookmarks, search, dictionary lookups, dark mode, and adjustable fonts and margins. But the underlying architecture is what makes it stand out—it's written in JavaScript and runs directly from the source folder with GJS, meaning there's no compilation step and no binary to install. Want to hack on it? Just clone the repo, launch it, and your changes take effect immediately.

Why It's Cool

Three things make Foliate notable:

1. Runs from source with no build step. Seriously. You clone the repo, cd into it, and run gjs -m src/main.js. That's it. The UI is built with GTK4 widgets, so it looks and feels like a native GNOME app, but you're essentially running a JavaScript file. For devs who want to experiment with GTK4 without wrestling with C or Vala, this is a killer example.

2. Modern GTK4 design. It uses GTK4's latest widgets—like the AdwNavigationView for sidebar navigation and smooth transitions. The reader pane scrolls fluidly, and the overall responsiveness is solid. It doesn't feel like a toy; it feels like a production app.

3. Clever use of GJS for performance. The rendering is done via a custom PangoLayout engine, so pagination and reflow happen quickly. You can also install extensions (like custom CSS themes) by dropping files into a local directory. That's a neat way to keep the app expandable without adding bloat.

How to Try It

You need GTK4 and GJS installed (both come with GNOME on most distros). On Ubuntu/Debian, that's:

sudo apt install gjs libgtk-4-dev

Then clone and run:

git clone https://github.com/johnfactotum/foliate.git
cd foliate
gjs -m src/main.js

That's it. Open an EPUB or PDF from the file menu, or drag and drop one onto the window. If you prefer a packaged version, there are Flatpaks available, but running from source gives you instant feedback on any tweaks.

Final Thoughts

Foliate is a great example of how far GJS and GTK4 have come. If you've been curious about building GTK apps but don't want to learn C or Vala, spend an hour looking through Foliate's source. The code is clean, well-organized, and shows exactly how to wire up a modern GNOME app with JavaScript. Plus, it's a genuinely good e-book reader. For anyone on Linux who reads a lot and appreciates a native, snappy UI, this is a solid choice.

Follow @githubprojects for more open source highlights like this.

Back to Projects
Last updated: June 18, 2026 at 07:41 AM