@echo off
rem Windows wrapper for spotifyctl
rem Tries the hermes venv python first, falls back to PATH python.
setlocal
set "PYEXE="
for %%P in ("%LOCALAPPDATA%\hermes\hermes-agent\venv\Scripts\python.exe") do (
    if exist "%%~P" set "PYEXE=%%~P"
)
if not defined PYEXE (
    for %%P in (python py) do (
        where %%P >nul 2>&1 && (set "PYEXE=%%P" & goto :run)
    )
)
:run
if not defined PYEXE (
    echo spotifyctl: no Python interpreter found. Install Python 3.11+ or the hermes venv.
    exit /b 1
)
"%PYEXE%" "%~dp0spotifyctl" %*
