OUTPUT FORMATS:

MARKDOWN (default, -f markdown):
  Human-readable formatted statistics with sections for overview,
  documents, references, lines, words, structure, and network analysis.

CSV (-f csv):
  Per-document statistics with columns:
  key, title, sections, paragraphs, lines, words, parents,
  incoming_inline_refs, total_incoming_refs, children,
  outgoing_inline_refs, total_connections, bullet_lists, ordered_lists,
  code_blocks, tables, quotes

JSON (-f json):
  Aggregate graph statistics serialized as JSON.

YAML (-f yaml):
  Same shape as JSON, rendered as YAML.

PER-DOCUMENT STATS (-k <KEY>):
  Returns the record for a single document (JSON by default, YAML with
  -f yaml). Useful for scripting.

EXAMPLES:

  # Generate human-readable statistics
  iwe stats

  # Export per-document statistics as CSV
  iwe stats --format csv > stats.csv

  # Aggregate stats as JSON
  iwe stats -f json

  # Aggregate stats as YAML
  iwe stats -f yaml

  # Per-document stats (JSON by default)
  iwe stats -k my-document

  # Per-document stats as YAML
  iwe stats -k my-document -f yaml

  # Find most connected documents
  iwe stats -f csv | tail -n +2 | sort -t, -k12 -nr | head -5
