This repository has no description
1#!/usr/bin/env bash
2set -euo pipefail
3
4ROOT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
5SWARM_DIR="$(cd "$ROOT_DIR/../swarm" && pwd)"
6
7cd "$ROOT_DIR"
8
9if [[ -z "${GEMINI_API_KEY:-}" ]]; then
10 echo "== Loading GEMINI_API_KEY from swarm keyvault =="
11 GEMINI_API_KEY="$(cd "$SWARM_DIR" && bun run keys get GEMINI_API_KEY | grep -E '^(AIza|AIza[[:alnum:]_-]+)$' | tail -n 1)"
12 export GEMINI_API_KEY
13fi
14
15OBS_WS_CONFIG="/home/nandi/.config/obs-studio/plugin_config/obs-websocket/config.json"
16if [[ -z "${OBS_WS_PASSWORD:-}" && -f "$OBS_WS_CONFIG" ]]; then
17 echo "== Loading OBS websocket password from OBS config =="
18 OBS_WS_PASSWORD="$(python3 - <<'PY'
19import json
20path = '/home/nandi/.config/obs-studio/plugin_config/obs-websocket/config.json'
21with open(path, 'r', encoding='utf-8') as f:
22 data = json.load(f)
23print(data.get('server_password', ''))
24PY
25)"
26 export OBS_WS_PASSWORD
27fi
28
29echo "== Live stack preflight =="
30bun run scripts/check-live-stack.ts
31
32echo
33echo "== Starting live loop =="
34echo "This will subscribe to Jetstream chat and attempt Gemini/OpenVT/OBS integration using current env vars."
35echo
36
37exec bun run src/index.ts --live