2.4 KiB
2.4 KiB
Date, Author, Tags
| Date | Author | Tags | ||||||
|---|---|---|---|---|---|---|---|---|
| 2026-07-07 | Hermes |
|
Reyna CLI Browser Control
Goal
Add the remote browser-control workflow into reyna-cli so browser automations can become reusable CLI subcommands/scripts instead of one-off Hermes procedures.
Initial Use Case
Gemini Web image generation through the iMac's headed Chrome browser:
- SSH target:
ssh imac - Remote Chrome CDP:
localhost:9222on the iMac - Local tunnel:
localhost:9222 -> imac:localhost:9222 - Gemini URL:
https://gemini.google.com/app - Current prototype script lives in Hermes skill support files:
~/.hermes/skills/computer-use/remote-browser-control/scripts/gemini_web_image.py
- Current wrapper:
~/.local/bin/gemini-web-image
Desired reyna-cli Direction
Create a reyna-cli browser-control namespace that can host reusable scripts, starting with Gemini image generation.
Potential command shape:
reyna-cli browser gemini-image \
--prompt "Create a square image of ..." \
--out ~/generated-images/gemini-web/output.png
or:
reyna-cli image gemini-web \
--prompt "Create a square image of ..." \
--out ~/generated-images/gemini-web/output.png
Automation Requirements
The command should automate:
- Ensure SSH host key works for
imac. - Ensure headed Chrome with
--remote-debugging-port=9222is running on the iMac. - Open/reuse an SSH tunnel to Chrome CDP.
- Connect via Playwright CDP.
- Open Gemini Web.
- Start a new chat unless
--reuse-chatis passed. - Submit an image prompt.
- Wait for a real generated image, filtering out avatars/Gemini sparkle images.
- Extract blob-backed images by drawing to canvas and exporting PNG.
- Save the image to a deterministic local path.
- Print machine-readable output with path, bytes, and dimensions.
Speed Improvements to Add Later
- Keep Chrome CDP running on the iMac at boot/login.
- Keep a persistent SSH tunnel/service instead of opening a new tunnel per image.
- Default output folder:
~/generated-images/gemini-web/with timestamped filenames. - Add
--jsonoutput for agent/tool consumption. - Add batch mode: prompt file or multiple prompts.
- Add optional screenshot/debug artifacts on failure.
- Reuse the existing
remote-browser-controlHermes skill as implementation notes.