modern-cli-stack
Pandoc + xelatex + Eisvogel build system for technical PDFs. Modern CLI Stack as the worked example.
A template and build pipeline that turns your markdown chapters into a print ready PDF book, using Pandoc and a sample 13 chapter book as the working example.
This project is a template for turning markdown files into a print ready PDF book, using a build pipeline built on Pandoc, xelatex, and a template called Eisvogel. Instead of writing directly in a word processor, you write your book chapters as plain markdown files, and the build system handles layout, fonts, and formatting to produce a finished PDF.
The repo ships with a working example called the Modern CLI Stack, a short thirteen chapter book about command line tools, so you can see exactly what the finished output looks like before you build your own. The example PDF itself is distributed for free through Gumroad, and a copy is also attached to the repo's release.
To use it for your own book, you fork the repo, then edit a few YAML configuration files to set your name, your book's title and version, and swap the example chapters for your own markdown files. Chapter order is controlled simply by how you name the files. One Python script, build.py, is the only command you need to run to produce the PDF, and there is also a watch mode that rebuilds automatically whenever you save a change.
Before each build, the system runs checks that catch missing metadata fields, likely signs of AI generated writing, and chapters that run too short or too long, so mistakes get caught early rather than after printing. A bundled install script sets up all the required tools on macOS, Linux, or Windows through WSL, and a GitHub Actions workflow can build the PDF automatically every time you push changes, saving the result as a downloadable file.
This is aimed at writers and developers who want to self publish a technical book or documentation set without learning a full desktop publishing tool, and are comfortable editing text files and running a script from the command line. It is released under the MIT license.
Where it fits
- Fork the repo and replace the example chapters with your own book's markdown files.
- Self publish a technical book or documentation set as a polished PDF without a desktop publishing tool.
- Automatically rebuild and validate your PDF on every push using the included GitHub Actions workflow.
- Use watch mode to see formatting changes rebuild live while you write.