Dev Browser

作者 sawyerhooda25e7672e199無授權條款6.6K 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫4 週前更新

Browser automation with persistent named pages via the dev-browser CLI. Use when users ask to navigate websites, fill forms, take screenshots, extract web data, test web apps, log into sites, or automate browser workflows. Trigger phrases include "go to [url]", "click on", "fill out the form", "take a screenshot", "scrape", "automate", "test the website", "log into", "open the browser", or any browser interaction request.

AI 產生的概覽

透過 dev-browser CLI 以簡短的 Puppeteer 指令碼控制真實的 Chrome 瀏覽器,並讓具名頁面持續存在。

功能
此技能說明一個命令列工具,可用簡短的 Puppeteer 指令碼操作真實的 Chrome 執行個體。內容涵蓋安裝、快速開始的 heredoc 與單行用法,以及具名頁面如何透過常駐守護程序在多次執行之間保留。也列出若干注意事項,例如行尾需加分號、click 不會等待、頁面名稱依瀏覽器區分,以及導覽後參照會重設。
適用情境
當使用者要求瀏覽網站、填寫表單、截圖、擷取網頁資料、測試網頁應用程式、登入網站或以其他方式自動化瀏覽器互動時使用。
執行需求
需要 Node.js 與 npm 或 bun 才能全域安裝 dev-browser CLI;首次執行時 CLI 會下載二進位檔,可能需要執行 dev-browser install 取得 Chrome。瀏覽需要網路存取。此技能未附帶指令碼,僅為說明文件。

dev-browser

CLI for controlling a real Chrome with short Puppeteer scripts. One warm daemon; named pages persist between runs.

bash
npm install -g dev-browser   # bun add -g dev-browser works too; the first run downloads the binary if the install script was blockeddev-browser install          # only if the first run says "No Chrome found"

Run dev-browser --help (full guide; dev-browser help <topic> for one section) before non-trivial work. Quick start:

bash
dev-browser <<'EOF'const page = await browser.getPage("main");        // named page persists across runsawait page.goto("https://example.com");            // default waitUntil: domcontentloadedawait page.snapshot({ interactive: true })         // ARIA tree with refs; last expression is printedEOFdev-browser -e 'const p = await browser.getPage("main"); await p.click("ref/e6"); await p.waitForLoad(); p.url()'

Gotchas: end lines with semicolons (a line starting with ( continues the previous one); return an object as ({ a, b }); page.click never waits (use waitForSelector first); page names are per browser (--headless and headed are separate Chromes and profiles); refs reset on navigation — re-snapshot; file paths resolve against your cwd (uploadFile, screenshot/pdf path); do not run parallel dev-browser calls against the same named page.

來源與署名

來源:sawyerhood/dev-browser位於skills/dev-browser提交a25e767

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架