Skip to content

tld views

View Markdown

tld views shows you the derived view structure of your workspace. It’s a map of your diagram hierarchy.

Terminal window
tld views

Every view in your workspace, plus a synthetic root that contains everything:

Views: 12 total (11 owned + root)
Max depth: 3
────────────────────────────────────
| View | Owner | Depth | Elements | Child Views | Connectors | Path |
|------|-------|-------|----------|-------------|------------|------|
| root | Synthetic Root | 0 | 5 | 6 | 12 | root |
| api-gateway | API Gateway | 1 | 4 | 2 | 5 | root/api-gateway |
| auth-svc | Auth Service | 2 | 3 | 0 | 4 | root/api-gateway/auth-svc |
| ... | ... | ... | ... | ... | ... | ... |

Each row tells you:

  • View: The element ref that owns this view
  • Owner: Display name of the owning element
  • Depth: How deep in the hierarchy (0 = root, 1 = first level of children, etc.)
  • Elements: Direct children placed in this view
  • Child Views: How many sub-views this view contains (drill-down targets)
  • Connectors: Number of connectors scoped to this view
  • Path: Full drill-down path from root
  • Auditing your diagram hierarchy before an important review
  • Finding orphaned views (depth = -1 or path = “unreachable”)
  • Checking that your nesting structure makes sense
  • Verifying element distribution across views
  • Quick overview before refactoring a large architecture
Terminal window
tld views --format json
{
"command": "views",
"status": "ok",
"summary": {
"total_views": 12,
"owned_views": 11,
"max_depth": 3
},
"views": [
{
"ref": "root",
"owner_name": "Synthetic Root",
"depth": 0,
"direct_elements": 5,
"direct_child_views": 6,
"connectors": 12,
"path": "root",
"synthetic": true
},
...
]
}

Synthetic root: Every workspace has a root view that contains all top-level elements. It’s “synthetic” because it doesn’t correspond to a real element , it’s the container that holds everything together.

Depth: The distance from root. Flat architectures (everything at depth 0-1) are easy to navigate but can get cluttered. Deep architectures (depth 3+) organize complexity well but can become hard to find things. The linter helps you find the right balance.

Unreachable views: If a view shows up with "path": "unreachable" or depth -1, it means the owning element isn’t placed in any view. That’s usually a bug , every element should have at least one placement.

Terminal window
# Human-readable table
tld views
# Machine-readable JSON
tld views --format json
# Compact JSON
tld views --format json --compact