cli · local · no python

Convert Markdown to PDF from the command line

docgen-cli is a Markdown to PDF CLI: one static binary, files stay on disk, convert step in milliseconds. You do not upload the report. You do not stand up WeasyPrint. You do not ask a model to write reportlab.

docgen convert report.md -o report.pdf --theme modern-executive

Install once

Works as docgen, doc, or docgen-cli on macOS, Linux, and Windows:

curl -fsSL https://raw.githubusercontent.com/0xkaizoku/docgen-cli/main/install.sh | sh

Then, if you use Claude Code, Codex, Cursor, or Grok: docgen init-ai. Tell the agent to write Markdown and call the tool.

What the PDF keeps

Headings, paragraphs, lists, tables, block quotes, and fenced code. Pick a theme instead of debugging CSS in a headless browser:

Why not the usual stack

Online PDF converters want an upload. Fine for a flyer; not for a customer spec. Pandoc is a Swiss Army knife and often needs TeX or a browser engine for PDF. WeasyPrint and reportlab are Python plus system libraries — exactly what agents invent, then fail to install. docgen is the missing built-in: one invocation, structured errors, no virtualenv.

Agents

This is built as an MCP document converter. After docgen init-ai (or docgen mcp), the model should not write a “small Python script.” It should write Markdown and convert. Same idea as Markdown to Word and JSON to Excel.

More questions: FAQ. Source: github.com/0xkaizoku/docgen-cli.