Skip to content

tmd graph

Exports the vault’s object relation graph in DOT format. Nodes represent objects, edges represent relations and wiki-links. Output goes to stdout for piping to Graphviz or other visualization tools.

Terminal window
tmd graph

Outputs a DOT digraph with all objects as nodes and all relations and wiki-links as edges.

digraph vault {
rankdir=LR;
node [shape=box];
"book/clean-code-01abc" [label="📚 Clean Code"];
"person/bob-01def" [label="👤 Bob Martin"];
"book/clean-code-01abc" -> "person/bob-01def" [label="author"];
}
Terminal window
tmd graph | dot -Tpng -o graph.png
tmd graph | dot -Tsvg -o graph.svg
Terminal window
tmd graph --type book
tmd graph --type book --type person

Only includes objects of the specified types. Edges are included only when both endpoints are in the filtered set. The --type flag can be repeated.

Terminal window
tmd graph --no-wikilinks # Relations only
tmd graph --no-relations # Wiki-links only
tmd graph --no-relations --no-wikilinks # Nodes only

Relation edges are drawn as solid lines with the property name as label. Wiki-link edges are drawn as dashed lines labeled “wikilink”.

  • Relations: Directed edges from source to target, labeled with the relation property name. Bidirectional relations produce one edge per stored direction (e.g., author and books).
  • Wiki-links: Directed dashed edges from the linking object to the target. Unresolved wiki-links (broken targets) are skipped.
  • Deduplication: Edges with the same source, target, and label are deduplicated.