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
tombert1 reply#
You stole my planned project for next weekend! I was actually planning on doing something very similar to this.

I'm glad you beat me to this; I think what you made is likely better than what I would have produced.

jpwalsh234#
Thanks very much! If you have ideas or feature requests, let me know!
_kidlike1 reply#
this looks awesome! A very naive question, because I never bothered to learn how it works, but can I embed this in markdown files with ```reladraw, as I can do with ```mermaid? Mermaid gets rendered inside markdown files, in both IntelliJ and Github. I assume both added support for it at some point. But I don't know the mechanics of how this works. I wouldn't be able to use this until then, unfortunately.
jpwalsh234#
Thanks :) A great question. So, I believe Github simply built in support for Mermaid as just something they natively support. That means getting reladraw to "just work" in Github markdown files is sorta not possible. The workaround is rendering to SVG and linking to the SVG (obviously not nearly as convenient).

For tools like IntelliJ, VSCode, Obsidian, they would be easier to get working I think, as they all support plugins/extensions. That way, they'd know what to do when they encounter a fenced-in area starting with ```reladraw.

altcognito1 reply#
This is an area I think I've really enjoyed AI coding: DSLs are pretty fun to make and you can get pretty creative. Bravo on this
jpwalsh234#
Thanks :) It is fun to play with!
0x4a50#
Awesome! Exactly the problem I was having with drawio and mermaid. Nice work on addressing these problems and sharing it!

Load more comments