# Bill test build (v2) for Windows: installs into %USERPROFILE%\.bill and opens the Bill app in your browser. # Bill reads your AI logs on this computer and nothing is uploaded. If Claude Code is logged in, Bill asks your own # Claude to write each bill's sign-off; that request carries the bill's lines, totals and session titles. # Run in PowerShell: irm https://whitelabelplay.space/bill/v2/install.ps1 | iex $ProgressPreference = 'SilentlyContinue' $Base = 'https://whitelabelplay.space/bill/v2' $Dir = Join-Path $env:USERPROFILE '.bill' $Files = @('bill.py', 'app.html', 'assets/bill-render.jpg') + (@('classic', 'grocery', 'laundry', 'annual', 'ticket', 'swiss', 'sticker') | ForEach-Object { "assets/formats/$_.png" }) function Find-Python { # The Microsoft Store "python" stub isn't a real Python, so skip anything under WindowsApps. foreach ($c in 'py', 'python', 'python3') { $cmd = Get-Command $c -ErrorAction SilentlyContinue if ($cmd -and $cmd.Source -notmatch 'WindowsApps') { return $cmd.Source } } return $null } $Py = Find-Python if (-not $Py) { if (-not (Get-Command winget -ErrorAction SilentlyContinue)) { Write-Host 'Bill needs Python 3. Install it from https://www.python.org/downloads/ (tick "Add to PATH"), then paste the Bill command again.' return } Write-Host 'Bill needs Python 3. Installing it with winget (Windows may ask you to approve)...' winget install -e --id Python.Python.3.12 --scope user --accept-package-agreements --accept-source-agreements $env:Path = [Environment]::GetEnvironmentVariable('Path', 'User') + ';' + [Environment]::GetEnvironmentVariable('Path', 'Machine') $Py = Find-Python if (-not $Py) { Write-Host 'Python is installed. Close this window, open a new PowerShell and paste the Bill command again.' return } } try { New-Item -ItemType Directory -Force -Path (Join-Path $Dir 'assets\formats') -ErrorAction Stop | Out-Null foreach ($f in $Files) { Invoke-WebRequest -UseBasicParsing -Uri "$Base/$f" -OutFile (Join-Path $Dir ($f -replace '/', '\')) -ErrorAction Stop } } catch { Write-Host "Bill couldn't download its files: $($_.Exception.Message)" return } # Native tools write warnings to stderr; that's not failure, so judge them by exit code only. & $Py -c "import PIL" 2>$null if ($LASTEXITCODE -ne 0) { Write-Host 'Installing Pillow (draws the receipts)...' & $Py -m pip install --user --quiet --disable-pip-version-check pillow if ($LASTEXITCODE -ne 0) { Write-Host "Pillow didn't install. Try: `"$Py`" -m pip install --user pillow"; return } } # A launcher for next time: %USERPROFILE%\.bill\bill.cmd (opens the app; extra words pass through, e.g. "bill.cmd weekly") Set-Content -Path (Join-Path $Dir 'bill.cmd') -Encoding ASCII -Value @" @echo off if "%~1"=="" goto app "$Py" "%USERPROFILE%\.bill\bill.py" %* goto :eof :app "$Py" "%USERPROFILE%\.bill\bill.py" app "@ Write-Host "Bill is installed. Next time: press Win + R, paste %USERPROFILE%\.bill\bill.cmd and press Enter." & $Py (Join-Path $Dir 'bill.py') app