🛍️ 更多精选好物 ›
📊 公开数据一览
| 📦 榜单安装量 | 5.1K |
| ⭐ GitHub Stars | 39,728(fork 2599) |
| 🗓️ 最近推送 | 2026-08-02 |
| 🌱 项目创建 | 2026-01-11 |
| 💻 语言 / License | Rust · Apache-2.0 |
| 🐛 开放Issue | 627 |
📝 工具简介
面向AI代理的浏览器自动化CLI工具,支持命令行操控浏览器。
📖 怎么用
推荐全局装,跑 `npm install -g agent-browser`,然后执行 `agent-browser install` 下载 Chrome(仅首次)。想锁版本就项目里装:`npm install agent-browser` 再 `agent-browser install`。macOS 用户可 `brew install agent-browser` 后同样跑 install;有 Rust 环境就 `cargo install agent-browser`。源码装要 Node.js 24+、pnpm 11+ 和 Rust,克隆后依次跑 `pnpm install`、`pnpm build`、`pnpm build:native`、`pnpm link --global`。Linux 记得先装系统依赖,装完直接用命令行操作浏览器。
📋 迷你测评
面向AI代理的浏览器自动化CLI,支持命令行操控浏览器。亮点是纯命令行操作,脚本化控制很直接。适合需要批量或自动化网页任务的场景。
⚠️ 避坑记录
「Bug: \"System cannot find the path specified\" error during install on Windows」Windows系统下安装或运行时报路径错误,即使以管理员身份执行仍失败。
「0.8.3: --state/--profile cause 'Daemon failed to start' on macOS arm64」macOS arm64上使用状态或配置文件参数时守护进程无法启动,且环境变量设置无效。
💡 Windows用户安装前请检查路径权限;macOS arm64用户若需使用状态功能,建议暂时回退到0.8.2版本。
「Bug: "System cannot find the path specified" error during install on Windows」Windows用户安装时直接报路径错误,管理员权限也无法解决。
「0.8.3: --state/--profile cause 'Daemon failed to start' on macOS arm64」在macOS arm64上使用状态或配置文件参数会导致守护进程启动失败,且环境变量设置无效。
💡 Windows用户安装失败时,可先检查是否缺少系统路径配置;macOS arm64用户暂时避免使用--state/--profile参数,等待官方修复0.8.3版本问题。
📄 README 要点
这是一个给AI代理用的浏览器自动化命令行工具,底层用Rust写的,跑起来飞快。安装方式很灵活,可以全局装原生二进制,也可以作为项目依赖装进package.json里用,macOS用户还能用Homebrew装,或者用Cargo从源码编译。在Linux上需要先装一些系统依赖库。升级也方便,工具会自动检测你当初是用npm、Homebrew还是Cargo装的,然后执行对应的更新命令。首次使用前要跑一下安装命令来下载Chrome浏览器。适合那些需要让AI代理自动操作浏览器的场景,比如自动化测试、网页数据抓取之类的活儿。
查看英文原文
agent browser Browser automation CLI for AI agents. Fast native Rust CLI. Installation Global Installation (recommended) Installs the native Rust binary: [安装/使用命令见下方] Project Installation (local dependency) For projects that want to pin the version in package.json : [安装/使用命令见下方] Then use via package.json scripts or by invoking agent browser directly. Homebrew (macOS) [安装/使用命令见下方] Cargo (Rust) [安装/使用命令见下方] From Source Requires Node.js 24+, pnpm 11+, and Rust. [安装/使用命令见下方] Linux Dependencies On Linux, install system dependencies: [安装/使用命令见下方] This exits nonzero if the package manager cannot install every required browser library. Updating Upgrade to the latest version: [安装/使用命令见下方] Detects your installation method (npm, Homebrew, or Cargo) and runs the appropriate update command automatically. Requirements Chrome Run agent browser install to download Chrome from Chrome for Testing (Google's official automation channel). Existing Chrome, Brave, Playwright, and Puppeteer installations are detected automatically. No Playwright or Node.js required for the daemon. Node.js 24+ and pnpm 11+ Only needed when building from source. Rust Only needed when building from source (see From Source above). Quick Start [安装/使用命令见下方] Clicks fail early when another element covers the target's click point, for example a consent banner or modal. Dismiss or interact with the reported covering element, then take a fresh snapshot before retrying the original ref. Headless Chromium screenshots hide native scrollbars for consistent image output. Pass hide scrollbars false when launching to keep native scrollbars visible. Traditional Selectors (also supported) [安装/使用命令见下方] Commands Core Commands [安装/使用命令见下方] Get Info [安装/使用命令见下方] Read Agent Friendly Text [安装/使用命令见下方] read fetches a URL without launching Chrome. Omit the URL to read the rendered DOM of the active tab in the current browser session, including browser auth state and client side updates. Explicit URL reads send Accept: text/markdown b
💬 评论(0)
交流使用体验、避坑建议;违规内容将被删除