install.bat
@echo off
REM One-click install for people who cloned the repo instead of getting it from the LM Studio Hub.
REM The Hub is the easier route: it installs with a click and needs neither Node nor this script.
echo Installing Context Compactor into LM Studio...
echo.
where npm >nul 2>nul
if errorlevel 1 (
echo ERROR: npm was not found. Install Node.js from https://nodejs.org and run this again.
echo Alternatively, install the plugin from the LM Studio Hub, which needs none of this.
pause
exit /b 1
)
where lms >nul 2>nul
if errorlevel 1 (
echo ERROR: the 'lms' command was not found.
echo Open LM Studio once ^(it installs the CLI on startup^), then run this again.
pause
exit /b 1
)
echo [1/2] Installing dependencies...
call npm install --no-fund --no-audit
if errorlevel 1 (
echo.
echo ERROR: npm install failed. See the messages above.
pause
exit /b 1
)
echo.
echo [2/2] Installing the plugin into LM Studio...
call lms dev --install -y
if errorlevel 1 (
echo.
echo ERROR: the install failed. Is LM Studio running? It must be open for this step.
pause
exit /b 1
)
echo.
echo Done. Enable "context-compactor" in the plugin menu of a chat.
echo Plugins are enabled per conversation, so a chat you already had open will not have it yet.
echo.
pause