{"id":50340039,"url":"https://github.com/ajmeese7/gpu-browser-bridge","last_synced_at":"2026-05-29T16:01:35.540Z","repository":{"id":361016504,"uuid":"1251534296","full_name":"ajmeese7/gpu-browser-bridge","owner":"ajmeese7","description":"HTTP API that wraps a GPU-backed Chrome on Windows, letting headless callers take screenshots and run JS against real WebGPU/WebGL code paths over an SSH tunnel.","archived":false,"fork":false,"pushed_at":"2026-05-28T21:55:23.000Z","size":130,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-28T22:12:16.434Z","etag":null,"topics":["browser-automation","chrome","chromedp","devtools-protocol","gpu","headless","screenshot","webgl","webgpu"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ajmeese7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"docs/security.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-05-27T17:11:57.000Z","updated_at":"2026-05-28T21:55:28.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ajmeese7/gpu-browser-bridge","commit_stats":null,"previous_names":["ajmeese7/gpu-browser-bridge"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/ajmeese7/gpu-browser-bridge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajmeese7%2Fgpu-browser-bridge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajmeese7%2Fgpu-browser-bridge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajmeese7%2Fgpu-browser-bridge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajmeese7%2Fgpu-browser-bridge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ajmeese7","download_url":"https://codeload.github.com/ajmeese7/gpu-browser-bridge/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajmeese7%2Fgpu-browser-bridge/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33659872,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["browser-automation","chrome","chromedp","devtools-protocol","gpu","headless","screenshot","webgl","webgpu"],"created_at":"2026-05-29T16:01:34.282Z","updated_at":"2026-05-29T16:01:35.524Z","avatar_url":"https://github.com/ajmeese7.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gpu-browser-bridge\n\nDrive a real GPU-backed Chrome on a remote Windows workstation from a headless host, so WebGPU / WebGL / WebXR code paths can be verified without falling back to software rendering.\n\n**Status:** v1 working end-to-end. Tested on Chrome 148, AMD RDNA-2.\n\n## Why\n\nHeadless Chromium has no WebGPU adapter, so any code that branches on `navigator.gpu` either silently falls back to WebGL2 or fails in ways that are invisible to the headless caller. This means:\n\n- Coding agents running on cloud or air-gapped boxes can't verify WebGPU features they just wrote.\n- Visual regression in CI doesn't catch GPU-only rendering bugs.\n- Anyone doing browser-based ML inference, 3D rendering, or WebXR work on a GPU-less server has no good way to \"see what the user sees.\"\n\nThis bridge exposes a Windows workstation's real Chrome (with a GPU) to remote callers over an authenticated HTTP API, so the headless caller can take screenshots, run Playwright specs, and inspect runtime state against the same code path a developer sees in their own browser.\n\n## Architecture\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"./docs/architecture-dark.svg\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"./docs/architecture-light.svg\"\u003e\n  \u003cimg alt=\"Architecture diagram showing the headless caller connecting to the GPU host via SSH tunnel\" src=\"./docs/architecture-light.svg\"\u003e\n\u003c/picture\u003e\n\n## Quick start\n\n### GPU host (Windows)\n\n\u003e **No admin required.** Everything installs under your user profile\n\u003e (`%LocalAppData%\\gpu-browser-bridge`) and runs as a per-user logon Scheduled Task — so you never run an install script as Administrator. The bridge runs in your **interactive desktop session**, which is what gives Chrome a real GPU (a Windows *service* runs in Session 0 with no GPU desktop and hangs on WebGPU).\n\n```powershell\n# 1. Install Google Chrome:    https://www.google.com/chrome/\n# 2. Clone this repo, then (normal, non-elevated PowerShell):\n.\\windows\\install.ps1\n# Builds bridge.exe, generates the token, registers + starts the logon task.\n# Prints the bearer token and the caller-side setup snippet.\n```\n\nThe bridge runs invisibly: `bridge.exe` is built with no console window and Chrome runs in new headless mode (no window at all — and it still uses the real GPU). For unattended reboots, enable auto-logon so a desktop session exists (see [windows/README.md](./windows/README.md)).\n\n### Caller (Linux / macOS / WSL)\n\n```bash\n# 1. Open the SSH tunnel (autossh in production, see docs/networking.md)\n#    Use 127.0.0.1 (not localhost) for the remote target -- see docs/networking.md.\nssh -N -L 51234:127.0.0.1:51234 \u003cuser\u003e@\u003cgpu-host\u003e\n\n# 2. Configure the CLI\nmkdir -p ~/.config/gpu-browser\ncat \u003e ~/.config/gpu-browser/config \u003c\u003cEOF\nBRIDGE_URL=http://localhost:51234\nBRIDGE_TOKEN=\u003ctoken from install.ps1\u003e\nEOF\n\n# 3. Smoke test\ngpu-browser healthz\ngpu-browser screenshot https://example.com/ --out example.png\ngpu-browser eval https://example.com/ \\\n  \"(async () =\u003e { const a = await navigator.gpu?.requestAdapter(); return a?.info; })()\"\n```\n\n## API\n\nAll POST endpoints require `Authorization: Bearer \u003ctoken\u003e`. `GET /healthz` is unauthenticated.\n\n| Method | Path | Body | Returns |\n|--------|------|------|---------|\n| `GET`  | `/healthz` | — | `{ok, chrome_alive, uptime_s}` |\n| `POST` | `/screenshot` | `{url, viewport_w?, viewport_h?, wait_for?, full_page?, ignore_https_errors?, settle_ms?, timeout_ms?, cookies?, headers?, local_storage?}` | `{png_b64, console[], failed_requests[]}` |\n| `POST` | `/eval` | `{url, script, wait_for?, ignore_https_errors?, settle_ms?, timeout_ms?, cookies?, headers?, local_storage?}` | `{result, console[], failed_requests[]}` |\n\n`script` runs in page context after navigation + optional wait; the final expression's value is returned. Promises are awaited.\n\n`cookies`, `headers`, and `local_storage` are optional session material applied before navigation, so you can capture pages behind a login. `headers` is a `{name: value}` map sent with every request (e.g. `{\"Authorization\": \"Bearer ...\"}`); `cookies` is an array of `{name, value, url?|domain?, path?, secure?, http_only?, same_site?}` (give `url` and Chrome infers the rest); `local_storage` is a `{key: value}` map seeded into the target origin before its own scripts run. On the CLI these are `--header \"K: V\"`, `--cookie name=value`, and `--local-storage k=v` (each repeatable).\n\n## Install\n\n### Pre-built binaries\n\nDownload from the [latest release](../../releases/latest):\n\n| Binary | Platform | Description |\n|--------|----------|-------------|\n| `bridge.exe` | Windows amd64 | GPU host binary |\n| `gpu-browser-linux-amd64` | Linux amd64 | Caller CLI |\n| `gpu-browser-linux-arm64` | Linux arm64 | Caller CLI |\n| `gpu-browser-darwin-amd64` | macOS Intel | Caller CLI |\n| `gpu-browser-darwin-arm64` | macOS Apple Silicon | Caller CLI |\n\nOn the caller:\n\n```bash\ncurl -Lo gpu-browser https://github.com/ajmeese7/gpu-browser-bridge/releases/latest/download/gpu-browser-linux-amd64\nchmod +x gpu-browser\nsudo mv gpu-browser /usr/local/bin/\n```\n\n### Build from source\n\n```bash\ngo build -ldflags \"-H=windowsgui\" -o bridge.exe ./cmd/bridge  # Windows host binary (no console window)\ngo build -o gpu-browser ./cmd/gpu-browser                     # caller CLI (cross-platform)\n```\n\nGo 1.26+ required (pulled in by chromedp).\n\n## Docs\n\n- [SPEC.md](./SPEC.md) — full design, milestones (v0–v2), design decisions\n- [docs/networking.md](./docs/networking.md) — SSH tunnel and Tailscale recipes\n- [docs/security.md](./docs/security.md) — threat model, what's protected and not\n- [windows/README.md](./windows/README.md) — install / uninstall / token rotation\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajmeese7%2Fgpu-browser-bridge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fajmeese7%2Fgpu-browser-bridge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajmeese7%2Fgpu-browser-bridge/lists"}