# Diagram

> Class diagram generator

This sample analyzes all the code in context and attempts to generate a diagram using [mermaid](https://mermaid.js.org/).

diagram.genai.mts

```ts
script({
  model: "small",
  tests: {},
});
$`Generate a diagram of a merge.`;
```