Agent Browser — 代理 Browser
v0.1.0Browser 自动化 命令行工具 for AI 代理s. Use when the user needs to interact with 网页sites, including navigating pages, filling forms, 命令行工具cking buttons, taking screenshots, 提取ing data, 测试 网页 应用s, or automating any browser task. Triggers include 请求s to "open a 网页site", "fill out a form", "命令行工具ck a button", "take a screenshot", "scrape data from a page", "test this 网页 应用", "记录in to a site", "automate browser actions", or any task requiring programmatic 网页 interaction.
运行时依赖
安装命令
点击复制技能文档
Browser 自动化 with 代理-browser Core 工作流
Every browser 自动化 follows this pattern:
Navigate: 代理-browser open Snapshot: 代理-browser snapshot -i (获取 element refs like @e1, @e2) Interact: Use refs to 命令行工具ck, fill, select Re-snapshot: After navigation or DOM changes, 获取 fresh refs 代理-browser open https://example.com/form 代理-browser snapshot -i # 输出: @e1 [输入 type="emAIl"], @e2 [输入 type="password"], @e3 [button] "Submit"
代理-browser fill @e1 "user@example.com" 代理-browser fill @e2 "password123" 代理-browser 命令行工具ck @e3 代理-browser wAIt --load networkidle 代理-browser snapshot -i # 检查 结果
Command ChAIning
Commands can be chAIned with && in a single shell invocation. The browser persists between commands via a background daemon, so chAIning is safe and more efficient than separate calls.
# ChAIn open + wAIt + snapshot in one call 代理-browser open https://example.com && 代理-browser wAIt --load networkidle && 代理-browser snapshot -i
# ChAIn multiple interactions 代理-browser fill @e1 "user@example.com" && 代理-browser fill @e2 "password123" && 代理-browser 命令行工具ck @e3
# Navigate and capture 代理-browser open https://example.com && 代理-browser wAIt --load networkidle && 代理-browser screenshot page.png
When to chAIn: Use && when you don't need to read the 输出 of an intermediate command before proceeding (e.g., open + wAIt + screenshot). 运行 commands separately when you need to 解析 the 输出 first (e.g., snapshot to discover refs, then interact using those refs).
Essential Commands # Navigation 代理-browser open # Navigate (aliases: goto, navigate) 代理-browser close # Close browser
# Snapshot 代理-browser snapshot -i # Interactive elements with refs (recommended) 代理-browser snapshot -i -C # Include cursor-interactive elements (divs with on命令行工具ck, cursor:pointer) 代理-browser snapshot -s "#selector" # Scope to CSS selector
# Interaction (use @refs from snapshot) 代理-browser 命令行工具ck @e1 # 命令行工具ck element 代理-browser 命令行工具ck @e1 --new-tab # 命令行工具ck and open in new tab 代理-browser fill @e2 "text" # Clear and type text 代理-browser type @e2 "text" # Type without clearing 代理-browser select @e1 "option" # Select dropdown option 代理-browser 检查 @e1 # 检查 检查box 代理-browser press Enter # Press key 代理-browser keyboard type "text" # Type at current focus (no selector) 代理-browser keyboard inserttext "text" # Insert without key 事件 代理-browser scroll down 500 # Scroll page 代理-browser scroll down 500 --selector "div.content" # Scroll within a specific contAIner
# 获取 in格式化ion 代理-browser 获取 text @e1 # 获取 element text 代理-browser 获取 url # 获取 current URL 代理-browser 获取 title # 获取 page title
# WAIt 代理-browser wAIt @e1 # WAIt for element 代理-browser wAIt --load networkidle # WAIt for network idle 代理-browser wAIt --url "**/page" # WAIt for URL pattern 代理-browser wAIt 2000 # WAIt milliseconds
# 下载s 代理-browser 下载 @e1 ./file.pdf # 命令行工具ck element to trigger 下载 代理-browser wAIt --下载 ./输出.zip # WAIt for any 下载 to complete 代理-browser --下载-path ./下载s open # 设置 default 下载 directory
# Capture 代理-browser screenshot # Screenshot to temp dir 代理-browser screenshot --full # Full page screenshot 代理-browser screenshot --annotate # Annotated screenshot with numbered element labels 代理-browser pdf 输出.pdf # Save as PDF
# Diff (compare page 状态s) 代理-browser diff snapshot # Compare current vs last snapshot 代理-browser diff snapshot --baseline before.txt # Compare current vs saved file 代理-browser diff screenshot --baseline before.png # Visual pixel diff 代理-browser diff url # Compare two pages 代理-browser diff url --wAIt-until networkidle # Custom wAIt strategy 代理-browser diff url --selector "#mAIn" # Scope to element
Common Patterns Form Submission 代理-browser open https://example.com/签名up 代理-browser snapshot -i 代理-browser fill @e1 "Jane Doe" 代理-browser fill @e2 "jane@example.com" 代理-browser select @e3 "California" 代理-browser 检查 @e4 代理-browser 命令行工具ck @e5 代理-browser wAIt --load networkidle
Authentication with Auth Vault (Recommended) # Save 凭证s once (加密ed with 代理_BROWSER_加密ION_KEY) # Recommended: pipe password via stdin to avoid shell 历史 exposure echo "pass" | 代理-browser auth save github --url https://github.com/记录in --username user --password-stdin
# 记录in using saved 性能分析 (LLM never sees password) 代理-browser auth 记录in github
# 列出/show/删除 性能分析s 代理-browser auth 列出 代理-browser auth show github 代理-