NEW v0.16.0 · Daemon 模式 + 录制回放升级

浏览器自动化
从未如此简洁

面向 AI Agent 工作流的命令行工具。35+ 命令 · 70+ 插件 · 录制回放 · CDP 直连
Playwright / Puppeteer / Selenium 的命令行替代品。

🚀 立即安装 📖 查看文档 ⭐ GitHub
$ npm install -g @xbrowser/cli
35+
浏览器命令
70+
站点插件
100%
TypeScript
MIT
开源协议
DEMO

一行命令,搞定复杂流程

命令链 · 管道 · 录制回放 · Heredoc 批量执行 —— 不写代码也能自动化

xbrowser · bash
# ① 命令链: 一行完成导航 → 等待 → 提取文本
$ xbrowser "goto https://news.ycombinator.com && wait .athing && text --selector .titleline"

1. Show HN: A new approach to building compilers
2. Why I'm leaving big tech to start my own company
3. The hidden cost of microservices
...

# ② 搜索引擎自动化: 自动降级 Google → Bing → Baidu
$ xbrowser search "playwright alternative 2026" --engine google --limit 5 --json

[
  { "title": "xbrowser: the CLI alternative to Playwright", "url": "..." },
  ...
]

# ③ 录制浏览器操作 → 转换为 JS / Python / Bash 脚本
$ xbrowser record --output workflow.yaml
✓ Recording started. Press Ctrl+C to stop.

$ xbrowser convert workflow.yaml --to js
✓ Generated: workflow.js (3 actions, 4 assertions)

# ④ Heredoc 批量执行
$ xbrowser <<EOF
goto https://github.com/dyyz1993/xbrowser
text --selector ".repo-title"
screenshot --output "stars.png"
EOF

✓ Done in 3.2s
FEATURES

为 AI Agent 工作流而生

不只是一个 CLI,而是一个完整的浏览器自动化生态

命令链 & 管道

支持 && + -> || ; 五种链式语法,以及 stdin 管道与 heredoc 批量执行。

🎬

录制 / 回放

录制浏览器操作为 YAML,可一键转换为 JS / Python / Bash 脚本,完美适配 CI/CD。

🔌

插件市场

70+ 站点插件(Twitter、抖音、知乎、DeepSeek 等),基于自研 @xcli/core 框架。

🔗

CDP 直连

连接已运行的 Chrome,无需重新启动。支持多会话并行,独立上下文。

🤖

AI Agent 友好

JSON 输出模式、可预测的退出码、低噪声日志,完美适配 LLM 调用。

🚀

Daemon 模式

后台常驻,首次启动后秒级响应。适合高频调用场景。

USE CASES

4 大典型场景

从数据采集到 AI 工作流,xbrowser 都能胜任

🕷️

数据采集 & 爬虫

任意页面一键转 Markdown / JSON,智能提取正文,自动处理 SPA 路由。

$ xbrowser scrape https://example.com --mode smart --output markdown
🔍

搜索引擎自动化

Google / Bing / Baidu / DuckDuckGo 一键搜索,自动降级,支持时间过滤。

$ xbrowser search "AI news" --engine bing --time-filter month
🤖

AI Agent 工具链

为 LLM Agent 提供浏览器操作能力,JSON 输出 + 低延迟,适合工具调用。

$ xbrowser "goto example.com && extract --json"
📢

SEO & 内容分发

自动发布文章到 13+ SEO 平台(掘金、Dev.to、CSDN、知乎等),一键分发。

$ xbrowser publish --platform devto,juejin --file article.md
COMPARISON

xbrowser vs 主流方案

为什么选择 xbrowser 而不是 Playwright / Puppeteer / Selenium?

能力 xbrowser Playwright Puppeteer Selenium
零代码上手 ✓ 命令行 ✗ 需写脚本 ✗ 需写脚本 ✗ 需写脚本
命令链 / 管道 ✓ 原生支持
录制 → 多语言转换 ✓ JS / Python / Bash 仅 Codegen (JS) 仅 IDE 录制
插件市场 ✓ 70+ 站点插件
Daemon 模式 ✓ 秒级响应
AI Agent 友好 ✓ JSON 输出 部分 部分
包大小 ~2MB ~50MB ~30MB ~80MB
PLUGINS

70+ 站点插件

覆盖主流社交媒体、搜索引擎、电商、AI 平台,持续扩展中

Twitter 抖音 小红书 知乎 B 站 微博 Facebook Instagram YouTube LinkedIn Reddit GitHub Stack Overflow 掘金 CSDN 知乎 小红书 淘宝 京东 拼多多 大众点评 飞书 钉钉 企业微信 Notion Figma DeepSeek ChatGPT Claude 通义千问 文心一言 汽车之家 懂车帝 易车 东方财富 雪球 同花顺 + 36 more

准备好开始了吗?

30 秒安装,5 分钟跑通第一个自动化脚本