amitdevx/md2pdf ? reverse-engineered prompt

Reverse engineered prompt

Build me a lightweight Markdown to PDF tool called md2pdf that I can use from the command line and from Node.js.

I want to be able to point it at one markdown file or a bunch of files, and have it generate clean PDFs with good page breaks, margins, and typography. It should keep things like code blocks, tables, images, Mermaid diagrams, KaTeX math, and basic Obsidian style notes working nicely. Please add a few built in themes, support a table of contents, and make it easy to set the output name and paper size. If you can, include a simple cache so repeated batch runs skip files that have not changed, plus an init command to set things up and a doctor command to check whether the browser and environment are ready. A small config file should work too. Use current docs online if you need to, and make it feel polished and reliable.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab