This is a command line tool to generate DSI files from C4 diagrams.
GitHub Source Code: https://github.com/jgquiroga/dsmviz.analyzer.c4
DSI files can be visualized using the DSM Visualizer.
The C4 model files are used to define the architecture of the system. They are written in the DSL structurizr format.
Before running this tool, you need to convert the DSL files to json files using the following docker command:
docker run -it --rm -v ${PWD}:/usr/local/structurizr structurizr/cli export -workspace workspace.dsl -format jsonRun the following command to install the tool:
dotnet tool install --global dsmviz-analyzer-c4 --version 0.1.0-alpha.1Notes:
The tool requires Net core 8.0 or later.
Execute the following command to generate the AnalyzerSettings.xml file:
dsmviz-analyzer-c4 AnalyzerSettings.xmlThe AnalyzerSettings.xml file is used to configure the analyzer.
The following is an example of the AnalyzerSettings.xml file:
<?xml version="1.0" encoding="utf-8"?>
<AnalyzerSettings xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<LogLevel>Error</LogLevel>
<Input>
<Workspace>workspace.json</Workspace>
</Input>
<Transformation />
<Output>
<Filename>workspace.dsi</Filename>
<Compress>true</Compress>
</Output>
</AnalyzerSettings>- LogLevel: The log level. Possible values are Error, Warning, Info, and Debug.
- Input.Workspace: The path to the workspace file.
- Output.Filename: The path to the output file.
- Output.Compress: A flag to compress the output file.
- Transformation: The transformation settings.
Run the following command to uninstall the tool:
dotnet tool uninstall --global dsmviz-analyzer-c4