{
  "markdown": "# GeminiCLI_ComputerUse_Extension\nA Google Gemini-CLI extension than enables Gemini Computer Use from the CLI\n\n## Installation\n\ngemini extensions install https://github.com/automateyournetwork/GeminiCLI_ComputerUse_Extension.git\n\n### Example Gemini-CLI prompt to VISIBLY browse a web article and produce a Markdown report\nUse ComputerUse MCP headfully to VISIBLY browse like a human and produce a final Markdown report.\n\nGoals:\n- Read the article at the given URL.\n- Scroll like a human (visible motion), taking a snapshot after EACH scroll step.\n- Visit all in-article links (avoid mailto/tel/#). Prefer opening in NEW TABS that do not overtake the main article tab. If tab tools are unavailable, open links sequentially and return to the article each time.\n- Conclude with a comprehensive Markdown summary (RAFT, retrieval-augmented fine-tuning, key takeaways), citing the pages you visited.\n\n1) initialize_browser(\n     url=\"https://www.automateyournetwork.ca/pyats/augmenting-network-engineering-with-raft/\",\n     width=1920, height=1080, headless=false)\n\n2) Smoothly scroll the article TOP→BOTTOM with visible pauses. After EACH step, take a snapshot:\n   for y in [200, 400, 600, 800, 1000]:\n     - execute_action(\"scroll_to_percent\", {\"y\": y})\n     - capture_state(f\"scroll_{y}\")\n\n3) Return to TOP visibly and snapshot:\n   - execute_action(\"scroll_to_percent\", {\"y\": 0})\n   - capture_state(\"back_to_top\")\n\n4) Harvest in-article links (de-dupe, skip mailto/tel/#):\n   - execute_action(\"execute_javascript\", {\n       \"code\": \"(() => { \\\n         const scope = document.querySelector('article, main, .post-content, .entry-content') || document.body; \\\n         const links = Array.from(scope.querySelectorAll('a[href]')); \\\n         const hrefs = links.map(a => a.href.trim()) \\\n           .filter(h => h && !h.startsWith('mailto:') && !h.startsWith('tel:') && !h.includes('#')); \\\n         return Array.from(new Set(hrefs)); \\\n       })();\"\n     })\n\n5) Visit each harvested link (limit to 8 to stay readable):\n   Preferred (if these tools exist): open_new_tab, list_tabs, switch_to_tab\n   - For each <link> (1-based index i):\n       - If open_new_tab exists:\n           - open_new_tab(url=\"<link>\", focus=true)\n           - capture_state(f\"link{i}_load\")                      # snapshot immediately after load\n           - For y in [200, 400, 600, 800, 1000]:\n                  execute_action(\"scroll_to_percent\", {\"y\": y})\n                  capture_state(f\"link{i}_scroll_{y}\")           # snapshot each scroll step\n           - switch_to_tab(0)                                   # return to main article tab\n       - Else (fallback when tab tools absent):\n           - execute_action(\"open_web_browser\", {\"url\": \"<link>\"})\n           - capture_state(f\"link{i}_load\")\n           - For y in [200, 400, 600, 800, 1000]:\n                  execute_action(\"scroll_to_percent\", {\"y\": y})\n                  capture_state(f\"link{i}_scroll_{y}\")\n           - execute_action(\"open_web_browser\", {\"url\": \"https://www.automateyournetwork.ca/pyats/augmenting-network-engineering-with-raft/\"})\n           - capture_state(f\"link{i}_return\")                   # confirm we’re back on the main article\n\n6) After links, return to the main article (if not already there) and capture_state(\"final_overview\").\n\n7) Produce a comprehensive Markdown report (no extra screenshots in the report; just text). Structure:\n   # RAFT & Retrieval-Augmented Fine-Tuning — Field Notes\n   - **Primary article:** title + URL\n   - **Other pages visited:** bullet list of titles + URLs\n   - **What RAFT is:** 3–6 bullets (your own words)\n   - **How RAFT differs from standard fine-tuning:** bullets\n   - **Retrieval-Augmented Fine-Tuning pipeline:** concise steps (data prep, retrieval store, adapters/LoRA/full FT, eval)\n   - **Cloud vs Local comparison (from the two-part series):** capabilities, privacy, cost, constraints\n   - **Implementation notes spotted in pages:** tools, commands, pitfalls\n   - **Key takeaways:** 5–8 bullets\n   - **References (visited):** list of URLs\n\nImportant:\n- Keep actions human-visible (no instant jumps).\n- If a page won’t load, skip it and continue.\n- Take a small pause between scroll steps so motion is obvious.\n\n### Example Searching Wikipedia for \"Computer Networking\" and producing a Markdown report\n#### Wikipedia Exploration: Computer Networks\n\nHeadless=false for visible browsing.\n\nYou will systematically explore Wikipedia (and optionally Google) articles about computer networks using the ComputerUse MCP tools. Use selectors (not coordinates), add pauses so the typing is obvious, and take screenshots after each major step.\n\nPhase 1: Initialize & Search (Wikipedia)\n\nInitialize headful browser\n\ninitialize_browser(url=\"https://www.wikipedia.org\", width=1920, height=1080, headless=false)\ncapture_state(\"wikipedia_home\")\npause(800)\n\n\nSearch for “Computer Network” with visible typing\n\nfill_selector('input[name=\"search\"]', 'Computer Network', true, true)\npause(800)   # let navigation/rendering be seen\ncapture_state(\"wiki_search_results_or_article\")\n\n\nNote: Wikipedia may jump straight to the article. Continue from whatever page loads.\n\nPhase 2: Explore the page/results with smooth pacing\n\nScroll (top → bottom) with pauses\n\nfor y in [200, 400, 600, 800, 1000]:\n  execute_action(\"scroll_to_percent\", {\"y\": y})\n  pause(700)\n  capture_state(f\"wiki_scroll_{y}\")\n\n\nReturn to top\n\nexecute_action(\"scroll_to_percent\", {\"y\": 0})\npause(500)\ncapture_state(\"wiki_top\")\n\nPhase 3: Extract & Visit Links (up to 8)\n\nExtract article links on current page\n\nexecute_action(\"execute_javascript\", {\n  \"code\": \"(() => {\\\n    const links = Array.from(document.querySelectorAll('a[href*=\\\"/wiki/\\\"]'))\\\n      .map(a => a.href)\\\n      .filter(h => h.includes('wikipedia.org/wiki/') && !h.includes('#'))\\\n      .filter((v, i, a) => a.indexOf(v) === i);\\\n    return links.slice(0, 8);\\\n  })()\"\n})\npause(600)\n\n\nVisit each link in sequence\nFor each link i:\n\nexecute_action(\"open_web_browser\", {\"url\": \"{{link_i}}\"})\npause(900)\ncapture_state(f\"article_{i}_loaded\")\n\nfor y in [0, 250, 500, 750, 1000]:\n  execute_action(\"scroll_to_percent\", {\"y\": y})\n  pause(650)\n  capture_state(f\"article_{i}_scroll_{y}\")\n\n# Go back to the search/article hub if desired:\n# execute_action(\"open_web_browser\", {\"url\": \"<the-page-you-extracted-from>\"})\n# pause(600)\n\n(Optional) Phase 3b: Also show a Google search (for demo effect)\nexecute_action(\"open_web_browser\", {\"url\": \"https://www.google.com\"})\npause(700)\ncapture_state(\"google_home\")\n\nfill_selector('textarea[name=\\\"q\\\"]', 'Computer Network', true, true)\npause(900)\ncapture_state(\"google_results_top\")\n\nexecute_action(\"scroll_to_percent\", {\"y\": 600})\npause(700)\ncapture_state(\"google_results_mid\")\n\nPhase 4: Summary Report (after all visits)\n\nAfter visiting all targets, produce a Markdown summary:\n\n# Wikipedia Exploration Report: Computer Networks\n\n## Search Query\n- **Primary Query:** Computer Network\n- **Search URL:** [Insert the URL where the search happened]\n\n## Articles Visited (up to 8)\n1. [Title 1](URL) — 1–2 sentence summary\n2. [Title 2](URL) — 1–2 sentence summary\n...\n\n## Key Learnings\n- ...\n- ...\n\n## Major Subtopics\n- **Protocols & Standards:** ...\n- **Topology & Architecture:** ...\n- **History & Development:** ...\n- **Technologies & Components:** ...\n- **Related Disciplines:** ...\n\n## All URLs Visited\n1. URL\n2. URL\n...\n\n## Environment Variables\n\n🧩 Recommended ComputerUse MCP Environment Variables\n\nVariable\tPurpose\tRecommended for Demo\tExample\n\nCU_HEADFUL\tLaunch the browser with a visible window.\t✅ Yes\texport CU_HEADFUL=1\n\nCU_SLOW_MO\tMilliseconds of delay between Playwright actions (move, click, type).\t✅ Yes\texport CU_SLOW_MO=700\n\nCU_SHOW_CURSOR\tDisplay cyan “cursor ring” overlay to visualize movement.\t✅ Yes\texport CU_SHOW_CURSOR=true\n\nCU_NO_SANDBOX\tDisable Chromium sandbox if Playwright complains (needed in some Docker/macOS setups).\toptional\texport CU_NO_SANDBOX=1\n\nCU_BROWSER\tForce a specific browser (chromium, firefox, webkit) if you installed all.\toptional\texport CU_BROWSER=chromium\n\nCU_DEVICE_SCALE\tOverride Retina scaling (use 2 on macOS for pixel-accurate clicks).\toptional\texport CU_DEVICE_SCALE=2\n\n\n🧠 Typical macOS Demo Setup\n\nexport CU_HEADFUL=1\n\nexport CU_SLOW_MO=800\n\nexport CU_SHOW_CURSOR=true\n\nexport CU_DEVICE_SCALE=2\n\nexport CU_NO_SANDBOX=0\n",
  "bytes": 8321,
  "sha": "031f2311e5ce891bdf9fde3b9e53bbb311f24dce91d05d237e318e98846575e8",
  "repo_slug": "automateyournetwork/geminicli_computeruse_extension",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_automateyournetwork_geminicli_computerus_19908ccc/readme"
}