main
Drew Owens Scrub internal hostnames, quota ledger, local paths, and private links for public release 09af481
#!/usr/bin/env python3
"""Standalone launcher for goosectl when run directly from the repository."""

import os
import sys

VENV_PY = os.environ.get("MICROGOOSE_PYTHON", "")
if (
    os.path.exists(VENV_PY)
    and os.path.realpath(sys.executable) != os.path.realpath(VENV_PY)
    and os.environ.get("GOOSECTL_NO_REEXEC") != "1"
):
    env = dict(os.environ)
    env["GOOSECTL_NO_REEXEC"] = "1"
    os.execve(VENV_PY, [VENV_PY, *sys.argv], env)

RUNTIME_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
if RUNTIME_ROOT not in sys.path:
    sys.path.insert(0, RUNTIME_ROOT)

from goosectl.cli import main

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