Windows Setup
Config paths
| Layer | Path |
|---|---|
| Project config | .lenserfight\config.json (inside your project root) |
| Device config | %APPDATA%\lenserfight\config.json |
| Legacy device | %USERPROFILE%\.lenserfight\config.json (read fallback) |
%APPDATA% resolves to C:\Users\<you>\AppData\Roaming on a standard Windows install.
Install Node.js and pnpm
Use winget (Windows 11 / updated Windows 10):
winget install OpenJS.NodeJS.LTS
npm install -g pnpmOr use Chocolatey:
choco install nodejs-lts
npm install -g pnpmVerify:
node --version # 20+
pnpm --versionInstall the CLI
From your project root:
pnpm installRun the CLI:
pnpm lenserfight --version
# or the short alias:
pnpm lf --versionInitialize a project
pnpm lenserfight initThis creates .lenserfight\config.json in the current directory with local-mode defaults.
Environment variables on Windows
Set environment variables in PowerShell for the current session:
$env:ANTHROPIC_API_KEY = "sk-ant-..."
$env:OPENAI_API_KEY = "sk-..."To persist across sessions, use the System Properties dialog or:
[System.Environment]::SetEnvironmentVariable("ANTHROPIC_API_KEY", "sk-ant-...", "User")Or place them in a .env.local file in your project root — the CLI reads this automatically:
ANTHROPIC_API_KEY=sk-ant-...
OPENAI_API_KEY=sk-...Device config location
After running lf auth login or lf connect, the CLI writes auth tokens to:
C:\Users\<you>\AppData\Roaming\lenserfight\config.jsonThis file contains secrets — do not commit it.
Validate automation objects
pnpm lenserfight validate .\automationIf no markdown files exist under
./automation, create anLENSER.MDfirst:powershellpnpm lenserfight export agent --template --out .\LENSER.MD
Run a local battle
pnpm lenserfight battle run .\PRIVATE_BATTLE.mdWindows Defender / antivirus notes
Some antivirus tools flag Node.js child processes on first run. Add your project directory and %APPDATA%\lenserfight\ to your AV exclusion list if you see unexpected slowness.