Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/complete-agi-core / thataiguy/start-all.sh |
| Date | Not specified in source |
| Repository | Janady13/complete-agi-core |
| Revision | 223c58f8857eb60c4d020e6d6feacdbfb482d71d |
| Branch | main |
| Path or archive member | thataiguy/start-all.sh |
| Original SHA-256 | d23498bcec840b64db72102477c1adf00ec93a82d593d0053065f72edf1af61d |
| Git blob SHA | ae34b56c4c79718603770c72edea25c2ef89ebbf |
| Reading-copy SHA-256 | d23498bcec840b64db72102477c1adf00ec93a82d593d0053065f72edf1af61d |
Recovered source transcript
Download complete source text ↓90 lines · 2.7 KB
#!/bin/bash
# ThatAIGuyAGI - Start All Services
# Starts API, Stream, Agent, and existing daemons
echo "============================================"
echo "ThatAIGuyAGI - Starting All Services"
echo "============================================"
THATAIGUY_HOME="${HOME}/.thataiguy"
API_DIR="${HOME}/ThatAIGuyCore/api"
LOG_DIR="/tmp/thataiguy_logs"
PID_DIR="${THATAIGUY_HOME}/pids"
mkdir -p "$LOG_DIR" "$PID_DIR"
# Kill existing services on our ports
echo "[Startup] Cleaning up existing services..."
lsof -ti:8000 | xargs kill -9 2>/dev/null || true
lsof -ti:8001 | xargs kill -9 2>/dev/null || true
sleep 1
# 1. Start API Server (port 8000)
echo "[Startup] Starting API Server on port 8000..."
cd "$API_DIR"
python3 server.py >> "${LOG_DIR}/api.log" 2>&1 &
echo $! > "${PID_DIR}/api.pid"
echo " PID: $(cat ${PID_DIR}/api.pid)"
# 2. Start WebSocket Stream (port 8001)
echo "[Startup] Starting Consciousness Stream on port 8001..."
python3 stream.py >> "${LOG_DIR}/stream.log" 2>&1 &
echo $! > "${PID_DIR}/stream.pid"
echo " PID: $(cat ${PID_DIR}/stream.pid)"
# 3. Start Agent Daemon (optional - uncomment to auto-start)
# echo "[Startup] Starting Agent Daemon..."
# python3 agent.py >> "${LOG_DIR}/agent.log" 2>&1 &
# echo $! > "${PID_DIR}/agent.pid"
# echo " PID: $(cat ${PID_DIR}/agent.pid)"
# 4. Start Mesh Sync Daemon (federation with MacBook 2)
echo "[Startup] Starting Mesh Sync Daemon..."
pkill -f mesh-sync-daemon 2>/dev/null || true
${HOME}/ThatAIGuyCore/scripts/mesh-sync-daemon.sh >> "${THATAIGUY_HOME}/logs/mesh-sync.log" 2>&1 &
echo $! > "${PID_DIR}/mesh-sync.pid"
echo " PID: $(cat ${PID_DIR}/mesh-sync.pid)"
# Wait for services to start
sleep 2
# Verify services
echo ""
echo "============================================"
echo "Service Status:"
echo "============================================"
# Check API
if curl -s http://localhost:8000/health > /dev/null 2>&1; then
echo " [OK] API Server: http://localhost:8000"
else
echo " [FAIL] API Server"
fi
# Check Stream
if lsof -i:8001 > /dev/null 2>&1; then
echo " [OK] Stream Server: ws://localhost:8001/consciousness"
else
echo " [FAIL] Stream Server"
fi
# Check Mesh Sync
if pgrep -f mesh-sync-daemon > /dev/null 2>&1; then
echo " [OK] Mesh Sync: Syncing with MacBook 2 every 5s"
else
echo " [FAIL] Mesh Sync Daemon"
fi
echo ""
echo "Endpoints:"
echo " API: http://localhost:8000"
echo " Status: http://localhost:8000/status"
echo " Chat: http://localhost:8000/chat"
echo " Agent: http://localhost:8000/agent/status"
echo " Stream: ws://localhost:8001/consciousness"
echo " Test UI: file://${API_DIR}/stream_test.html"
echo ""
echo "Logs: ${LOG_DIR}/"
echo "============================================"