一项Claude技能,让你的经纪人能够使用网页浏览器
概览
一款浏览器自动化工具,允许AI代理和开发者通过沙盒JavaScript脚本控制浏览器。 - - 脚本在无主机访问的QuickJS WASM沙盒中运行 - - 导航一次,跨多个脚本交互 - - 连接到你正在运行的Chrome或启动新的Chromium - - 进入、点击、填充、定位、评估、截图等 https://github.com/user-attachments/assets/c6cf7fb9-b1dc-46ed-93b9-6e7240990c53 要连接到Windows上运行中的Chrome实例: Windows npm 安装时会在安装后下载原生 dev-browser-windows-x64.exe 发布资产,生成的 npm shim 直接调用该可执行文件。 安装后,告诉你的代理运行dev-browser——help——帮助输出包含当前的LLM使用指南和API参考。 对于发现本地技能的代理,请明确安装或刷新嵌入技能: 标志可以组合使用。通过交互式终端,开发者浏览器为目标发送安装技能提示。
概述(AI 翻译)
由Do Browser赞助。
dev-browser 让编码代理用简短的JavaScript脚本控制Chrome。浏览器在调用之间保持开启,
因此,代理只需一次导航、检查页面、操作并验证结果,而无需每次都重新开始。
主要功能:
- 持久页面。 命名标签页在脚本间传递状态。
- 紧凑快照。 可访问树为代理提供可读的输出和稳定元素的引用。
- 真正的傀儡师。 脚本使用 Puppeteer 页面 API 以及一小部分以代理为中心的辅助工具。
- 启动或附加。 启动独立的 Chrome 配置文件或连接到你已打开的浏览器。
演示
https://github.com/user-attachments/assets/c6cf7fb9-b1dc-46ed-93b9-6e7240990c53
CLI 安装
发布二进制文件包含 Bun 和 Puppeteer。安装后不需要 Node。macOS 和 glibc Linux 是 支持;Windows 和 musl Linux 尚未被支持。
Snap Package 的 Chromium 无法读取默认的 ~/.dev-browser/v1 目录。在 Ubuntu 上,使用 dev-browser install
或指向另一个铬二进制。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Brought to you by Do Browser.
dev-browser lets coding agents control Chrome with short JavaScript scripts. The browser stays open between calls,
so an agent can navigate once, inspect the page, act, and verify the result without starting over each time.
Key features:
- Persistent pages. Named tabs carry state across scripts.
- Compact snapshots. Accessibility trees give agents readable output and stable element refs.
- Real Puppeteer. Scripts use the Puppeteer Page API plus a small set of agent-focused helpers.
- Launch or attach. Start an isolated Chrome profile or connect to a browser you already have open.
Demo
https://github.com/user-attachments/assets/c6cf7fb9-b1dc-46ed-93b9-6e7240990c53
CLI installation
npm install -g dev-browser
dev-browser install # only needed if dev-browser cannot find Chrome
The release binary includes Bun and Puppeteer. Node is not required after installation. macOS and glibc Linux are supported; Windows and musl Linux are not yet supported.
Snap-packaged Chromium cannot read the default ~/.dev-browser/v1 directory. On Ubuntu, use dev-browser install
or point DEV_BROWSER_CHROME at another Chrome binary.
If your package manager blocks lifecycle scripts, run npm rebuild -g dev-browser, pnpm approve-builds -g dev-browser, or bun pm -g trust dev-browser. The CLI will also try to download its binary on first use. For a
private mirror, set DEV_BROWSER_DOWNLOAD_BASE; set DEV_BROWSER_SKIP_DOWNLOAD=1 if you install the binary yourself.
Quick start
# Launch a headless browser and run a script
dev-browser --headless <<'EOF'
const page = await browser.getPage("main");
await page.goto("https://example.com");
console.log(await page.title());
EOF
# Attach to Chrome started with `dev-browser chrome`
dev-browser chrome
dev-browser --connect <<'EOF'
console.log(await browser.listPages());
EOF
Chrome 136 and newer ignore remote-debugging flags on the default profile. dev-browser chrome handles this by using
a dedicated profile and checking that Chrome actually started.
Using it with coding agents
Tell the agent to run dev-browser --help. The built-in guide covers the current API and the preferred
look → act → verify workflow.
Agents that discover local skills can install the bundled skill explicitly:
dev-browser install-skill --codex # ~/.codex/skills/dev-browser/SKILL.md
dev-browser install-skill --claude # ~/.claude/skills/dev-browser/SKILL.md
dev-browser install-skill --agents # ~/.agents/skills/dev-browser/SKILL.md
Run dev-browser install-skill without flags to update all three locations.
Idle browser cleanup
Launched browsers close after 30 minutes without a script by default. Change that per command, in the environment, or
in ~/.dev-browser/v1/config.json:
推荐工具
换一个关键词,或者移除筛选条件。
安装
npx skillfish add sawyerhood/dev-browser