This guide covers installing and configuring onWatch on Windows. Choose between the one-click installer (recommended) or manual setup for full control.
The PowerShell installer handles everything automatically: downloading the binary, configuring providers, creating the .env file, and adding onWatch to your PATH.
Open PowerShell and run:
irm https://raw.githubusercontent.com/onllm-dev/onwatch/main/install.ps1 | iex- Download
install.batfrom the Releases page - Double-click
install.bat - Follow the interactive prompts
The installer will:
- Download the Windows binary to
%USERPROFILE%\.onwatch\bin\ - Auto-detect Claude Code and Codex tokens if available
- Guide you through configuring API providers
- Create dashboard credentials
- Create the
.envconfiguration file - Add onWatch to your user PATH
- Start onWatch in the background
If you prefer full control or the installer doesn't work for your environment, follow these steps.
- Go to the Releases page
- Download
onwatch-windows-amd64.exe - Create the installation directory:
mkdir "$env:USERPROFILE\.onwatch\bin" -Force
mkdir "$env:USERPROFILE\.onwatch\data" -Force- Move the binary:
Move-Item onwatch-windows-amd64.exe "$env:USERPROFILE\.onwatch\bin\onwatch.exe"Create a .env file at %USERPROFILE%\.onwatch\.env with your API keys.
Using PowerShell:
@"
# onWatch Configuration
# At least one provider is required. Uncomment and configure the ones you use.
# Synthetic API key (https://synthetic.new/settings/api)
# SYNTHETIC_API_KEY=syn_your_key_here
# Z.ai API key (https://www.z.ai/api-keys)
# ZAI_API_KEY=your_key_here
# ZAI_BASE_URL=https://api.z.ai/api
# Anthropic token (Claude Code - see "Retrieving Tokens" below)
# ANTHROPIC_TOKEN=your_token_here
# Codex OAuth token (see "Retrieving Tokens" below)
# CODEX_TOKEN=your_token_here
# GitHub Copilot PAT with copilot scope
# COPILOT_TOKEN=ghp_your_token_here
# Antigravity (Windsurf) - auto-detected from local process
# ANTIGRAVITY_ENABLED=true
# Dashboard credentials
ONWATCH_ADMIN_USER=admin
ONWATCH_ADMIN_PASS=changeme
# Polling interval in seconds (10-3600)
ONWATCH_POLL_INTERVAL=120
# Dashboard port
ONWATCH_PORT=9211
"@ | Set-Content "$env:USERPROFILE\.onwatch\.env"Or using Notepad:
notepad "$env:USERPROFILE\.onwatch\.env"Then paste the configuration above and save.
onWatch can start with no providers configured. You can enable providers later in Settings -> Providers.
If you want to pre-configure providers in .env, set any of the following:
SYNTHETIC_API_KEY=syn_your_key_hereGet your key at: https://synthetic.new/settings/api
ZAI_API_KEY=your_key_here
ZAI_BASE_URL=https://api.z.ai/apiGet your key at: https://www.z.ai/api-keys
ANTHROPIC_TOKEN=your_token_hereSee Retrieving Anthropic Token below.
CODEX_TOKEN=your_token_hereSee Retrieving Codex Token below.
COPILOT_TOKEN=ghp_your_token_hereCreate a Personal Access Token (classic) with copilot scope at: https://github.com/settings/tokens
ANTIGRAVITY_ENABLED=trueRequires Windsurf to be running. onWatch auto-detects the local server.
Add onWatch to your user PATH for easy access:
$path = [Environment]::GetEnvironmentVariable("Path", "User")
$onwatchPath = "$env:USERPROFILE\.onwatch"
if ($path -notlike "*$onwatchPath*") {
[Environment]::SetEnvironmentVariable("Path", "$onwatchPath;$path", "User")
}Restart your terminal for PATH changes to take effect.
Navigate to the installation directory and run:
cd "$env:USERPROFILE\.onwatch"
.\bin\onwatch.exeOr if you added it to PATH:
onwatchOpen your browser to http://localhost:9211 and log in with your configured credentials.
If you have Claude Code installed, your token is stored in the credentials file:
(Get-Content "$env:USERPROFILE\.claude\.credentials.json" | ConvertFrom-Json).claudeAiOauth.accessTokenCopy the output and paste it as ANTHROPIC_TOKEN in your .env file.
If you have Codex CLI installed, your token is stored in the auth file:
(Get-Content "$env:USERPROFILE\.codex\auth.json" | ConvertFrom-Json).tokens.access_tokenIf you use a custom CODEX_HOME:
(Get-Content "$env:CODEX_HOME\auth.json" | ConvertFrom-Json).tokens.access_tokenCopy the output and paste it as CODEX_TOKEN in your .env file.
cd "$env:USERPROFILE\.onwatch"
.\bin\onwatch.exeonWatch runs in the background. Access the dashboard at http://localhost:9211.
cd "$env:USERPROFILE\.onwatch"
.\bin\onwatch.exe --debugLogs are printed to the console. Useful for troubleshooting.
cd "$env:USERPROFILE\.onwatch"
.\bin\onwatch.exe stopcd "$env:USERPROFILE\.onwatch"
.\bin\onwatch.exe statusTo create a shortcut for easy access:
- Right-click on your Desktop
- Select New > Shortcut
- Enter the location:
%USERPROFILE%\.onwatch\bin\onwatch.exe - Click Next and name it "onWatch"
- Click Finish
To run in debug mode (shows console window):
- Right-click the shortcut > Properties
- In Target, append
--debug:%USERPROFILE%\.onwatch\bin\onwatch.exe --debug
For production deployments, you can run onWatch as a Windows Service using NSSM (Non-Sucking Service Manager):
- Download NSSM from https://nssm.cc/download
- Extract and open Command Prompt as Administrator
- Install the service:
nssm install onwatch "%USERPROFILE%\.onwatch\bin\onwatch.exe"
nssm set onwatch AppDirectory "%USERPROFILE%\.onwatch"
nssm set onwatch AppParameters "--debug"
nssm set onwatch DisplayName "onWatch API Quota Tracker"
nssm set onwatch Description "Tracks AI API quota usage"
nssm set onwatch Start SERVICE_AUTO_START
nssm start onwatchManage the service:
nssm status onwatch
nssm stop onwatch
nssm restart onwatch
nssm remove onwatch confirmWindows Defender may flag onwatch.exe as Program:Win32/Wacapew.A!ml. This is a false positive.
Why this happens: Go binaries are statically compiled, bundling the entire runtime into a single ~15MB executable. This structure - combined with the binary's network operations (HTTP server, API polling) - triggers machine learning heuristics designed to detect packed or obfuscated malware. This is a known issue affecting many legitimate Go applications.
Our status: We have submitted onwatch.exe to Microsoft for analysis and whitelisting. This process typically takes 1-2 weeks.
Workaround: Add an exclusion in Windows Defender:
- Open Windows Security → Virus & threat protection
- Under "Virus & threat protection settings", click Manage settings
- Scroll to Exclusions → Add or remove exclusions
- Click Add an exclusion → Folder
- Add:
C:\Users\<your-username>\.onwatch
The source code is fully auditable at github.com/onllm-dev/onwatch (GPL-3.0).
If the app starts but no quota cards update:
- Ensure
.envexists at%USERPROFILE%\.onwatch\.env - Configure a provider key (or use auto-detect providers)
- Open Settings -> Providers and enable telemetry for that provider
- Restart or click provider reload in Settings
This happens when double-clicking the binary without configuration. Either:
- Use the one-click installer:
irm https://raw.githubusercontent.com/onllm-dev/onwatch/main/install.ps1 | iex - Follow the manual setup steps above
If port 9211 is taken, change it in .env:
ONWATCH_PORT=9212Check what's using a port:
netstat -ano | findstr :9211If onwatch isn't recognized after adding to PATH:
- Restart your terminal/PowerShell
- Or use the full path:
$env:USERPROFILE\.onwatch\bin\onwatch.exe
If Claude Code or Codex tokens aren't auto-detected:
- Ensure the respective tool is installed and you've logged in
- Check that credential files exist:
- Claude Code:
%USERPROFILE%\.claude\.credentials.json - Codex:
%USERPROFILE%\.codex\auth.json
- Claude Code:
- Manually retrieve and paste the token (see Retrieving Tokens)
cd "$env:USERPROFILE\.onwatch"
.\bin\onwatch.exe update- Stop onWatch:
.\bin\onwatch.exe stop - Download the new binary from Releases
- Replace
%USERPROFILE%\.onwatch\bin\onwatch.exe - Start onWatch:
.\bin\onwatch.exe
To completely remove onWatch:
# Stop onWatch
cd "$env:USERPROFILE\.onwatch"
.\bin\onwatch.exe stop
# Remove installation directory
Remove-Item -Recurse -Force "$env:USERPROFILE\.onwatch"
# Remove from PATH (optional)
$path = [Environment]::GetEnvironmentVariable("Path", "User")
$newPath = ($path -split ';' | Where-Object { $_ -notlike "*\.onwatch*" }) -join ';'
[Environment]::SetEnvironmentVariable("Path", $newPath, "User")MINIMAX_API_KEY=sk-cp_your_key_hereGet your key at: https://platform.minimax.io