@echo off
setlocal
title Helgi OS - Activate CODEX-01
echo.
echo HELGI OS - CODEX-01 ACTIVATION
echo ==============================
echo.
echo This uses your ChatGPT Codex allowance. It does NOT configure OPENAI_API_KEY.
echo.
powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "$ErrorActionPreference='Stop'; $u='https://helgi-os.pages.dev/downloads/Activate-CODEX-01.ps1'; $p=Join-Path $env:TEMP 'Activate-CODEX-01.ps1'; Invoke-WebRequest -UseBasicParsing $u -OutFile $p; & powershell.exe -NoProfile -ExecutionPolicy Bypass -File $p"
set RC=%ERRORLEVEL%
echo.
if not "%RC%"=="0" (
  echo Activation stopped with code %RC%.
  echo Read the message above, fix the requested one-time requirement, then run this file again.
) else (
  echo CODEX-01 activation completed.
)
echo.
pause
exit /b %RC%
