structurizr / cli

A command line utility for Structurizr.
https://docs.structurizr.com/cli
Apache License 2.0
491 stars 75 forks source link

Please provide a way to generate diagrams locally, without uploading to any cloud service. #47

Closed venthur closed 3 years ago

venthur commented 3 years ago

It would be very nice if the CLI could operate completely locally: you provide a .dsl file and it spits out several .png (or similar) files. Since it seems graphviz based it shouldn't be strictly required to create a structurizr account and upload files for processing there, right?

simonbrowndotje commented 3 years ago

The Structurizr renderer creates diagrams client-side (i.e. in the web browser), so it's not possible to generate them via the CLI. Some options you have:

The Structurizr renderer can be used in conjunction with headless Chrome and Puppeteer (here are some example scripts) to generate PNGs via the command line. A paid cloud service subscription will give you directly embeddable PNGS too.

simonbrowndotje commented 3 years ago

structurizr-to-png might also be useful if you want to go down the PlantUML route.