• dmos62 4 hours ago

    Really cool. Alexander Grooff (this is based on his go library [0]) did a great job.

    [0]: https://github.com/AlexanderGrooff/mermaid-ascii

    I think I ran into a bug, the "start" edge is not rendered. This is from https://agents.craft.do/mermaid:

        stateDiagram-v2
          [*] --> Idle
          Idle --> Active : start
          Active --> Idle : cancel
          Active --> Done : complete
          Done --> [*]
    
        ┌──────────┐
        │          │
        │          │
        │          │
        └─────┬────┘
              │     
              │     
              │     
              │     
              ▼     
        ┌──────────┐
        │          │
        │   Idle   │
        │          │
        └─────┬────┘
              ▲     
              │     
          cancel   
              │     
              ▼     
        ┌─────┴────┐
        │          │
        │  Active  │
        │          │
        └─────┬────┘
              │     
              │     
          complete  
              │     
              ▼     
        ┌──────────┐
        │          │
        │   Done   │
        │          │
        └─────┬────┘
              │     
              │     
              │     
              │     
              ▼     
        ┌──────────┐
        │          │
        │          │
        │          │
        └──────────┘
    • tempaccsoz5 11 hours ago

      The actual Mermaid ASCII renderer is from another project [0]. This project transliterated it to typescript and added their own theming.

      [0]: https://github.com/AlexanderGrooff/mermaid-ascii

    • thangalin 9 hours ago

      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.

      [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

      • ycombiredd 14 minutes ago

        Tangentially related, I once wanted to render a NetworkX DAG in ASCII, and created phart to do so.

        There's an example of a fairly complicated graph of chess grandmaster PGM taken from a matplotlib example from the NetworkX documentation website, among some more trivial output examples in the README at https://github.com/scottvr/phart/blob/main/README.md#example...

        (You will need to expand the examples by tapping/clicking on the rightward-facing triangle under "Examples", so that it rotates to downward facing and the hidden content section is displayed)

        • afro88 5 hours ago

          Edit: See child comments, I misunderstood. Original post below anyway.

          --

          To me, the diagrams have an uglier default design. A crazy amount of dropdown shadow (in the examples), stretched fonts (front page example). It doesn't matter how many diagram types you support if the generated diagrams aren't good quality.

          Mermaids defaults are good enough. They're not amazing, but I'm also not embarrassed to show them to other engineers, stakeholders etc

          Edit: KeenWrite looks excellent btw

          • jbstack 4 hours ago

            Maybe I've misunderstood, but isn't the whole point that it outputs to those other formats? So if you like the way Mermaid outputs look, you'd just output to that?

            • afro88 3 hours ago

              Oh, you're right. I misunderstood. I think it was the comparison to mermaid that threw me, and then I checked out the examples

        • smilingleo 7 hours ago

          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.

          • benrutter 5 hours ago

            I think context matters, often I might be writing docs in a text format that doesn't support mermaid (some readmes for instance, or a print put in a CLI tool) and want diagrams.

            In those contexts, rendered mermaid as html isn't an option, so this really does seem like one of the best calls for human readability.

            • jbstack 4 hours ago

              What you mean is that you don't find ASCII diagrams useful. Other people do (see other comments). I find them useful for Org Mode where I prefer to work with just text instead of having to keep separate image files together with my .org files. They're also easier to work with if you need to check them into a Git repo and you don't want to be bothered with something like Git LFS or git-annex. The fact that there are people who want them is enough to explain "why there's a push toward" them (assuming there is actually such a push).

              • dmos62 4 hours ago

                A lot of people primarily use markdown and command-line, and, importantly, so do many coding agents (which seems to be the authors' primary use case).

                • esafak 6 minutes ago

                  GFM supports Mermaid.

                • gregoriol 6 hours ago

                  You can put ASCII diagrams in code comments.

                  Also Claude code in the terminal can show them.

                  • tuetuopay 6 hours ago

                    They don't need a renderer, so they can be embedded in source code comments, or in markdown document without requiring e.g. Gitlab to properly render the document. And even then, they're still "rendered" when editing said markdown document.

                  • jonfw 12 hours ago

                    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/

                    • mixmastamyk 11 hours ago

                      ^Unicode.

                      • hahahahhaah 10 hours ago

                        Importantly they also render in your source code. I love a good diagram at the top of a file.

                      • rahimnathwani 11 hours ago

                        Wow! It has this:

                          Subgraph Direction Override: Using direction LR inside a subgraph while the outer graph flows TD.
                        
                        With this, you should be able to approximate swim lane diagrams, which is something Mermaid lacks.

                        The last time I checked, Mermaid couldn't render subgraphs in a different direction than the overall graph.

                        • a_t48 11 hours ago

                          The live demo requires some download of an AI agent platform? I'd really like to try this but not if that's what's required.

                          • csmantle 11 hours ago

                            The devs should really setup a client-only GitHub Pages for an accessible demo. Judging from skimming the project itself, it's definitely doable without locking into their platform.

                          • Lio 44 minutes ago

                            I love Mermaid and Markdown as a combination for documentation.

                            I wonder if we can get the ASCII render to run inside Vim/NeoVim?

                            • robin_reala 5 hours ago

                              Note that by doing ASCII you’re sacrificing possible accessibility; WCAG 1.0 specifically called ASCII images out as a problem in 1999.

                              (Mermaid isn’t accessible by default either, but there’s current work in that direction: https://github.com/mermaid-js/mermaid/pull/7349)

                              • ozim 4 hours ago

                                Just imagined what a garbage would screen reader spit out.

                              • smusamashah 9 hours ago

                                Also see https://arthursonzogni.com/Diagon for text to ascii.

                                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.

                                • brumar 6 hours ago

                                  Great list, thank you!

                                • Terretta 10 hours ago

                                  If you like Obsidian.md but can't quite recommend it for less technical folks, these devs' Craft notes spaces are a great alternative:

                                  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.

                                  • mjaniczek 3 hours ago

                                    It seems like the ASCII/Unicode mode doesn't work all that well: https://agents.craft.do/mermaid#sample-6

                                    • dleeftink 11 hours ago

                                      Pair this with Unicode plots[0] and you're set!

                                      [0]: https://github.com/JuliaPlots/UnicodePlots.jl

                                      • reboot7417 7 hours ago

                                        Looks awesome, perfect for a feature request for CC [0] I opened a while back.

                                        [0]: https://github.com/anthropics/claude-code/issues/14375

                                        • jackconsidine 11 hours ago

                                          > Aesthetics — Might be personal preference, but wished they looked more professional

                                          Im sold. Love mermaid but totally agree.

                                          • rcarmo 6 hours ago

                                            Am I reading this right and it doesn’t need any DOM or browser engine at all? That would indeed be awesome.

                                            • nulone 10 hours ago

                                              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.

                                              • dizhn 6 hours ago

                                                When I needed to see mermaid diagrams rendered the other day I realized my existing Forgejo instance already supported it so that's what I've been doing. Push to repo and check it out there. Not inline but not a bad place for code reviews. (I am sure all the other forges also support it)

                                              • doanbactam 10 hours ago

                                                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.

                                                • peanutz454 10 hours ago

                                                  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).

                                                  • peter_retief 6 hours ago

                                                    Looks really useful to document complex applications, I will give it a try.

                                                    • apwheele 9 hours ago

                                                      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]
                                                      
                                                      Results in the ascii

                                                          ┌──────────┐                                     
                                                          │          │                                     
                                                          │  Source  ├─thickted─────┐                      
                                                          │          │        │     │                      
                                                          └─────┬────┘        └─────┼────────────────┐     
                                                                │                   │                │     
                                                                │                   │                │     
                                                              solid                 │                │     
                                                                │                   │                │     
                                                                ▼                   ▼                ▼     
                                                          ┌──────────┐        ┌──────────┐     ┌──────────┐
                                                          │          │        │          │     │          │
                                                          │ Target 1 │        │ Target 2 │     │ 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.

                                                      The Parallel links, example mermaid

                                                          graph TD
                                                            A[Input] & B[Config] --> C[Processor]
                                                            C --> D[Output] & E[Log]
                                                      
                                                      results in ascii

                                                          ┌───────────┐     ┌────────┐
                                                          │           │     │        │
                                                          │   Input   │     │ Config │
                                                          │           │     │        │
                                                          └─────┬─────┘     └────┬───┘
                                                                │                │    
                                                                │                │    
                                                                │                │    
                                                                │                │    
                                                                ▼                │    
                                                          ┌───────────┐          │    
                                                          │           │          │    
                                                          │ Processor ├◄─────────┤    
                                                          │           │          │    
                                                          └─────┬─────┘          │    
                                                                │                │    
                                                                │                │    
                                                                │                │    
                                                                │                │    
                                                                ▼                ▼    
                                                          ┌───────────┐     ┌────────┐
                                                          │           │     │        │
                                                          │   Output  │     │  Log   │
                                                          │           │     │        │
                                                          └───────────┘     └────────┘
                                                      
                                                      This is just wrong isn't it? Why is there an arrow from config to log?
                                                      • wrboyce 5 hours ago

                                                        The latter one is a rendering issue I think, the right hand side of Processor is being used as an input from Config and an output to Log but the arrows overlap and become ambiguous.

                                                      • altano 6 hours ago

                                                        Who’s going to make the rehype plugin?

                                                        • LeonidBugaev 9 hours ago

                                                          Nice one! I had my own spin on this issue as well, but from the other angle https://github.com/probelabs/maid

                                                          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.

                                                          • wyes 11 hours ago

                                                            How is the LaTeX compatibility? Base mermaid's LaTeX compatibility is quite sparse.

                                                            • dochtman 5 hours ago
                                                              • lubujackson 10 hours ago

                                                                This is great, I will definitely make use of this!

                                                                • patrick4urcloud 4 hours ago

                                                                  very good job nice. i will give a try !

                                                                  • cjlm 11 hours ago

                                                                    See also graph-easy.online (https://github.com/cjlm/graph-easy-online)