faq · for cli developers
Free document converter for the command line
docgen-cli is a free local document converter for people who live in a terminal — and for AI coding agents that keep writing Python to make a PDF. Convert Markdown to PDF, Markdown to Word, and JSON or CSV to Excel without uploading anything, without pip install, and without LibreOffice.
Install: curl -fsSL https://raw.githubusercontent.com/0xkaizoku/docgen-cli/main/install.sh | sh · source: github.com/0xkaizoku/docgen-cli
Is there a free document converter for the command line?
Yes. docgen-cli is a free command-line document converter: one Rust binary on macOS, Linux, and Windows. No SaaS login. No “3 files per day.” You run it next to git and curl.
How do I convert Markdown to PDF from the CLI without Python?
Skip reportlab, WeasyPrint, and headless Chrome:
docgen convert report.md -o report.pdf --theme modern-executive
That is a Markdown to PDF CLI path with no virtualenv. The model (or you) writes Markdown; the compiler writes the PDF. Full walkthrough: convert Markdown to PDF from the command line.
Can I convert Markdown to Word (DOCX) in the terminal?
Yes — a Markdown to DOCX command, no Word app required to generate the file:
docgen convert spec.md -o spec.docx --theme tech-spec
Headings, lists, tables, callouts, and fenced code go through. Open the result in Word, Google Docs, or LibreOffice like any other .docx. See the Markdown to Word guide.
How do I turn JSON or CSV into an Excel file from the command line?
JSON to Excel and CSV to XLSX are first-class:
docgen convert sales.json -o sales.xlsx
docgen convert metrics.csv -o metrics.xlsx
Useful in scripts and CI when you would rather not stand up pandas + openpyxl for a table dump. JSON / CSV to Excel from the CLI.
Is this an online PDF converter? Do I have to upload files?
No. This is a local PDF generator. Documents never hit our servers because there is no conversion API on this site. Browser “free document converter” sites are a different product — and a different threat model. If your spec cannot leave the laptop, use the CLI.
How is this different from Pandoc or WeasyPrint?
Pandoc is a general converter; PDF often means a TeX live install or a browser engine. WeasyPrint is Python plus system libraries. docgen-cli is a single static binary plus MCP, with themes and JSON errors so an agent can recover in one shot instead of writing a script. If you already have a Pandoc pipeline you love, keep it. If your agent is about to pip install reportlab, use this.
Does it work with Claude Code, Codex, Cursor, and Grok?
Yes. It is built as an MCP document converter for those CLIs:
docgen init-ai · or docgen mcp
Tell the agent: write Markdown, call docgen convert, do not invent Python unless the tool returns an unsupported-feature error.
What can I convert? Which themes?
Inputs: Markdown, JSON, CSV/TSV, stdin, --text. Outputs: PDF, DOCX, XLSX, HTML. Themes: modern-executive, tech-spec, minimal-paper, corporate-slate, dark-glass.
Can I pipe command output into a document?
Yes. A CLI document generator should take stdin:
git log -n 25 --oneline | docgen convert - -o changelog.docx --title "Commit History"
Is docgen-cli free? What does a conversion cost?
The binary is free to run (personal, internal, commercial generation). Runtime cost is electricity. Token cost is whatever your agent spends to write Markdown and call the tool — typically tens of tokens, not a 3,000-token reportlab session. License: run freely; do not clone it as a competing product. See terms and the LICENSE.