Skip to main content

tomes

Read books made with Quarto in your terminal

AI / Agents

Skills
llms.txt
llms-full.txt

Developers

Jeroen Janssens

Author, maintainer

Community

Full license MIT

Meta

Requires: Python >=3.8
Package Info

tomes reads books made with Quarto in your terminal. Code and terminal output keep their colors. Search the whole book, follow links and footnotes, copy code, and run it in a terminal next to the book.

uvx tomes https://r4ds.hadley.nz/

Download the recording (asciicast) and play it with asciinema play hero.cast.

Why read a book in the terminal?

When a book is about code, the terminal is where the code runs. With tomes the book is right there: copy a command with yc, or send it to a tmux pane or to a terminal inside the reader with s. Everything is one key away, and Vim users feel at home. It starts in milliseconds, works offline once it has read a book, and also works over SSH.

What it does

  • Colors as on the website. Code keeps its syntax colors, and the output of terminal sessions made with quarto-term keeps its colors. Use your terminal’s palette, or the book’s in light or dark.
  • Getting around. The outline follows you as you read. Fold sections, jump back with Ctrl-o, set marks and bookmarks.
  • Search. / on the page, Ctrl-p in the whole book, straight to the line.
  • Links, cross-references, and footnotes work, and K shows them in a popup.
  • Images with the Kitty, iTerm2, or Sixel protocol, and colored blocks everywhere else. Tables fit the width or scroll sideways.
  • Books on the web or on your computer. Space o lists free books made with Quarto, like R for Data Science and Python for Data Analysis.
  • On the command line, too: cat, toc, search, and commands.

Install

uv tool install tomes      # or: pipx install tomes, cargo install tomes

Or download a binary from the releases. See Installation.

One book, built in

tomes is also a Rust library: build a book into a program of its own, which opens it right away, also offline. dsatcl does that for Data Science at the Command Line:

uvx dsatcl