# Launch the FastAPI app locally on Windows PowerShell. # Usage: .\scripts\run_local.ps1 # Set AAE_RELOAD=1 to enable uvicorn's file watcher during development. $ErrorActionPreference = "Stop" Set-Location (Join-Path $PSScriptRoot "..") if (-not (Test-Path ".\.env")) { Write-Warning ".env not found - copy .env.example to .env and fill in ANTHROPIC_API_KEY" } $uvicornArgs = @("-m", "uvicorn", "app.main:app", "--host", "127.0.0.1", "--port", "8000") if ($env:AAE_RELOAD -eq "1") { $uvicornArgs += "--reload" } & ..\.venv\Scripts\python.exe @uvicornArgs