梅耶荷德
 
进步的读者 剧作家MCP 快照JSON文件。
解析JSON输出 browser_snapshot 包裹工具 剧作家的MCP格式的可访问性树快照。
特性
- 摘要视图 -页面URL、标题、选项卡、错误、元素计数和可点击元素的快速概述
- 内容预览 -标题、文本、按钮、链接和输入的DOM有序视图
- 可点击元素 -列出禁用筛选的交互式元素
- 断面提取 -查看选项卡、错误、页面状态或可访问性树
- 元素列表 -按类型列出按钮、链接、输入、标题、图像
- 树导航 -探索具有深度控制的DOM结构
- 搜索 -通过文本模式或正则表达式查找元素
- 多种输出格式 -文本、表格或JSON
安装
# From crates.io
cargo install meyerhold
# From source
git clone https://github.com/yonaka15/meyerhold.git
cd meyerhold
cargo install --path .用法
# Summary view (default)
meyerhold snapshot.json
# List clickable elements (excludes disabled)
meyerhold snapshot.json --list clickable
# Show specific sections
meyerhold snapshot.json --section tabs
meyerhold snapshot.json --section errors
meyerhold snapshot.json --section tree
meyerhold snapshot.json --section page
# Tree navigation
meyerhold snapshot.json --depth 2 # Top 2 levels
meyerhold snapshot.json --depth 3 --from e407 # From specific ref
# Element listing
meyerhold snapshot.json --list buttons
meyerhold snapshot.json --list links
meyerhold snapshot.json --list inputs
meyerhold snapshot.json --list all # All interactive elements
# Search
meyerhold snapshot.json --search "Sign in"
meyerhold snapshot.json --search "button.*submit" --regex
# Output formats
meyerhold snapshot.json --list clickable --format table
meyerhold snapshot.json --list buttons --format json输出示例
=== Snapshot Summary ===
Page URL: https://example.com/
Page Title: Example Domain
Tabs: 1
Errors: 0
Elements: 150
Clickable: 42 (3 disabled excluded)
--- Content (DOM order) ---
# Welcome to Example
This is an example page.
[e12] button: Sign In
[e15] link: Learn More
[e23] input: Email address
... (truncated)
Next: --list clickable (show interactive elements)
--section for details
--search "pattern" to find specific content可点击元素
这 --list clickable 选项显示所有可以单击的交互元素:
- 按钮
- 链接
- 文本框、复选框、单选框、组合框、搜索框
- 标签
元素与 [disabled] 属性被自动排除。
发展
# Build
cargo build
# Run tests
cargo test
# Run with debug output
cargo run -- snapshot.json许可证
麻省理工学院
