docx · local · no word app

Convert Markdown to Word in the terminal

A Markdown to DOCX command, not a 200-line python-docx script. docgen-cli writes a real .docx you can open in Microsoft Word, Google Docs, or LibreOffice. Generating the file does not require Word to be installed.

docgen convert spec.md -o spec.docx --theme tech-spec

What comes through

Heading hierarchy, lists, tables, callouts, and fenced code. That is the document an agent should write: Markdown. The compiler owns page size, styles, and the Office package. Themes: tech-spec for RFCs, modern-executive for memos, minimal-paper for prose, corporate-slate for dense reviews.

Install

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

Need a PDF from the same source? docgen convert spec.md -o spec.pdf — see Markdown to PDF. Need a sheet? JSON or CSV to Excel.

Versus the usual workarounds

Agents reach for python-docx, then fight styles and missing deps. Pandoc can emit DOCX but is a larger toolchain. Browser “Markdown to Word” sites want an upload. This path is local, scriptable, and wired for MCP: docgen init-ai so Claude Code, Codex, Cursor, and Grok stop inventing a Word writer.

Pipes work too: git log -n 25 --oneline | docgen convert - -o changelog.docx --title "Commit History".

FAQ · star the repo