Diagram as code PlantUML on VS Code WSL and Mac
Sep 30, 2023
Steps below will show how to install popular UML diagram-as-a-code tool: PlantUML.
VS Code extension
Install PlantUML plug-in
WSL Plant UML Dependencies
sudo apt install default-jre
java -version
sudo apt install graphviz
Mac Plant UML Dependencies
brew install --cask temurin
brew install graphviz
Test if it is working
Create the file test.pu
with the following content
@startuml
actor user
actor admin
package system {
(Send Document) as (uc2)
(Approve Document) as (uc3)
(Request Document) as (uc1)
}
admin --> uc2
admin --> uc1
admin --> uc3
user --> uc1
@enduml
Now hit Alt+D
and here we go