# Kroki.jl

Enables a wide array of textual diagramming tools, such as Graphviz, Mermaid, PlantUML, svgbob and many more within Julia through the Kroki service.

The aim of the package is to make it straightforward to store descriptive diagrams close to, or even within, code. Additionally, it supports progressive enhancement of these diagrams in environments, e.g. Documenter.jl, Pluto.jl, or Jupyter, that support richer media types such as SVG or JPEG.

See the poster presented at JuliaCon 2020's poster session for more information and background.

## Installation & Usage

Install Kroki through Julia's package manager

(v1.7) pkg> add Kroki

Construct diagrams using the Diagram type or any of the available string literals. Then either rely on the available Base.show overloads, or call the render function with a specific output format, to visualize them.

plantuml"""
Kroki -> Julia: Hello!
Julia -> Kroki: Hi!
Kroki -> Julia: Can I draw some diagrams for you?
Julia -> Kroki: Sure!
"""

See the examples section for more details and, well, examples.

The package can be configured to use the publicly hosted server at https://kroki.io or a self-hosted instance, see setEndpoint! for details. Facilities, e.g. start!, status, stop!, etc. are included to help with the self-hosting scenario, provided Docker Compose is available.

## Supported Diagram Types

The table below provides an overview of the different diagram types this package supports, with links to their documentation, and the output formats they can be rendered to.

application/pdfimage/jpegimage/pngimage/svg+xmltext/plaintext/plain; charset=utf-8
actdiag
blockdiag
BPMN
Byte Field
C4 with PlantUML
diagrams.net
ditaa
erd
Excalidraw
Graphviz
Mermaid
nomnoml
nwdiag
packetdiag
Pikchr
PlantUML
rackdiag
seqdiag
Structurizr
Svgbob
UMLet
Vega
Vega-Lite
WaveDrom
Addressing errors in diagram type support

The information in this table should correspond to the one on Kroki's website, but is directly derived from the support as it is encoded in this package.

Given that this information is a mirror of the information available on Kroki's website, it may not be entirely accurate with regards to actually supported output formats. Support for output formats needs to be addressed within the Kroki service and then mirrored into this package.

The Kroki.Service.info function can be used to obtain more detailed information about the versions of the tools used to support the different diagram types.