This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

character / scripts / check-live-stack.ts
1.3 kB 49 lines
1const requiredEnv = [ 2 'GEMINI_API_KEY', 3 'OBS_WS_URL', 4 'OBS_WS_PASSWORD', 5 'OBS_SCENE_NAME', 6 'OBS_TEXT_INPUT_NAME', 7]; 8 9function printEnvStatus() { 10 console.log('Environment checks:'); 11 for (const key of requiredEnv) { 12 const value = process.env[key]; 13 console.log(`- ${key}: ${value ? 'set' : 'missing'}`); 14 } 15} 16 17async function probeTcp(name: string, host: string, port: number) { 18 try { 19 const socket = await Bun.connect({ 20 hostname: host, 21 port, 22 socket: { 23 open(socket) { 24 socket.end(); 25 }, 26 data() {}, 27 close() {}, 28 error() {}, 29 }, 30 }); 31 socket.unref?.(); 32 console.log(`- ${name}: open (${host}:${port})`); 33 } catch { 34 console.log(`- ${name}: closed (${host}:${port})`); 35 } 36} 37 38console.log('Live stack readiness'); 39printEnvStatus(); 40console.log('Port checks:'); 41await probeTcp('OBS websocket', '127.0.0.1', 4455); 42await probeTcp('OpenVT runtime control', '127.0.0.1', 25733); 43 44console.log('\nSuggested next actions:'); 45console.log('1. Export GEMINI_API_KEY'); 46console.log('2. Start OBS with obs-websocket enabled on port 4455'); 47console.log('3. Set OBS_SCENE_NAME and OBS_TEXT_INPUT_NAME'); 48console.log('4. Start OpenVT so runtime control listens on 25733'); 49console.log('5. Run: bun run src/index.ts --live');