go · CLI + library

Write Markdown.
Ship an audited book.

pretty-converter turns a folder of Markdown into a PDF, EPUB, and Kindle book via headless Chrome — then audits the result for overflow, broken links, and low-contrast text before you ship. No LaTeX, no design tools, nothing to install but a binary.

$ go install github.com/sazardev/go-pretty-converter/cmd/pretty-converter@latest
Read the docs →
book/ — pretty-converter build

How it works

Three steps between a folder of notes and a finished book.

01 — Write

Plain Markdown, plain frontmatter

.md, .mdx, or even bare .txt — missing frontmatter gets an id/title generated from the filename automatically.

---
id: "[1.0.0]"
title: Getting Started
---

# Getting Started

02 — Configure

Pick a theme, a trim size, a cover

17 built-in themes, custom paper dimensions for print-on-demand, and a cover image — all from one config file.

theme: gruvbox
paper: 6x9in
cover_image: cover.svg

03 — Ship

One command, three formats, audited

Every build runs a quality audit — overflow, broken images, clipped headings — before you ever open the file.

$ pretty-converter build \
    --format pdf,epub,kindle

Everything a real book needs

Built for print, not just for screens.

Every feature below ships in the core binary — no plugins, no paid tier.

01

17 built-in themes

From clean & minimal to Gruvbox, LaTeX-style academic papers, and government letterhead.

02

PDF + EPUB + Kindle, one source

Build all three formats from the same Markdown in a single pass — no separate pipeline to maintain.

03

Print-ready trim sizes

6×9in, A5, or exact mm/in dimensions — the sizes real print-on-demand services expect.

04

Syntax highlighting

Fenced code blocks are highlighted via Chroma, with a palette matched to your theme.

05

Auto TOC & bookmarks

Table of contents and PDF bookmarks are generated straight from your headings.

06

Automatic quality audit

Every render is checked for overflow, broken images, low-contrast text, and clipped headings — before you are.

07

Custom components

<DeepDive>, <Warning>, <Axiom> — or register your own in Go.

08

Live reload

watch and serve rebuild on save, with the browser refreshing instantly.

09

Write however you want

Even a stray .txt file gets folded in — auto-numbered, auto-titled, zero setup.

10

Pre-build content analysis

pretty-converter analyze flags dead links, oversized tables, and skipped heading levels across every format — before you build anything.

11

One config, every command

go-pretty-converter.yml sets source, theme, and metadata once — build, epub, kindle, check, and analyze all read the same file.

12

CI-friendly by default

--json output on build/analyze, and meaningful exit codes throughout — --strict promotes warnings to failures for release gates.

The CLI

Every command, right at your fingertips.

The whole tool is one binary with a handful of commands — everything below works on Linux, macOS, and Windows.

pretty-converter init my-bookScaffold a book: skeleton MDX + config.
pretty-converter analyzeFlag cross-format rendering issues — no Chrome/Calibre needed.
pretty-converter buildRender PDF, EPUB, and/or Kindle (--format pdf,epub,kindle).
pretty-converter checkValidate source only — no Chrome needed.
pretty-converter epubBuild an EPUB 3, no Chrome required.
pretty-converter kindleBuild a Kindle MOBI/AZW3 via Calibre's ebook-convert.
pretty-converter serveLive HTML preview with live reload.
pretty-converter watchRebuild the PDF on every save.
pretty-converter theme listBrowse 17 built-in themes or add your own.
pretty-converter completionShell completions for bash, zsh, fish.

Full CLI reference →

Themes — try one

17 palettes. Same Markdown.

This page is skinned with the exact same tokens as the real themes — click one, the whole site follows.

default
professional
minimal
minimal
modern
professional
classic
editorial
corporate
professional
dark
dark
academic
academic
editorial
editorial
sepia
warm
terminal
technical
blueprint
technical
ivy
institutional
government
institutional
resume
resume
legal
formal
latex
academic
gruvbox
technical

Currently previewing default — this is exactly what your book's cover, headings, and code blocks would use. Download this page's docs in this theme →

The comparison

Same Markdown. A different toolchain.

 LaTeXOther MD→PDF toolspretty-converter
Automatic quality audit (overflow, contrast, broken links)——Yes
PDF + EPUB + Kindle from one source—Rarely all threeYes
Runs headless in CIYesVariesYes
Learning curveSteepVaries by toolJust Markdown
Print-ready trim sizesManualRareBuilt in
Free & open sourceYesMostlyMIT licensed

Measured, not estimated

A 3,000-doc book — print-ready in ~23 seconds.

Real books rendered end-to-end: parse, validate, compose, Chrome print, and the quality audit are all inside the wall time. Reproducible on your own machine — full methodology and every size in BENCHMARKS.md.

Source docsValidationEPUBPDF pagesPDF wall timeThroughput
10030 ms27 ms1210.57 s211 pages/s
1,00062 ms88 ms1,1802.99 s394 pages/s
3,000142 ms248 ms3,53523.02 s154 pages/s

Full methodology & all sizes →

17built-in themes
3output formats, one source
30+automated quality checks
100%free & MIT licensed

FAQ

Frequently asked questions

Straight answers about how go-pretty-converter works, what it needs, and what it can build.

Does go-pretty-converter require LaTeX?

No. PDFs are rendered from Markdown/MDX via headless Chrome — no LaTeX, no separate design tool, nothing to install but the binary.

What makes go-pretty-converter different from Pandoc, mdBook, or other Markdown tools?

The quality audit. Most Markdown→PDF tools convert and stop; go-pretty-converter converts, then automatically checks the result for overflow, broken links, low-contrast text, and clipped headings — before you ever open the file. Pair that with one Markdown source building PDF, EPUB, and Kindle alike, and it's the only toolchain in the category that does all three.

Does it require a manual Chrome install?

Usually not. On first render, chromemgr auto-downloads a headless Chrome build if no system Chrome or --chrome-path is found. Only on linux/arm64 you must provide Chrome yourself.

Can I build an EPUB without Chrome?

Yes. The epub command builds EPUB 3 output from the same Markdown with no Chrome or Chromium required.

Do I need Chrome for Kindle output too?

No. pretty-converter kindle builds the same EPUB with no Chrome required, then converts it to MOBI/AZW3 with Calibre's ebook-convert — install Calibre separately and it's picked up from PATH, or point --calibre-path at it.

What input file formats are supported?

.md, .mdx, and even bare .txt files. Documents are ordered by their [X.Y.Z] frontmatter id, not by filename.

How many themes are built in?

17 themes — from minimal and modern to Gruvbox, LaTeX-style academic, corporate, and government letterhead — plus a custom .theme.yml system and per-theme color/font overrides.

Can I build PDF, EPUB, and Kindle from one source?

Yes. A single command (--format pdf,epub,kindle) builds all three from the same Markdown in one pass — no separate pipeline to maintain.

What does pretty-converter analyze check?

Content patterns that render poorly across formats — broken internal links, missing local images, tables too wide for Kindle, skipped heading levels, overlong code lines, and more — graded as errors, warnings, or improvements. It runs statically, before any build, with no Chrome or Calibre required.

Is it fast on big books?

Yes. A 3,000-document book validates in 142 ms and renders a 3,535-page PDF in ~23 s on a mid-range i5. The Go-side pipeline stays sub-second at every size — see BENCHMARKS.md for the reproducible methodology.

Is go-pretty-converter free?

Yes — MIT licensed, open source, no paid tier. Every feature ships in the core binary.

Read the full documentation →