#!/usr/bin/env python3
"""Print the discovered Obsidian vault root.

Honors OBSIDIAN_VAULT; otherwise searches $HOME/Documents (depth 3) for a single
directory containing .obsidian/. Exits 1 with a message on stderr on ambiguity
or no match.
"""

from __future__ import annotations

import sys
from pathlib import Path

sys.path.insert(0, str(Path(__file__).resolve().parent))
from _vault import find_vault  # noqa: E402


def main() -> int:
    print(find_vault())
    return 0


if __name__ == "__main__":
    raise SystemExit(main())
