Skip to main content
Start with D2 for a small relationship graph. Choose YAML when an agent will repair the scene or a person will adjust it in Studio. Use JSON when another program produces the composition. Visual edit operations use YAML-aware text transformations. Do not assume that rendering support means every canvas edit works in every source dialect. D2 and JSON remain useful for source editing and preview.

A relationship graph

Save it as services.d2, then isotopo render services.d2 ./out.

An editable composition

Download the complete YAML starter, save it as input.yaml, and run isotopo serve input.yaml. It expresses the same three roles with a row layout and explicit styles. YAML and JSON share the canvas, theme, and nodes model. They support layout, place, and explicit offsets. JSON is useful at a program boundary; YAML is convenient for human and agent revisions.

Moving between formats

There is no general lossless D2-to-YAML command documented here. Re-author the scene using the composition model, preserving node identities and connections, then inspect the output. A matching graph does not imply identical geometry or styling. CLI quickstart · YAML reference · D2 mapping