Skip to content

CLI Reference

mkuch edited this page Jul 13, 2026 · 2 revisions

CLI Reference

Only input and output paths are required for a normal export:

rayomd --export input.md output.pdf

Windows uses rayomd.exe; Linux and WSL commonly use ./rayomd.

Commands

rayomd --version
rayomd --doctor
rayomd --export input.md output.pdf native elegant normal
rayomd --export input.md reversible.pdf native elegant normal --embed-source
rayomd --inspect-source reversible.pdf
rayomd --recover-source reversible.pdf recovered.md
rayomd --stdin output.pdf native elegant normal
rayomd --batch input-folder output-folder native modern normal --workers=4
rayomd --stdin-batch output-folder native modern normal
rayomd --serve output-folder native modern normal
rayomd --bench input.md bench-output-folder 5000 modern normal
Mode Use case
--version Print the compiled project version
--doctor Diagnose capabilities, fonts, temporary output, and a smoke export
--inspect-source Validate and describe an embedded RayoMD source profile
--recover-source Recover byte-exact Markdown from a validated reversible PDF
--export Convert one Markdown file
--stdin Read Markdown from stdin and create one PDF
--batch Convert every .md file in a folder
--stdin-batch Read Markdown file paths from stdin
--serve Keep one process warm and read paths from stdin
--bench Measure native PDF generation time and output size

Styles are elegant, modern, and tech. Margins are compact, normal, wide, margin=0.75in, or margin=54pt.

Resource and concurrency flags

  • --allow-url-images enables HTTP/HTTPS fetching with private/local network protections.
  • --allow-unsafe-local-images permits trusted documents to escape the source directory.
  • --workers=N sets the native folder/stdin-batch worker limit from 1 to 64.
  • --embed-source opts native workflows into exact Markdown recovery. See Reversible PDFs.

Exit codes

Code Meaning
0 Success
2 Missing or invalid arguments
3 Input file or stdin could not be read
11 Native exporter could not load a system font
12 Native exporter could not write the PDF
14 Embedded source exceeds 10 MiB
15 Embedded source is not valid UTF-8
16 Reversible PDF would exceed the 256 MiB recovery limit
20 Pandoc export failed or is unsupported
30 PDF has no reversible RayoMD profile
31 Reversible profile version is unsupported
32 PDF/profile is corrupt, invalid UTF-8, or fails validation
33 PDF or recovered source exceeds a configured limit
34 Recovery destination already exists

Clone this wiki locally