"""Repository-checkout launcher for FastMDXplora.

Works identically on Linux/macOS/Windows because it has no shebang and no
per-OS branching — invoke it as ``python fastmdx <command> ...`` from the
repo root.

This file exists so a developer can run the CLI from an un-installed
checkout. The shipped package installs its own proper ``fastmdx``
console-script via ``[project.scripts]`` in ``pyproject.toml``; once
``pip install fastmdxplora`` (or the conda-forge equivalent) has run,
``fastmdx ...`` on PATH behaves identically to this shim. The shim
itself just bridges the gap before that installation step.
"""
from __future__ import annotations

import os
import sys
from pathlib import Path

if __name__ == "__main__":
    repo_root = Path(__file__).resolve().parent
    src_root = repo_root / "src"
    if str(src_root) not in sys.path:
        sys.path.insert(0, str(src_root))
    os.environ.setdefault("PYTHONPATH", str(src_root))
    from fastmdxplora.cli.main import main

    sys.exit(main())
