SuperAPI AI 工具集

chrome-devtools-cli

测试与质量

查看项目

更新于 10-15 21:55

技能介绍

用途:chrome-devtools-cli 是 chrome-devtools-mcp 的命令行接口,用于在终端通过 shell 脚本或命令自动化浏览器任务。首次使用需参考 references/installation.md 完成一次性安装;日常使用无需在每次执行前运行 start/status/stop,后台服务会自动启动。

主要能力:命令格式为 chrome-devtools <tool> [arguments] [flags],输出默认 Markdown,可用 --output-format=json 改为 JSON,任意命令可用 --help。输入自动化基于快照获取元素 uid,支持 click、drag、fill、hover、press_key、type_text、upload_file、handle_dialog 等;导航支持 list_pages、new_page、navigate_page、select_page、close_page;另可 emulate、resize_page 模拟网络、CPU、地理位置、视口与用户代理。性能方面提供 performance_start_trace、performance_stop_trace、performance_analyze_insight、take_memory_snapshot;网络方面有 list_network_requests、get_network_request;调试检查包括 evaluate_script、list_console_messages、get_console_message、lighthouse_audit、take_screenshot、take_snapshot;扩展方面支持 list_extensions、install_extension、uninstall_extension、reload_extension、trigger_extension_action;服务管理提供 start、status、stop。

使用方式:先 take_snapshot 取得元素 uid,再用 click、fill 等操作元素,状态在命令之间保持。执行如 chrome-devtools list_pages 直接调用工具即可。

实验功能:默认禁用,需在启动时添加对应标志才能使用,如 click_at 需 --experimentalVision=true,screencast_start 需 --experimentalScreencast=true 并依赖 ffmpeg,list_webmcp_tools 需 --categoryExperimentalWebmcp=true。

限制:具体安装步骤、依赖与兼容平台以 references/installation.md 为准,资料未提供收费、价格等信息。实验功能默认关闭。