@echo off
title QuicklyPos Destek Sistemi v1.0
echo QuicklyPos Destek Sistemi v1.0
echo ================================
echo.

set HUB=https://agents.quickly.host
set TOKEN=swarm-node-2026-secure

:: Node.js kontrol
where node >nul 2>&1
if %errorlevel% neq 0 (
    echo Node.js bulunamadi. https://nodejs.org adresinden LTS surumunu indirip kurun.
    echo Kurulumdan sonra bu scripti tekrar calistirin.
    pause
    exit /b 1
)
echo Node.js: 
node --version

:: Pi Coding Agent
where pi >nul 2>&1
if %errorlevel% neq 0 (
    echo Pi Coding Agent kuruluyor...
    call npm install -g @earendil-works/pi-coding-agent
)
echo Pi Agent: kuruldu

:: Python3 kontrol
where python >nul 2>&1
if %errorlevel% neq 0 (
    echo Python3 bulunamadi. https://python.org adresinden indirip kurun.
    echo Kurulum sirasinda "Add Python to PATH" secenegini isaretleyin.
    pause
    exit /b 1
)

:: Python paketleri
echo Python paketleri kuruluyor...
pip install -q requests psutil python-socketio websocket-client pystray pillow

:: Config
if not exist "%USERPROFILE%\.quickly-agent" mkdir "%USERPROFILE%\.quickly-agent"
echo {"providers":[],"_token":"%TOKEN%","_hub":"%HUB%"}> "%USERPROFILE%\.quickly-agent\config.json"

echo.
echo ✅ Kurulum tamamlandi
echo.
echo Destek baglantisi otomatik kurulacaktir.
echo Sistem tepsisinde Quickly ikonunu goreceksiniz.
pause
