Kroki CLI
$ kroki Official Med RiskKroki CLI (kroki) converts PlantUML, Mermaid, Graphviz, BPMN, D2, Structurizr, and 20+ diagram languages into SVG, PNG, PDF, or JPEG using a Kroki server. It supports stdin/stdout pipelines (kroki convert - -t mermaid -o -), though by default it sends diagram source to public https://kroki.io unless KROKI_ENDPOINT or kroki.yml points to a self-hosted instance.
go install github.com/yuzutech/kroki-cli@latest Single kroki convert command renders PlantUML, Mermaid, Graphviz, and BPMN from local files or stdin without wrapping each engine in separate MCP servers.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Clean non-interactive kroki convert supporting stdin (-), stdout (-o -), -t, -f, and KROKI_ENDPOINT, though no --json metadata flag.
- Stdin/stdout (
-and-o -) plus explicit-t/-fflags - No JSON diagnostic output
Transmits diagram source code to external https://kroki.io by default, creating an unintended data-egress risk on confidential architecture diagrams unless KROKI_ENDPOINT is self-hosted.
- Default endpoint sends diagram payloads to public
kroki.io
Single zero-dependency Go binary without needing local Java/PlantUML, Chromium/Mermaid, or Graphviz installed.
- Single binary via
go installor GitHub releases across OSes
Supports 20+ diagram engines (PlantUML, Mermaid, Graphviz, D2, BPMN, Excalidraw, Vega) behind one uniform CLI.
- Single unified CLI replacing dozens of language-specific renderers
Official Yuzutech (yuzutech/kroki-cli) project under MIT.
- Official Kroki organization repository
Clear README usage and configuration examples at yuzutech/kroki-cli and kroki.io.
- Official docs in GitHub README and kroki.io
Security, Auth & Guardrails
Public https://kroki.io requires no auth; custom/private Kroki endpoints are configured via KROKI_ENDPOINT env var or kroki.yml.
CLI and Kroki server are open-source (MIT) and free; public kroki.io is hosted free with fair-use limits.
# Kroki CLI Agent Rules - Warning: By default `kroki` sends diagram source text over HTTPS to `https://kroki.io`; set `KROKI_ENDPOINT` to a local/self-hosted server for proprietary architectures. - Use `-t <type> -f svg -o <out.svg>` explicitly for predictable file output. - Check `KROKI_TIMEOUT` when rendering large diagrams.
Agent-Ready Command Recipes
Safe Read-Only Queries
kroki version
Prints the installed kroki CLI version without making network calls.
kroki convert - -t mermaid -f svg -o - < diagram.mmd
Reads diagram text from stdin and prints rendered SVG to stdout (-o -) without writing disk files.
Controlled Writes & Previews
kroki convert diagram.puml -t plantuml -f svg -o out.svg
Sends diagram.puml to the configured Kroki endpoint and writes out.svg.
Strengths for Agents
- + Unified Go binary rendering 20+ diagram formats without installing Java, Chromium, or Graphviz locally.
- + Clean stdin/stdout (
-/-o -) andKROKI_ENDPOINTself-hosting support.
Caveats & Pitfalls
- ! Sends diagram text to public
https://kroki.ioby default—unsafe for confidential diagrams without settingKROKI_ENDPOINTto a private server. - ! Requires network access to a Kroki server (cannot render offline standalone).