Skip to content

Diagram Extensions

Diagram extensions implement the emit, build, and run steps for a specific diagram format. plcc-ng ships with Mermaid and PlantUML support.

How diagram extensions plug in

plcc-diagram runs three dispatch commands:

  1. plcc-diagram-emit --format=FMT — calls plcc-<fmt>-diagram-emit
  2. plcc-diagram-build --format=FMT — calls plcc-<fmt>-diagram-build
  3. plcc-diagram-run --format=FMT — calls plcc-<fmt>-diagram-run

The default format is plantuml. Use plcc-diagram-list to see what is installed.

plcc-mermaid-diagram

Generates a Mermaid class diagram. Requires the mmdc CLI (npm install -g @mermaid-js/mermaid-cli).

Command What it does
plcc-mermaid-diagram-emit Reads model JSON from stdin; writes a .mmd Mermaid source file
plcc-mermaid-diagram-build Renders .mmd to PNG using mmdc
plcc-mermaid-diagram-run Prints the path to the rendered PNG

plcc-plantuml-diagram

Generates a PlantUML class diagram. Rendering is done via the public plantuml.com API — no local PlantUML installation required.

Command What it does
plcc-plantuml-diagram-emit Reads model JSON from stdin; writes a .puml PlantUML source file
plcc-plantuml-diagram-build Sends .puml to plantuml.com and writes the returned PNG
plcc-plantuml-diagram-run Prints the path to the rendered PNG