Skip to content

Instantly share code, notes, and snippets.

View Teraux's full-sized avatar

Teraux

  • Joined Apr 29, 2026
View GitHub Profile
@Teraux
Teraux / fix_service_auth.ps1
Created May 2, 2026 13:44
Teraux poller service auth fix
# Teraux VPS - Fix poller service auth (belt-and-suspenders)
# Run as Administrator on the VPS.
#
# What this does:
# 1. Embeds the GITHUB_BUS_PAT directly into the git remote URL (no credential lookup needed)
# 2. Sets GIT_TERMINAL_PROMPT=0 so git fails fast instead of hanging
# 3. Switches TerauxPoller service to run as the Administrator account (not LocalSystem)
# 4. Restarts and shows logs
$ErrorActionPreference = "Continue"
@Teraux
Teraux / fix_env.ps1
Created May 2, 2026 13:21
Teraux VPS .env clean rewrite
# Teraux VPS — clean .env rewrite (atomic, UTF-8 no BOM)
# Run as Administrator (or current user — Admin not strictly required)
$ErrorActionPreference = "Stop"
$envPath = "C:\teraux-agent\.env"
Write-Host "=== Clean .env rewrite ===" -ForegroundColor Cyan
Write-Host "Old file will be backed up to .env.bak before overwrite.`n" -ForegroundColor Gray
# 1. Read existing .env into a hashtable so we keep what's good
@Teraux
Teraux / install_oneliner.ps1
Created May 2, 2026 13:09
Teraux VPS poller — interactive install with PAT prompt
# Teraux VPS poller — INTERACTIVE one-shot install
# Paste this entire block into VPS PowerShell as Administrator.
# It will prompt for the GitHub PAT (hidden input), append to .env, then run the installer.
$ErrorActionPreference = "Stop"
# 1. Prompt for the PAT (hidden, like a password)
Write-Host "`n=== Teraux VPS Poller Install ===" -ForegroundColor Cyan
Write-Host "You need a fine-grained GitHub PAT for Teraux/teraux-vps-bus (Contents: write).`n" -ForegroundColor Yellow
Write-Host "Create one at: https://github.com/settings/personal-access-tokens/new" -ForegroundColor White
@Teraux
Teraux / setup_vps.ps1
Last active May 2, 2026 13:57
Teraux VPS poller setup (NSSM, reads from .env)
# Teraux VPS - One-shot poller setup v2 (NSSM, robust)
# Run as Administrator on the VPS.
$ErrorActionPreference = "Continue" # don't bail on first non-fatal error
Write-Host "=== Teraux VPS Bus Setup v2 ===" -ForegroundColor Cyan
# 0. Validate .env
$envPath = "C:\teraux-agent\.env"
if (-not (Test-Path $envPath)) {
Write-Host "ERROR: $envPath not found." -ForegroundColor Red
@Teraux
Teraux / 01_smoketest.py
Created May 2, 2026 11:10
Teraux VPS smoke test
"""
Teraux VPS — Smoke Test
Confirms: Anthropic key valid, Browser Use installed, Chromium driving, file writes working.
Cost: ~€0.05 in Anthropic credits.
"""
import asyncio
import os
from pathlib import Path
from dotenv import load_dotenv
from browser_use import Agent, ChatAnthropic
@Teraux
Teraux / UNATTENDED_INSTALL.ps1
Created May 2, 2026 10:18
Teraux VPS unattended installer
# =============================================================
# TERAUX VPS — UNATTENDED ONE-PASTE INSTALLER
# Runs Stages 1+2+3 end-to-end. Logs everything to C:\teraux-install.log
# Paste once into PowerShell-as-Admin, walk away ~25 min, come back.
# =============================================================
$ErrorActionPreference = "Continue"
$LogFile = "C:\teraux-install.log"
Start-Transcript -Path $LogFile -Append -Force