d2lang/d2 ? reverse-engineered prompt

Reverse engineered prompt

Build me a text to diagram tool where I can type a simple script and get a clean diagram out of it.

I want it to work from the command line, so I can give it a file and export SVG, PNG, PDF, GIF, or PPTX, and I want a watch mode that updates the output as I edit the text. It should also have a nice web playground feel for testing ideas quickly, plus a way to use it from Go code if possible.

Please make the diagrams look polished by default, with a few good themes and a simple way to switch styles. It should handle common diagram shapes, arrows, and labels, and support bigger architecture style diagrams without getting messy. If there are any current docs or examples that help, use them.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab