I love ASCII diagrams! The fact that I can write a diagram that looks equally wonderful in my terminal via cat as it does rendered on my website is incredible.
A good monospaced font and they can look really sharp!
I will definitely give this tool a shot.
I will also shout out monodraw as a really nice little application for building generic ASCII diagrams- https://monodraw.helftone.com/
Yikes, good catch. I've changed the link above to the original project now. (Edit: actually, let's use the project home page and put the Github repo in the toptext.)
I've had issues with other CLI wrappers there. ASCII output is a nice touch for including diagrams directly in code comments without breaking formatting. Does it handle large graphs well, or does the text wrap get messy? We tried using `graph-easy` for this before but the syntax was annoying. 6.
I get a sense of deja vu. There was another such project posted within the last 3 months, and another within last 6 months. I should have bookmarked them, because at least one of them was an open library (I think).
While great for individuals, it's particularly strong out-of-the-box for teams, or even teams of teams with two levels of grouping.
They bring the same ... craft (ahem) ... to the whole product as shown in their Craft Agents or this renderer, with a strong foundation originally started in the Markdown philosophy. Check out the founder's story on their About page for a refreshingly LLM-free backgrounder.
The ASCII output is the missing piece for AI-assisted coding workflows. LLMs can spit out Mermaid, but you can't see the diagram inline in a terminal/code-review context. This fixes that.
I have a list of text to diagram tools here https://xosh.org/text-to-diagram/ but not many are text to ascii. There are a few text to ascii sequence diagram tools.
While Mermaid gets the limelight, Kroki[1] offers: BlockDiag, BPMN, Bytefield, SeqDiag, ActDiag, NwDiag, PacketDiag, RackDiag, C4 with PlantUML, D2, DBML, Ditaa, Erd, Excalidraw, GraphViz, Nomnoml, Pikchr, PlantUML, Structurizr, Svgbob, Symbolator, TikZ, Vega, Vega-Lite, WaveDrom, WireViz, and Mermaid.
My Markdown editor, KeenWrite[2], integrates Kroki as a service. This means whenever a new text-based diagram format is offered by Kroki, it is available to KeenWrite, dynamically. The tutorial[3] shows how it works. (Aside, variables within diagrams are also possible, shown at the end.)
Note that Mermaid diagrams cannot be rendered by most libraries[4] due to its inclusion of <foreignObject>, which is browser-dependent.
Comparing MermaidJS with Kroki is a bit like comparing PDF.js to Adobe Acrobat. I don't think either is better than the other, they're just for different use-cases.
With MermaidJS, converting a diagram inside a web page requires adding a handful of lines to a HTML page. The execution is fast and local.
Kroki is a web-service. To use it in a web page means adding a dependency to an external provider (a free service exists, but asks for fundings). An alternative is self-hosting by running a Kroki container.
A few years ago, I added Mermaid diagrams to a project in a few minutes of work. Had we needed a much more complex tool, maybe I would have gone with Kroki, but not by myself; it would have required a change in the deploying process of the project.
In the live demo, I am confused about some of the ascii renderings. (Unless I am missing something, they appear incorrect/inconsistent with the SVG.), https://agents.craft.do/mermaid
So for the "All Edge styles"
graph TD
A[Source] -->|solid| B[Target 1]
A -.->|dotted| C[Target 2]
A ==>|thick| D[Target 3]
(The svg for this example is maybe misleading, as it looks like un upside down T) But the ascii here has the overlapping words, and you cannot tell the difference in any of the lines.
Nice one. Mermaid validation is a huge issue given how mermaid.js is architected.
I built a mermaid generation harness last year and even the best model at it (Claude Sonnet 3.7 at the time; 4o was okay, Gemini struggled) only produced valid mermaid ~95% of the time. That failure rate adds up quickly. Had to detect errors client-side and trigger retries to keep server load reasonable.
Having a lightweight parser with auto-fix like this back then would have simplified the flow quite a bit.
I’m not entirely sure why there’s a push toward ASCII diagrams (perhaps influenced by AI usage).
Mermaid and PlantUML are already text-based representations, and what most users actually want is a rendered diagram in a standard, widely recognized notation—primarily for humans, not machines.
ASCII diagrams are inherently constrained by printable characters, which makes them hard to standardize and limits their expressiveness compared to proper diagram renderers.
47 comments
[ 4.1 ms ] story [ 60.8 ms ] threadA good monospaced font and they can look really sharp!
I will definitely give this tool a shot.
I will also shout out monodraw as a really nice little application for building generic ASCII diagrams- https://monodraw.helftone.com/
Im sold. Love mermaid but totally agree.
[0]: https://github.com/JuliaPlots/UnicodePlots.jl
The last time I checked, Mermaid couldn't render subgraphs in a different direction than the overall graph.
[0]: https://github.com/AlexanderGrooff/mermaid-ascii
(Submitted link was https://github.com/lukilabs/beautiful-mermaid. mellosouls is a good HN contributor so I'm sure this was well-intentioned.)
https://www.craft.do/
While great for individuals, it's particularly strong out-of-the-box for teams, or even teams of teams with two levels of grouping.
They bring the same ... craft (ahem) ... to the whole product as shown in their Craft Agents or this renderer, with a strong foundation originally started in the Markdown philosophy. Check out the founder's story on their About page for a refreshingly LLM-free backgrounder.
I have a list of text to diagram tools here https://xosh.org/text-to-diagram/ but not many are text to ascii. There are a few text to ascii sequence diagram tools.
My Markdown editor, KeenWrite[2], integrates Kroki as a service. This means whenever a new text-based diagram format is offered by Kroki, it is available to KeenWrite, dynamically. The tutorial[3] shows how it works. (Aside, variables within diagrams are also possible, shown at the end.)
Note that Mermaid diagrams cannot be rendered by most libraries[4] due to its inclusion of <foreignObject>, which is browser-dependent.
[1]: https://kroki.io/
[2]: https://keenwrite.com/
[3]: https://www.youtube.com/watch?v=vIp8spwykZY
[4]: https://github.com/orgs/mermaid-js/discussions/7085
With MermaidJS, converting a diagram inside a web page requires adding a handful of lines to a HTML page. The execution is fast and local.
Kroki is a web-service. To use it in a web page means adding a dependency to an external provider (a free service exists, but asks for fundings). An alternative is self-hosting by running a Kroki container.
A few years ago, I added Mermaid diagrams to a project in a few minutes of work. Had we needed a much more complex tool, maybe I would have gone with Kroki, but not by myself; it would have required a change in the deploying process of the project.
So for the "All Edge styles"
Results in the ascii (The svg for this example is maybe misleading, as it looks like un upside down T) But the ascii here has the overlapping words, and you cannot tell the difference in any of the lines.The Parallel links, example mermaid
results in ascii This is just wrong isn't it? Why is there an arrow from config to log?Getting AI to generate valid mermaid diagrams on scale extremely hard. With maid i'm hitting 100% accuracy.
Maid is basically built from scratch mermaid parser, without any dependnecies, which knows how to auto-fix common AI slop diagramming issues.
I built a mermaid generation harness last year and even the best model at it (Claude Sonnet 3.7 at the time; 4o was okay, Gemini struggled) only produced valid mermaid ~95% of the time. That failure rate adds up quickly. Had to detect errors client-side and trigger retries to keep server load reasonable.
Having a lightweight parser with auto-fix like this back then would have simplified the flow quite a bit.
[0]: https://github.com/anthropics/claude-code/issues/14375
ASCII diagrams are inherently constrained by printable characters, which makes them hard to standardize and limits their expressiveness compared to proper diagram renderers.
https://github.com/1jehuang/mermaid-rs-renderer
Just submitted a HN thread about it:
https://news.ycombinator.com/edit?id=46807750