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
ciefa1 reply#
Huh, can you read my mind?! :D

This is super cool. I love diagrams, charts, etc. and use them a lot. Both privately and for work.
Definitely going to make use of this, I didn't know how much I wanted something like this until right now hahaha.

jpwalsh234#
Glad to hear it! I'm a big fan of diagrams for understanding, mapping out architecture, etc!
perelin#
Just gave it a spin. Really like it. Adds a lot of visual clarity. Margins matter :) Thx!
einpoklum1 reply#
If this were implemented in a language with fewer dependencies, it'd be great.
jpwalsh2341 reply#
Reladraw has no runtime dependencies and Typescript is only needed to build it. If you mean Node, though, that's fair!
jpwalsh234#
Oh wow. Let me give that a try. I was going to try bun or Deno, but your suggestion might result in much smaller binaries.
jpwalsh234#
I tried scriptc. Unfortunately, it doesn't work with this code at present (e.g., maps keyed by object and a number of various things). However, thanks for suggesting it. I have a note to revisit at some point.

Another option that appears to work well is to use Deno. I tried on my machine and it worked great. Only downside is the executable size is beefy. Could be about 70-105MB, or roughly 30MB compressed.
I don't know if that still sounds attractive? A 30MB download from Github, and then uncompressed to 100MB, and no other dependencies? (Most of it would be the Deno runtime, with only about 300KB being Reladraw)

14u2c#
Well done, I was struggling with this exact problem last week.

Load more comments