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:
plcc-diagram-emit --format=FMT— callsplcc-<fmt>-diagram-emitplcc-diagram-build --format=FMT— callsplcc-<fmt>-diagram-buildplcc-diagram-run --format=FMT— callsplcc-<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 |