Skip to main content

高效查询和分析 cursor-ide-browser 生成的快照日志文件

Project description

snapshot-query

高效查询和分析 cursor-ide-browser 生成的快照日志文件。

安装

使用 uvx(推荐)

从本地项目运行

# 在项目目录下运行
uvx --from . snapshot-query <文件路径> <命令> [参数]

从 PyPI 运行(发布后):

# 直接运行,无需安装
uvx snapshot-query <文件路径> <命令> [参数]

使用 pip

pip install snapshot-query

快速开始

使用 uvx(从本地项目)

# 查找包含"搜索"的元素
uvx --from . snapshot-query snapshot.log find-name "搜索"

# 查找所有按钮
uvx --from . snapshot-query snapshot.log find-role button

# 列出所有可交互元素
uvx --from . snapshot-query snapshot.log interactive

# 统计元素数量
uvx --from . snapshot-query snapshot.log count

使用 Python 模块

python -m snapshot_query snapshot.log find-name "搜索"

使用原始脚本

python query_snapshot.py snapshot.log find-name "搜索"

命令列表

  • find-name <文本> - 根据名称查找元素(模糊匹配)
  • find-name-exact <文本> - 根据名称查找元素(精确匹配)
  • find-role <角色> - 根据角色查找元素
  • find-ref <ref> - 根据引用标识符查找元素
  • find-text <文本> - 查找包含指定文本的元素
  • find-grep <模式> [字段] - 使用正则表达式查找元素(支持 grep 语法)
  • find-selector <选择器> - 使用 CSS/jQuery 选择器语法查找元素
  • interactive - 列出所有可交互元素
  • count - 统计各类型元素数量
  • path <ref> - 显示元素在树中的路径
  • all-refs - 列出所有引用标识符

MCP 服务器接口

snapshot-query 提供 MCP (Model Context Protocol) 服务器接口,允许 AI 助手通过标准化协议查询快照文件。

启动 MCP 服务器:

snapshot-query-mcp

配置客户端: 在 MCP 配置文件中添加:

{
  "mcpServers": {
    "snapshot-query": {
      "command": "snapshot-query-mcp"
    }
  }
}

详细说明请查看 MCP_README.md

更多信息

详细文档请查看:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

snapshot_query-0.1.0.tar.gz (78.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

snapshot_query-0.1.0-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

Details for the file snapshot_query-0.1.0.tar.gz.

File metadata

  • Download URL: snapshot_query-0.1.0.tar.gz
  • Upload date:
  • Size: 78.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for snapshot_query-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e70405a376b7d119db9a0ab13d54e68193c3bbb8e26a5558db4fb5ed8d681f5d
MD5 cb934af246fb145ac7edf8fd404ea5ab
BLAKE2b-256 33555ac5d7006712f5f2f9672477b28281888db0a97dbc0d0e6c7f5502ab58b6

See more details on using hashes here.

File details

Details for the file snapshot_query-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: snapshot_query-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for snapshot_query-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bae0b3bfb2c66044c3d6ead664a015917deb52dc58064f257bb66e0f87b11659
MD5 72356159b13980e9f5baffa7f9f041c9
BLAKE2b-256 89ccdd2c5e1d1376355ad4df274e93db4c9767e8e1cf5c94aefddd734222aa76

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page