Hi HN, Most terminal Markdown renderers, such as glow and mdcat, buffer the entire document before rendering. This makes them poorly suited to live LLM output and can result in unnecessary CPU and memory usage. I built mdflow, a true real-time streaming Markdown cli renderer that is super fast and lightweight. I started with MD4C, written in C, like others it also buffers the whole document, but its flat-buffer design made it possible for me to reconstruct feature by feature, that render and emit output immediately. Streaming: Renders and outputs in real-time, line by line Markdown support: Tested against the CommonMark and GFM test suites Performance: ~ 10 to 100x faster than existing renderers in my benchmarks ~ 2MB RAM regardless of input size ~ 300KB binary, no deps Limitaions: Markdown was not designed with streaming in mind. However much of the Markdown today is generated incrementally, by LLMs. In practice, when Markdown is generated properly, it rarely uses features that depend on future output, so the limitations are almost nonexistent. For more details, please see the GitHub repository. I’d love to hear your feedback. (In my benchmarks, glow - the most popular cli renderer, was about 100x slower and used about 100x more RAM, which is quite unexpeected that I'd appreciate it if anyone could review or run a benchmarks to verify) https://github.com/cjccjj/mdflow
Repository
cjccjj/mdflow
mdflow
Unlike mdcat and Glow (Glamour), which buffer the entire input before rendering, mdflow streams Markdown to the terminal in real time. It is also very fast and lightweight.
17stars
cjccjj/mdflow
mdflow
A small, fast, true streaming Markdown-to-terminal renderer. Supports CommonMark + GFM, real-time streaming, 10x faster than alternatives, flat memory usage (~2MB).
Visit project- First shared
- Sep 3, 2026
- HN activity
- 21
Show HN@cjcjSep 3, 2026
Show HN: Tiny Markdown CLI renderer – Streaming, 10x faster, 2MB flat RAM
Community