Reladraw - Diagram language with explicit relative placement
Show HN: Reladraw – A diagram language where you decide where to place things

Reladraw is a text-based diagram language where you state where things go using relative statements like 'above-left of cluster.hub' — no coordinates. It sits between auto-layout tools like Mermaid and absolute-positioning tools like draw.io, giving you precise control without manual pixel work. The resolver computes the tightest arrangement from minimum distances, so edits stay fast and predictable. Ideal for agents and developers who need to modify diagrams by editing sentences, not numbers. Try it in your browser or install via npm.
Every position is stated relative to something else, and nothing in the file is a coordinate — the file states the arrangement, not an algorithm.
- apinstein
This is very needed in the AI coding age! I find diagramming is one of the best ways for high bandwidth alignment between my mental model and the agent’s. I have been working on this problem a bit as I see good visuals as a key bottleneck in faster development while maintaining a real architecture.
Will def be adding this to my list of diagramming tools the agent can use!
- HeavyStorm
Mermaid works great for fixed layouts like sequence diagrams and Gantts. For flowcharts, where position is king, it's bad.
I've tried using svg in my MD files but they get unwieldy quite fast. This is a great idea. My first reaction was - but what's if I need something more exact. But reflecting on it, I've realized that this relative positioning is probably enough.
- recroad
Seems a little buggy, I added this line:
edge parser -> renderer "test edge" from: left to: right
and it wasn't smart enough to make a curved arrow
- threecheese
Does this need to be shipped with a renderer? A better question is, are the node layout instructions ultimately being translated into absolute positions?
If so, you could target any number of render backends, keeping the same simple interface for your agent, avoiding the bazillion problems rendering engines face to work well across the ecosystem.
- tnspacetime
This seems nice but I’ll need to read the syntax more carefully to see how capable and convenient it is.