From 219ca536d9c88f5ead3042e02af58070b0adaa0d Mon Sep 17 00:00:00 2001 From: aeroreyna Date: Tue, 7 Jul 2026 23:00:01 -0400 Subject: [PATCH] daily auto-sync 2026-07-07 --- index.md | 1 + projects/reyna_cli_browser_control.md | 74 +++++++++++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 projects/reyna_cli_browser_control.md diff --git a/index.md b/index.md index b8131a5..6053c3c 100644 --- a/index.md +++ b/index.md @@ -7,6 +7,7 @@ - [[reMarkable Hermes Communication App]]: Tablet/Hermes communication app over reMarkable Paper Pro. - [[Grace Poppy Storybook Image Voice App]]: Document the Grace/Poppy image-generation and narration playback workflow, with next steps for a triggerable app and correction pipeline. - [[PARA Brain MCP Server]]: Server-side MCP/search layer for the Reyna family brain. + - [[Reyna CLI Browser Control]]: Add remote browser-control automations, starting with Gemini Web image generation, into `reyna-cli`. - **[[Areas]]:** Ongoing responsibilities and household maintenance. - **[[Resources]]:** Interests, reference material, and research. - [[Family Timeline]]: Chronological milestones. diff --git a/projects/reyna_cli_browser_control.md b/projects/reyna_cli_browser_control.md new file mode 100644 index 0000000..cd563aa --- /dev/null +++ b/projects/reyna_cli_browser_control.md @@ -0,0 +1,74 @@ +--- +Date: 2026-07-07 +Author: Hermes +Tags: [project, reyna-cli, browser-control, automation, gemini, image-generation] +--- + +# 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:9222` on 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: + +```bash +reyna-cli browser gemini-image \ + --prompt "Create a square image of ..." \ + --out ~/generated-images/gemini-web/output.png +``` + +or: + +```bash +reyna-cli image gemini-web \ + --prompt "Create a square image of ..." \ + --out ~/generated-images/gemini-web/output.png +``` + +## Automation Requirements + +The command should automate: + +1. Ensure SSH host key works for `imac`. +2. Ensure headed Chrome with `--remote-debugging-port=9222` is running on the iMac. +3. Open/reuse an SSH tunnel to Chrome CDP. +4. Connect via Playwright CDP. +5. Open Gemini Web. +6. Start a new chat unless `--reuse-chat` is passed. +7. Submit an image prompt. +8. Wait for a real generated image, filtering out avatars/Gemini sparkle images. +9. Extract blob-backed images by drawing to canvas and exporting PNG. +10. Save the image to a deterministic local path. +11. 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 `--json` output for agent/tool consumption. +- Add batch mode: prompt file or multiple prompts. +- Add optional screenshot/debug artifacts on failure. +- Reuse the existing `remote-browser-control` Hermes skill as implementation notes. + +## Related Notes + +- [[Projects]]