This is timely. I have grown disappointed with mermaid as it can only render stuff in the browser and libraries that use dot underneath but do not afford full control over the generation, so I have stared writing little Python programs that generate SVGs for things like sequence diagrams and store their output.