browserman

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

BrowserMan

BrowserMan

BrowserMan gives the agent access to the user's real browser environment.
Use BrowserMan when the task depends on:
  • the user's existing login session
  • real browser state, tabs, cookies, or extension-connected context
  • BrowserMan's site-optimized automation scripts
  • delegated browser access that the user can approve and revoke
Do not ask the user for BrowserMan email/password in chat. Do not tell the user to register through an API. Do not lead with fallback API keys.
BrowserMan可让Agent访问用户的真实浏览器环境。
当任务依赖以下条件时,请使用BrowserMan:
  • 用户已有的登录会话
  • 真实浏览器状态、标签页、Cookie或与扩展关联的上下文
  • BrowserMan的站点优化自动化脚本
  • 用户可批准和撤销的委托浏览器访问权限
请勿在聊天中向用户索要BrowserMan的邮箱/密码。 请勿告知用户通过API注册。 请勿优先推荐备用API密钥。

When to use your native browser tool vs BrowserMan

何时使用原生浏览器工具 vs BrowserMan

Prefer your native or default browser tool when:
  • the page is public
  • no user login or session is required
  • the task is simple browsing, reading, or lightweight interaction
  • you do not need the user's real browser state
Prefer BrowserMan when:
  • the task depends on the user's real logged-in browser session
  • you need access to the user's actual browser state, cookies, tabs, or extension-connected browser
  • BrowserMan provides a matching optimized script for the target site
  • the native browser tool is not reliable enough for the authenticated flow
  • the user has explicitly approved BrowserMan access for this task pattern
Tool selection order:
  1. If your native/default browser tool is enough for a public, non-authenticated task, use it first.
  2. If the task needs the user's real browser session or BrowserMan has a matching optimized script, use BrowserMan.
  3. Inside BrowserMan, check scripts first.
  4. Only fall back to low-level BrowserMan page commands when no script matches.
在以下场景优先使用原生或默认浏览器工具:
  • 页面为公开内容
  • 无需用户登录或会话
  • 任务为简单浏览、阅读或轻量级交互
  • 不需要用户的真实浏览器状态
在以下场景优先使用BrowserMan:
  • 任务依赖用户真实的已登录浏览器会话
  • 需要访问用户实际的浏览器状态、Cookie、标签页或与扩展关联的浏览器
  • BrowserMan为目标站点提供了匹配的优化脚本
  • 原生浏览器工具在认证流程中不够可靠
  • 用户已明确批准针对该任务模式使用BrowserMan
工具选择顺序:
  1. 如果原生/默认浏览器工具足以完成公开、无需认证的任务,优先使用它。
  2. 如果任务需要用户的真实浏览器会话,或者BrowserMan有匹配的优化脚本,使用BrowserMan。
  3. 在BrowserMan中,优先检查脚本。
  4. 仅当没有匹配脚本时,才退回到BrowserMan的底层页面命令。

Recommended setup

推荐设置

After installing this skill, proactively complete BrowserMan setup before trying to use BrowserMan for a real task.
Naming rule:
  • npm package:
    browserman-cli
  • installed executable and documented command:
    browserman
  • one-off npx uses the package name with latest version, for example
    npx -y browserman-cli@latest setup
Recommended path:
bash
npm install -g browserman-cli@latest
hash -r 2>/dev/null || true
browserman --version
browserman setup
browserman doctor
Version requirement:
  • Use the latest BrowserMan CLI unless the user explicitly asks for an older version.
  • Require
    browserman
    version
    0.3.0
    or newer for this skill's script commands.
  • If
    browserman script actions
    ,
    browserman script describe
    , or
    browserman execution wait
    is missing, the installed CLI is stale. Upgrade before continuing:
bash
npm install -g browserman-cli@latest
hash -r 2>/dev/null || true
browserman --version
Fallback if BrowserMan CLI is not globally available:
bash
npx -y browserman-cli@latest setup
npx -y browserman-cli@latest doctor
If the user already has an approval code, the direct variation is:
bash
npx -y browserman-cli@latest setup --code <bm_agreq_...>
BrowserMan stores delegated local config at:
text
~/.browserman/config.json
Treat that file as the local source of truth for:
  • serverUrl
  • token
  • tokenType
  • browserId
  • browserIds
  • browserScopeMode
  • capabilities
安装此skill后,请在尝试使用BrowserMan执行实际任务前主动完成BrowserMan的设置。
命名规则:
  • npm包:
    browserman-cli
  • 安装后的可执行文件及文档中记录的命令:
    browserman
  • 一次性npx使用需指定包名及最新版本,例如
    npx -y browserman-cli@latest setup
推荐安装路径:
bash
npm install -g browserman-cli@latest
hash -r 2>/dev/null || true
browserman --version
browserman setup
browserman doctor
版本要求:
  • 除非用户明确要求使用旧版本,否则请使用最新版BrowserMan CLI。
  • 此skill的脚本命令要求
    browserman
    版本为
    0.3.0
    或更高。
  • 如果缺少
    browserman script actions
    browserman script describe
    browserman execution wait
    命令,说明已安装的CLI版本过时,请先升级:
bash
npm install -g browserman-cli@latest
hash -r 2>/dev/null || true
browserman --version
如果BrowserMan CLI未全局安装的备用方案:
bash
npx -y browserman-cli@latest setup
npx -y browserman-cli@latest doctor
如果用户已有批准码,可直接使用以下命令:
bash
npx -y browserman-cli@latest setup --code <bm_agreq_...>
BrowserMan将委托的本地配置存储在:
text
~/.browserman/config.json
请将该文件视为以下信息的本地可信来源:
  • serverUrl
  • token
  • tokenType
  • browserId
  • browserIds
  • browserScopeMode
  • capabilities

Preferred BrowserMan interface order

推荐的BrowserMan接口使用顺序

Use BrowserMan in this order:
  1. BrowserMan CLI
  2. Raw BrowserMan HTTP only if CLI is unavailable
Prefer commands like:
bash
browserman browser list --json
browserman browser current --json
browserman browser ping --json
browserman page open --url https://example.com --json
browserman page read --json
browserman page click --ref 12 --json
browserman page type --text "hello" --json
browserman page press --key Enter --json
browserman page screenshot --out ./page.png --json
browserman script list --json
browserman script actions --platform x --json
browserman script describe --platform x --action search --json
browserman script run --platform x --action search --text "browserman" --json
browserman execution wait <executionId> --json
If BrowserMan is only available through npx in the current environment, use the package name with
@latest
before the subcommand, for example
npx -y browserman-cli@latest setup
or
npx -y browserman-cli@latest script list --json
.
请按以下顺序使用BrowserMan:
  1. BrowserMan CLI
  2. 仅当CLI不可用时,才使用原生BrowserMan HTTP接口
优先使用以下命令:
bash
browserman browser list --json
browserman browser current --json
browserman browser ping --json
browserman page open --url https://example.com --json
browserman page read --json
browserman page click --ref 12 --json
browserman page type --text "hello" --json
browserman page press --key Enter --json
browserman page screenshot --out ./page.png --json
browserman script list --json
browserman script actions --platform x --json
browserman script describe --platform x --action search --json
browserman script run --platform x --action search --text "browserman" --json
browserman execution wait <executionId> --json
如果当前环境中只能通过npx使用BrowserMan,请在子命令前加上包名及
@latest
,例如
npx -y browserman-cli@latest setup
npx -y browserman-cli@latest script list --json

Capability-scoped tokens

按能力范围划分的令牌

Delegated tokens can be scoped by capability.
Important capabilities:
  • observe
    — browser listing, status, ping, execution reads, page inspection
  • commands
    — navigate, click, type, press, run_script, low-level browser control
  • browserManagement
    — browser creation, update, delete, and other management operations
When a BrowserMan call returns 403:
  • do not assume the token is invalid
  • first suspect missing capability or browser out of scope
  • ask the user to re-approve in BrowserMan if needed
委托令牌可按能力范围划分。
重要能力:
  • observe
    — 浏览器列表、状态、 ping、执行读取、页面检查
  • commands
    — 导航、点击、输入、按键、运行脚本、底层浏览器控制
  • browserManagement
    — 浏览器创建、更新、删除及其他管理操作
当BrowserMan调用返回403错误时:
  • 不要直接假设令牌无效
  • 首先怀疑缺少对应能力或浏览器不在权限范围内
  • 如有需要,请让用户在BrowserMan中重新批准权限

Required execution order

必需的执行顺序

Always follow this order.
请始终遵循以下顺序。

Step 0: Check the BrowserMan script catalog first

步骤0:先检查BrowserMan脚本目录

Before low-level browser control, discover scripts in small steps:
bash
browserman script list --json
browserman script actions --platform <platform-id> --json
browserman script describe --platform <platform-id> --action <action> --json
Use canonical platform ids such as
x
,
forem
,
amazon
,
taobao
,
zhihu
,
producthunt
, or
medium
. Do not use domains as platform ids. Domains such as
x.com
,
dev.to
, or
amazon.co.jp
are aliases or runtime targets, not the
--platform
value.
If a matching platform/action exists, prefer
browserman script run
.
在使用底层浏览器控制之前,请逐步查找脚本:
bash
browserman script list --json
browserman script actions --platform <platform-id> --json
browserman script describe --platform <platform-id> --action <action> --json
请使用标准平台ID,例如
x
forem
amazon
taobao
zhihu
producthunt
medium
。请勿使用域名作为平台ID。
x.com
dev.to
amazon.co.jp
等域名是别名或运行时目标,不是
--platform
参数的值。
如果存在匹配的平台/操作,请优先使用
browserman script run
命令。

Step 1: Confirm browser availability with ping

步骤1:通过ping确认浏览器可用性

Before real work, verify the chosen browser is reachable:
bash
browserman browser ping --json
If this returns offline or 503, the browser is not currently connected.
在执行实际任务之前,请验证所选浏览器是否可达:
bash
browserman browser ping --json
如果返回离线或503状态,说明当前浏览器未连接。

Step 2A: If a script matches, run it

步骤2A:如果有匹配脚本,运行它

Examples:
bash
browserman script run --platform x --action search --text "browserman" --json
browserman script run --platform forem --base-url https://dev.to --action get_feed --json
browserman script run --platform amazon --marketplace jp --action search --query "keyboard" --json
If
script run
returns an
executionId
, verify completion before reporting success:
bash
browserman execution wait <executionId> --json
示例:
bash
browserman script run --platform x --action search --text "browserman" --json
browserman script run --platform forem --base-url https://dev.to --action get_feed --json
browserman script run --platform amazon --marketplace jp --action search --query "keyboard" --json
如果
script run
命令返回
executionId
,请在报告成功前验证执行是否完成:
bash
browserman execution wait <executionId> --json

Step 2B: If no script matches, use low-level page commands

步骤2B:如果没有匹配脚本,使用底层页面命令

Recommended low-level sequence:
  1. browserman page open --url ... --json
  2. browserman page read --json
  3. browserman page click
    /
    browserman page type
    /
    browserman page press
  4. browserman page read --json
    again after page changes
  5. browserman page screenshot --out ./page.png --json
    or
    browserman page url --json
    to verify state
推荐的底层命令序列:
  1. browserman page open --url ... --json
  2. browserman page read --json
  3. browserman page click
    /
    browserman page type
    /
    browserman page press
  4. 页面变化后再次执行
    browserman page read --json
  5. 使用
    browserman page screenshot --out ./page.png --json
    browserman page url --json
    验证状态

Destructive-action checklist

破坏性操作检查清单

Before performing destructive or externally visible actions, confirm intent with the user.
Examples:
  • delete
  • purchase
  • submit
  • post
  • publish
  • send message
  • irreversible settings changes
Especially confirm before:
  • clicking destructive UI
  • running BrowserMan scripts that post, delete, or change account state
  • low-level form submission that causes side effects
在执行破坏性或对外可见的操作之前,请与用户确认意图。
示例操作:
  • 删除
  • 购买
  • 提交
  • 发布
  • 发送消息
  • 不可逆的设置更改
尤其需要在以下操作前确认:
  • 点击破坏性UI元素
  • 运行会发布、删除或更改账户状态的BrowserMan脚本
  • 会产生副作用的底层表单提交

What not to do

禁止操作

Do not:
  • ask the user for BrowserMan email/password in chat
  • tell the user to register through an API endpoint
  • tell the user to create a fallback key as the default onboarding path
  • assume every browser is in scope for the delegated token
  • assume every delegated token has
    commands
  • skip the script-catalog check
请勿:
  • 在聊天中向用户索要BrowserMan的邮箱/密码
  • 告知用户通过API端点注册
  • 将创建备用密钥作为默认的入门路径
  • 假设所有浏览器都在委托令牌的权限范围内
  • 假设所有委托令牌都拥有
    commands
    权限
  • 跳过脚本目录检查