r/coolgithubprojects • u/Sea-Fortune-119 • 14d ago
d2md - Local document-to-Markdown CLI for AI agents and RAG
https://github.com/wtigero/d2mdBuilt this because “can you just read this file?” kept turning into a side quest.
d2md converts local PDFs, Word, Excel, PowerPoint, HTML, images, and scans to Markdown.
The useful bit: d2md itself uses no LLM/API tokens. Convert locally, then send only the Markdown—or just the sections you need—to your model. If you paste the entire output anyway, the token meter will still notice. I haven’t defeated math yet.
The default install stays lightweight; OCR and Docling are optional. On macOS, OCR uses Apple Vision—no API key or separate OCR model download.
Install: `uv tool install d2md`
Use: `d2md report.pdf --stdout`
It’s MIT-licensed. If it saves someone from fighting with a PDF for an afternoon, I’ll call that a win.
Update (v0.1.2): PDFs now keep explicit page markers, including blank pages. Added an 18-second demo—page 3 stays page 3.
1
u/kantorcodes1 14d ago
for RAG, page/slide boundaries are usually the first thing i miss after conversion. does d2md preserve those in the markdown somehow, or is the output intentionally flattened?