DOT OUTPUT FORMAT:

  Graphviz DOT language with the following structure:

    digraph {
      rankdir=LR
      node [shape=box]
      "doc-key" [label="Document Title"]
      "doc-key" -> "referenced-key"
    }

  With --include-headers, sections become subgraphs:

    digraph {
      subgraph cluster_doc_key {
        label="Document Title"
        style=filled
        fillcolor="#..."
        "doc-key/section" [label="Section"]
      }
    }

FILTER FLAGS (narrow the exported set):

  --filter "EXPR"             Inline filter expression (YAML).
  -k, --key KEY               Match by key. Repeatable.
  --includes KEY[:DEPTH]      $includes anchor.
  --included-by KEY[:DEPTH]   $includedBy anchor.
  --references KEY[:DIST]     $references anchor.
  --referenced-by KEY[:DIST]  $referencedBy anchor.
  --max-depth N               Default maxDepth for inclusion anchors. Default 1.
  --max-distance N            Default maxDistance for reference anchors. Default 1.

EXAMPLES:

  # Export entire graph
  iwe export

  # Export specific document(s) and connections (-k is repeatable)
  iwe export --key project-main
  iwe export -k project-main -k project-beta

  # Include section headers for detailed view
  iwe export --include-headers

  # Control connection depth
  iwe export --key index --depth 2

  # Restrict to a subtree via filter
  iwe export --included-by projects/alpha
  iwe export --included-by projects/alpha --filter '$nor: [{ $includedBy: archive }]'

USING DOT OUTPUT:

  # Generate PNG visualization
  iwe export > graph.dot
  dot -Tpng graph.dot -o graph.png

  # Generate SVG for web use
  iwe export --include-headers > detailed.dot
  dot -Tsvg detailed.dot -o detailed.svg

  # Interactive exploration with xdot
  iwe export | xdot -
