So I built a small CLI that knows what specific publication formats are supposed to look like and just renders them correctly.
draft2final story.md --as manuscript
draft2final script.md --as screenplay
The manuscript format handles the actual spec: Courier/TNR at 12pt, 1-inch margins, running headers with word count, ~250 words/page, proper title page, widow/orphan control. The screenplay format handles scene headings, action blocks, character cues, parentheticals, MORE/CONT'D, and dual-dialogue — using blockquote syntax so the source file stays clean Markdown.Some implementation details that might interest people here:
The binary is 4MB. I wanted it installable in one command with no system dependencies — no LaTeX, no Pandoc, no headless Chrome. The font situation was the hardest part: proper manuscript formatting needs specific fonts, and some formats need CJK support, which means potentially large font files. I solved this with JIT font downloading — the CLI ships tiny and only pulls what it needs at render time.
A 30-page document renders in under 0.5s.
It handles right-to-left scripts and mixed Arabic/Latin/CJK text, which most converters either break or require manual configuration for.
It's open source. Each format is a self-contained TypeScript module, so adding new input or output formats is relatively straightforward — I'd like to eventually support APA, Chicago, and stage play formats, and contributions are welcome. That said, I'd especially like feedback from anyone who knows the manuscript or screenplay specs well — I'm sure there are edge cases I haven't hit yet.
Docs + syntax guide: https://draft2final.app/guide
npm install -g draft2final