azd app graph already exports text, json, markdown, mermaid, and dot. D2 (terrastruct) is a modern diagram language with clean auto-layout and good rendering tooling, and it is a natural next format for the dependency graph.
Add d2 as an --output value that renders the service dependency graph as a D2 diagram.
Acceptance criteria:
azd app graph --output d2 prints valid D2.
- Nodes are service names; edges follow dependency direction.
- Works with
--output-file and --focus like the other formats.
- Follows the existing one-function-per-format renderer structure.
- Unit tests cover the D2 output, including the focus case.
- Documented in the CLI reference.
azd app graphalready exports text, json, markdown, mermaid, and dot. D2 (terrastruct) is a modern diagram language with clean auto-layout and good rendering tooling, and it is a natural next format for the dependency graph.Add
d2as an--outputvalue that renders the service dependency graph as a D2 diagram.Acceptance criteria:
azd app graph --output d2prints valid D2.--output-fileand--focuslike the other formats.