Lurker News
I love making diagrams to help understand, plan, etc. However, the options are (A) auto-placement languages like Mermaid or Graphviz (which don't let me decide how the diagram looks), or (B) software like Draw.io which are powerful but are very time consuming (and inefficient for agents to manipulate).

I wanted to have the benefits of both, where you can define a diagram in a diagram language, but also retain a high degree of control over what the diagram looks like.
I also wanted this to work well for humans and agents.
On the Github link, there's a playground where you can try it out without installation. There's also instructions for a simple npm install and for installing a skill you can use with Claude or other agents.

Comments (119) 47 threads

Earlier comments
fallingmeat#
great work. but at this point prompting a frontier model to make a svg diagram works so well..
monster_truck1 reply#
This genuinely fucks. Thank you

Fighting with mermaid is so frustraiting, especially when it comes to normal vs github formatting. This is going to replace several ad-hoc half impls I have laying around

jpwalsh2342 replies#
Glad to hear it :) If you find that you want Reladraw to do something that it can't, let me know! I keep uncovering features by looking at actual Draw.io diagrams I've made and seeing if Reladraw can do it.
Jailbird2 replies#
(since you ask...) Edges drawn with right angles would be a nice option.
jpwalsh234#
Great idea! Adding to the todo list.
jpwalsh234#
Updated! Edges can now have right angles (sharp or rounded). And, I added in more edge customization, like solid/dashed/dotted and thickness.
monster_truck1 reply#
o7 will do, and if I cook anything up I think you might appreciate I'll try and yeet over a nice PR
jpwalsh234#
Thanks!
hhh#
I use Excalidraw for this
wrs1 reply#
Mermaid is open source, no? Can we just add these placement constraints to Mermaid instead of making a whole new language?
jpwalsh234#
That's a very thought-provoking question. Adding placement constraints on top of an automatic layout engine sounds like a challenging problem. You'd have the engine deciding where to place things, but you'd also be nudging things or constraining things.

This might not be what you have in mind, but Graphviz has a `rank` which can be used as a coarse way to influence the shape of the diagram. (I'm assuming you had something more sophisticated in mind though)
Probably easier would be if the relative drawing were its own distinct Mermaid diagram type, but then it would be largely a new language anyway.

Load more comments