KosmoKrator

rendering

Mermaid CLI for Headless Automation

Use the Mermaid CLI for headless automation with headless JSON commands, schema discovery, credentials, and permission controls.

1 functions 0 read 1 write No credentials auth

Mermaid CLI for Headless Automation

Use KosmoKrator as a non-interactive integration runtime for local automations and wrappers.

Use headless automation when another tool needs a stable local command surface. The Mermaid CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.

Command Shape

# Mermaid CLI for Headless Automation
kosmokrator integrations:configure mermaid --enable --read allow --write ask --json
kosmo integrations:call mermaid.render_mermaid '{"syntax":"example_syntax","title":"example_title","width":1,"theme":"example_theme"}' --json

Discovery Before Execution

Agents and scripts can inspect Mermaid docs and schemas before choosing a function.

kosmo integrations:docs mermaid --json
kosmo integrations:docs mermaid.render_mermaid --json
kosmo integrations:schema mermaid.render_mermaid --json
kosmo integrations:search "Mermaid" --json
kosmo integrations:list --json

Useful Mermaid CLI Functions

FunctionTypeParametersDescription
mermaid.render_mermaid Write syntax, title, width, theme Render a Mermaid diagram to a PNG image. Pass valid Mermaid syntax and get back a markdown image embed. Supported diagram types: flowchart, sequence, class, state, ER, Gantt, pie, quadrant, requirement, git graph, C4, mindmap, timeline, sankey, XY chart, block. Example syntax: ``` graph TD A[Start] --> B{Decision} B -->|Yes| C[Action] B -->|No| D[End] ``` Tips: - Use `graph TD` for top-down flowcharts, `graph LR` for left-to-right - Use `sequenceDiagram` for sequence diagrams - Use `erDiagram` for entity-relationship diagrams - Use `classDiagram` for class diagrams - Use `stateDiagram-v2` for state diagrams - Use `gantt` for Gantt charts - Use `pie` for pie charts - Use `gitgraph` for git graphs - Use `mindmap` for mind maps

Automation Notes

Related Mermaid CLI Pages