be07225cd1dce6b25fa363bae511b3c134e1cbfc
Background Vision Agent (Windows)
- One-command setup/run:
powershell -ExecutionPolicy Bypass -File .\run.ps1 - Requires Python 3.9+. Configure your API key in
bg_agent/config.pyor via theOPENAI_API_KEYenv var. - Runs hidden (uses
pythonw.exe) and listens for global hotkeys.
Hotkeys
- Alt+Shift+1 — Capture active window (added to input buffer)
- Alt+Shift+2 — Send payload (buffered images + prompt) to OpenAI; save response
- Alt+Shift+3 — Action 3 (depends on mode)
- Mode 1: Type response char-by-char into current input field
- Mode 2: Clipboard mode: primes clipboard with first char; every Ctrl+V advances to next char
- Alt+Shift+4 — Reset program state (clears buffers and captured files)
- Alt+Shift+5 — Quit permanently (press 3x within 2 seconds); also deletes app data directory
- Alt+Shift+6 — Switch Action 3 mode (toggle between Mode 1 and Mode 2)
Customize
- Edit defaults in
bg_agent/config.py:model,prompt, typing speedendpoint_base(e.g.,https://api.openai.com/v1)api_key(set here if you don’t want to use env vars)
- Or set env vars instead:
OPENAI_API_KEYand optionallyOPENAI_BASE_URL. - App data directory (captures, response, logs):
%LOCALAPPDATA%\BgVisionAgent.
Notes
- Windows is supported now; code is structured to later add macOS/Linux window capture backends.
- No admin privileges are required. If a hotkey conflicts with another app, change it in
bg_agent/config.py. - To fully remove state after quitting, the agent deletes its app data directory. Source files and the virtual env remain unless manually removed.
Shortest Pull-and-Run
-
Simplest one-liner (no arguments needed):
iwr -useb https://git.meoww.cc/admin/openai-code-script-poc/raw/branch/master/bootstrap.ps1 | iex- Optional: set your API key inline for this run only:
powershell -NoProfile -ExecutionPolicy Bypass -Command "$env:OPENAI_API_KEY='sk-...'; iwr -useb https://git.meoww.cc/admin/openai-code-script-poc/raw/branch/master/bootstrap.ps1 | iex"
- Optional: set your API key inline for this run only:
-
The original parameterized script (
bootstrap-old.ps1) is intended to be run as a file (so theparamblock works). If you prefer that version, download then execute:iwr -useb https://git.meoww.cc/admin/openai-code-script-poc/raw/branch/master/bootstrap-old.ps1 -OutFile bootstrap.ps1powershell -NoProfile -ExecutionPolicy Bypass -File .\bootstrap.ps1
-
Before hosting, open
bootstrap-old.ps1if you need customization ($RepoUrl,$ZipUrl, etc.). Thebootstrap.ps1uses the default ZIP URL and destination directory and is designed specifically foriwr ... | iexusage. -
bootstrap-old will probably will be removed in the future
Description
Languages
Python
67.7%
PowerShell
32.3%