#!/usr/bin/env bash # Start the test UI (Linux / Raspberry Pi / macOS). Usage: ./run.sh [port] | ./run.sh cli | ./run.sh report | ./run.sh test [--full] | ./run.sh install cd "$(dirname "$0")" PORT="${1:-8000}" if [ ! -d .venv ]; then python3 -m venv .venv || { echo "python3-venv missing: sudo apt install python3-venv"; exit 1; }; fi . .venv/bin/activate python -c "import numpy,fastapi,uvicorn" 2>/dev/null || pip install -q -r requirements.txt if [ "$1" = "cli" ]; then python ui/cli.py; exit; fi if [ "$1" = "report" ]; then python eval/make_report.py; exit; fi if [ "$1" = "test" ]; then python eval/smoke_test.py $2; exit; fi if [ "$1" = "install" ]; then python tools/install_model.py "$2"; exit; fi echo "Union Command Agent UI -> http://localhost:$PORT (Ctrl+C to stop)" ( sleep 2; xdg-open "http://localhost:$PORT" >/dev/null 2>&1 || true ) & PORT=$PORT python ui/app.py