Model visualisation

Turning a CDS model, or the classes and tables of ABAP code, into a picture you can read (entities, their elements and the associations between them) so a newcomer can see the shape of a domain without reading every source file.

Overview

SAP SHIPS
Node.js →

@sap/cds-dk The command line client and development toolkit for CAP projects, with the commands cds build, cds deploy, cds watch and cds add among them.

Not covered: It stops at one renderer and one shape: a class diagram in Mermaid text. Crow's-foot ER notation, PlantUML output and rendering to an image are not compile targets.

Both are present. How they came to coexist is not established — the community script and the compile target overlap in time, and this atlas has no evidence about which influenced which.

Sourcecds CLI — cds compile --to mermaidchecked
THE COMMUNITY ADDS

Artifacts2

2 of 2 artifacts
ArtifactSignals
CLI tools2
@sap/cds-dkCommand line client and development toolkit for CAP
Signals
none
sap-cds-erdAWK script sketching an ER diagram from .cds files
Signals
Quiet

Details

What changed — and what it makes stale1
@sap/cds-dk 8.0.2, CAP

cds compile --to mermaid became a built-in compile target, emitting a Mermaid class diagram from a model. The 8.x line reached npm on 2024-07-12.

Makes stale:

Advice that a diagram needs an external script or a paid tool. It needs neither, for a class diagram.

Sourcecds CLI — cds compile --to mermaidchecked
Coverage
statecore and community, CAP
assessed
relationshipunassessed
also inABAP
Sourcecds CLI — cds compile --to mermaidchecked
For your agent
Ref
capability:model-visualisation
JSON
/capabilities/model-visualisation.json
MCP
Connecting an agent