Skip to content
This repository was archived by the owner on Apr 25, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ browser-cli close <session-id> [--json]
browser-cli close --all [--json]
browser-cli --version

browser-cli page <session-id> [-p <page>] [--next] [--prev] [--fresh] [--json] [--verbose]
browser-cli page <session-id> [-p <page>] [--next] [--prev] [--all] [--settle <ms>] [--fresh] [--json] [--verbose]
browser-cli click <session-id> <element-id|number|query> [-p <page>] [--new-session] [--fresh] [--quiet] [--json]
browser-cli type <session-id> <element-id|number|query> <text> [-p <page>] [--fresh] [--quiet] [--json]
browser-cli search <session-id> <query> [--fresh] [--json] [--verbose]
Expand Down Expand Up @@ -188,11 +188,14 @@ browser-cli teardown [--browser chrome|firefox]
- `t1`, `t2`, ... are IDs for truncated text blocks, readable with `text`; both `t1` and `1` are accepted
- `b1`, `b2`, ... are IDs for paginated list/table blocks, readable with `block`; both `b1` and `1` are accepted
- `--next` / `--prev` paginate relative to the current scroll position
- `--all` auto-scrolls through every logical page, waits for lazy content to render, and aggregates the result into one reading view; the output is always `current=1 total=1`
- `--settle <ms>` only applies to `page --all` and controls the fixed delay after each scroll; defaults to `500`
- `--fresh` bypasses the Relay cache and fetches a fresh browser snapshot
- `--version` prints the version injected at build time, or `unknown` if not set
- `open` returns the page structure by default; use `--quiet` for session info only, `--wait 0` to skip the post-open stability wait
- `open` / `close` / `list` / `search` / `wait` / `plugin` / `view` all support `--json`
- `page` / `search` / `block` / `view` support `--verbose`; this mainly matters for JSON mode, where the default `--json` output is compact and `--verbose` returns full detail
- `page --all` is optimized for full-page reading; if you need to click or type afterwards, run a normal `page` / `page -p N` again to get current actionable IDs
- The `<target>` for `click` / `type` accepts a prefixed ID (`e1`), a bare number (`1` maps to `e1`), or a text query matching button text, link text, or input placeholder/value
- `click` / `type` output the updated full page XML by default; use `--quiet` for a success summary, `--json` for a structured response
- `wait` returns the latest page on success; use `--quiet` in automation pipelines when you only need the success/timeout result
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ browser-cli close <session-id> [--json]
browser-cli close --all [--json]
browser-cli --version

browser-cli page <session-id> [-p <页码>] [--next] [--prev] [--fresh] [--json] [--verbose]
browser-cli page <session-id> [-p <页码>] [--next] [--prev] [--all] [--settle <毫秒>] [--fresh] [--json] [--verbose]
browser-cli click <session-id> <目标> [-p <页码>] [--new-session] [--fresh] [--quiet] [--json]
browser-cli type <session-id> <目标> <文本> [-p <页码>] [--fresh] [--quiet] [--json]
browser-cli search <session-id> <关键词> [--fresh] [--json] [--verbose]
Expand Down Expand Up @@ -188,11 +188,14 @@ browser-cli teardown [--browser chrome|firefox]
- `t1`, `t2`, ... — 被截断的长文本 ID,用 `text` 命令查看完整内容;参数支持 `t1` 或 `1`
- `b1`, `b2`, ... — 被分页的长 `list` / `table` 块 ID,用 `block` 命令继续查看后续分页;参数支持 `b1` 或 `1`
- `--next` / `--prev` 按当前滚动位置相对翻页
- `--all` 会按逻辑页自动滚动、等待懒加载渲染并聚合成单页阅读视图;输出固定为 `current=1 total=1`
- `--settle <毫秒>` 仅配合 `page --all` 使用,控制每次滚动后的固定等待时间,默认 `500`
- `--fresh` 跳过缓存,强制从浏览器获取最新快照
- `--version` 显示构建时注入的版本号;若未注入则显示 `unknown`
- `open` 默认会在创建会话后直接输出当前页;用 `--quiet` 只看会话信息,用 `--wait 0` 可跳过打开后的稳定等待
- `open` / `close` / `list` / `search` / `wait` / `plugin` / `view` 全部支持 `--json`
- `page` / `search` / `block` / `view` 支持 `--verbose`:主要用于拿完整 JSON 细节;不带时,`--json` 默认返回更紧凑的数据
- `page --all` 更偏全量阅读视图,方便 AI/用户一次拿完整内容;如果后续要点击或输入,建议回到普通 `page` / `page -p N` 重新获取当前页元素 ID
- `click` / `type` 的 `<目标>` 既可以是带前缀 ID(如 `e1`)、数字 ID(如 `1` 对应 `e1`),也可以是当前页交互元素的文本查询;查询会匹配按钮文本、链接文本、输入框 placeholder/value 等
- `click` / `type` 默认会输出更新后的整页 XML;可用 `--quiet` 只看成功结果,用 `--json` 获取结构化摘要
- `wait` 默认等待页面稳定并返回最新页面;`--for <文本>` 会轮询最新快照,直到页面里出现匹配该文本的元素
Expand Down
4 changes: 4 additions & 0 deletions SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ description: "Drives a real browser session via browser-cli: open stateful sessi
- Prefer `--json` when another tool or agent will consume the result.
- Use `--verbose` with `page`, `search`, `block`, or `view` when you need full JSON detail instead of the default compact form.
- Use `--fresh` when the cache may be stale or the page is highly dynamic.
- Use `page --all` when you need a full reading pass over a long or lazy-loaded page; add `--settle <ms>` if the site needs more time after each auto-scroll.
- `open`, `click`, `type`, and `wait` return the current page by default; use `--quiet` when you only need a compact success result.
- Use `click --new-session` only for link elements with `href`. It opens the destination in a new session and keeps the source session unchanged.

Expand Down Expand Up @@ -94,6 +95,8 @@ browser-cli page s123
browser-cli page s123 -p 2
browser-cli page s123 --next
browser-cli page s123 --prev
browser-cli page s123 --all
browser-cli page s123 --all --settle 1000 --json
browser-cli page s123 --fresh
```

Expand Down Expand Up @@ -175,6 +178,7 @@ browser-cli type s123 3 "hello world" --quiet
- Long text may be truncated in-page and assigned `t1`, `t2`, etc.; `text` accepts either `t1` or `1`.
- Large lists or tables may be exposed as block IDs `b1`, `b2`, etc.; `block` accepts either `b1` or `1`.
- Pagination is viewport-based. `page -p N` reads a logical page slice without scrolling the browser manually.
- `page --all` auto-scrolls and merges all logical pages into a single reading-oriented result. Refresh with a normal `page` before acting on IDs from a live page.

## Plugin usage

Expand Down
Loading