#!/usr/bin/env bash
set -euo pipefail

# Launcher script to run the project using the local .venv Python
# Usage: ./run [args...]

PROJECT_ROOT="$(cd "$(dirname "$0")" && pwd)"
VENV="$PROJECT_ROOT/.venv"
PYTHON="$VENV/bin/python"

if [ ! -x "$PYTHON" ]; then
  echo "Virtualenv not found or incomplete at $VENV." >&2
  echo "Create it with: python3 -m venv .venv && .venv/bin/python -m pip install -r requirements.txt" >&2
  exit 1
fi

exec "$PYTHON" -m pyucc "$@"
