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, included_by_count,
  referenced_by_count, incoming_edges_count, includes_count,
  references_count, total_edges_count, 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. Default -f markdown prints
  a bullet-list record; csv, json, and yaml are also supported.

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 (markdown record by default)
  iwe stats -k my-document

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

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