Import an existing source
Keep the source. Redraw with ai-diagrams.
Start from Mermaid, BPMN XML, DDL, CSV or YAML. These examples are converted into the engine's native formats and rendered by its existing generators.
Import commandbash
npx ai-diagrams import examples/import/en/flowchart.mmd --out diagrams/flowchart --lang enexamples/import/en/flowchart.mmdmermaid
flowchart LR
A((Request)) --> B[Check order]
B --> C{Available?}
C -->|Yes| D[Reserve]
C -->|No| E[Reject]
D --> F((Completed))
E --> F
Generated by the ai-diagrams engine
examples/import/en/output/flowchart/flowchart.html
Unsupported syntax returns an error with its location. The importer keeps the engine's native source, then runs the regular generator and gate.
From file to checked diagram
The layout is rebuilt by the engine; original drawing coordinates are not preserved.
A Mermaid flowchart becomes BPMN. A flowchart with subgraph lanes becomes swimlanes. DDL can also produce a schema dependency matrix with --type matrix.
DDL to dependency matrixbash
npx ai-diagrams import examples/import/en/schema.sql --type matrix --out diagrams/matrix --lang enSource and package
Made by Vinícius Coimbra
Made by Vinícius Coimbra