Generate diagrams programmatically with D2
terrastruct.com
terrastruct.com
Fun little experiment, but if you want to get serious about documentation, I'll just suggest mermaid instead of rolling your own custom text-to-diagram tool.
But if instead you want to have some fun generating diagrams, this looks like a good starting point.
If you want to compare Mermaid against D2, take a look at https://text-to-diagram.com. The maintainers of Mermaid have contributed to it.