deft / guides

Markdown to PDF from the command line

deft md to-pdf typesets a Markdown file as a PDF: headings, lists, tables, code blocks and images.

deft md to-pdf README.md -o README.pdf

Options

--page-size a4|letter|legal|a3|a5
Paper size, A4 by default.
--margin 25mm
Page margin.
--font-size 11
Body text size in points.
--font NAME
A font family installed on the machine.
-o FILE|DIR
Where to write. Without it, notes.md becomes notes.pdf.

All options: deft md to-pdf --help. Add --json for a structured result.

A real run

The released deft on a real file. This is exactly what it printed:

$ deft md to-pdf README.md -o README.pdf
ok md.to-pdf README.md -> README.pdf  8 pages  1.02s

Limits

What it saves an AI agent

Every task in the deft benchmark that uses this command, run by Claude Code (Opus 5.5, medium effort) once without deft and once with deft and its skill installed. The prompt never mentions deft. Each cell reads without → with deft; click a task for the agent's full trace.

TaskSolvedTime New tokensFailed commands
Web page to a PDF with contentsSave the CDC flu page flu.html as a PDF to read offline, flu.pdf, with a table of contents of its sections before the main text.yes → yes173 s → 34 s49.4k → 17.5k7 → 0
Chinese Markdown to PDF把 books.md 转成 PDF,保存为 books.pdf,中文必须正常显示。yes → yes85 s → 23 s26.1k → 13.6k4 → 0
README to PDFRender rust-readme.md as a nicely formatted PDF called readme.pdf.yes → yes70 s → 23 s23.1k → 17.6k5 → 0
Report with an image and tableRender report.md as report.pdf. The charts it shows from doc/images must appear in the PDF.yes → yes133 s → 23 s44.1k → 18.8k8 → 0
Turn a workbook into a reportSend the numbers in temperature.xlsx to a client as a PDF with a proper table, temperature.pdf, and give me a Word copy, temperature.docx, that I can edit.yes → yes70 s → 30 s21.1k → 14.5k3 → 0
Summary table as a one-page PDFFrom tips.csv make a one-page PDF, tips.pdf, for the staff meeting: a table with one row per day and one column each for Lunch and Dinner, holding the total tips.yes → yes45 s → 27 s18.5k → 13.2k4 → 0
Slide count and a printed outline handoutI'm running the workshop in workshop.pptx. Write the number of slides to count.txt, and make handout.pdf: a printable outline of the deck with every slide's title and text.yes → yes105 s → 28 s31.3k → 18.7k4 → 0
All 7 tasks7 → 7681 s → 189 s213.6k → 114.1k35 → 0

One run per task and arm, on 2026-11-15. Deft was improved against these same tasks, so this is a development benchmark, not a held-out test. New tokens are input not served from the prompt cache, plus output. Failed commands are the agent's tool calls that returned an error: shell commands, and file reads and writes. All tasks: the benchmark.

Install

curl -fsSL https://deftcli.com/install.sh | sh

Or brew install firstprayer/tap/deft. One binary for macOS and Linux; the script also sets up the skill for Claude Code and Codex. Install guide.