what is it?

javascript based diagramming and charting tool that renders markdown-inspired text definitions

cli

running from a container

create a .mmd file

input.mmd
graph TD;
    A-->B;
    A-->C;
    B-->D;
    C-->D;

create a mermaid config file. this file isn’t strictly necessary, but if a diagram with lots of data points has to be created, the maximums might have to be increased

mermaid-config.json
{
  "maxTextSize": 200000,
  "maxEdges": 2000,
  "maxVertices": 1000,
  "theme": "default",
  "themeVariables": {
    "fontFamily": "arial",
    "fontSize": "12px"
  }
}

run the mermaid-cli docker image

docker run --rm -v $(pwd):/data --user $(id -u):$(id -g) \
  minlag/mermaid-cli \
  -i input.mmd \
  -o output.svg \
  -c mermaid-config.json

.pdf or .png formats can also be created