High-performance Wayland GUI layout scanner for AI Agents
Project description
waywarp-scanner
High-performance, decoupled Wayland GUI layout scanner designed for AI Agents. It runs neural object detection and OCR locally to extract user interface controls (buttons, inputs, labels, text blocks) and exports logical coordinate JSON grids to downstream AI orchestrators (e.g. Gemini, Claude Code, Hermes).
By using waywarp-scanner, AI agents can bypass sending large raw screenshots to VLMs (Visual Language Models), saving over 98% of prompt tokens while securing 100% exact coordinates for mouse interaction.
Features
- 🧠 Dual Neural Inference: Combines YOLOv8 (widget detection) and Character Region Awareness for Text Detection CRAFT/EasyOCR (text localization and character recognition).
- 🧩 Geometry-Based Widget Merger: Automatically merges OCR text blocks into enclosed widget bounding boxes with ascending left-to-right (horizontal) sorting.
- 📐 Wayland Scale Factor Auto-detection: Automatically queries monitor scaling factors from the active Wayland compositor (
hyprctl,swaymsg, orwlr-randr) and converts raw pixel coordinates into logical units. - ⚡ Heterogeneous Hardware Acceleration: Auto-detects and binds to optimal compute backends, supporting Nvidia CUDA, Apple Silicon MPS (MacBook), and CPU fallbacks.
- 📦 Standardized CLI Contract: Outputs layout grids to
stdoutas GFM JSON and outputs all runtime errors strictly tostderrwith JSON schema envelopes.
Installation
1. Install CLI Tool via PyPI
Install the layout scanner package locally using uv (recommended) or pip:
uv pip install waywarp-scanner
# or
pip install waywarp-scanner
2. Install AI Agent Skill (Gemini / Claude Code / Hermes CLI)
To equip your developer agent CLI with this skill, install it instantly using the skills utility:
npx skills add https://github.com/Xuepoo/waywarp-skill
Quick Start
1. Download Visual Models
Download CRAFT and YOLOv8 weights to your XDG-compliant cache folder:
waywarp-scanner download-models
Weights are cached at $XDG_DATA_HOME/waywarp/models/ (falls back to ~/.local/share/waywarp/models/).
2. Scan Screen Layout
Run layout scanner to analyze the active screen:
waywarp-scanner scan
Output JSON Format Example:
{
"screen_width": 1920,
"screen_height": 1080,
"elements": [
{
"id": 0,
"type": "button",
"text": "Login",
"center": [100.0, 50.0],
"bbox": [80.0, 40.0, 40.0, 20.0],
"monitor_index": 0,
"confidence": 0.95
}
]
}
Use these center coordinates to execute pointer warps directly via waywarp:
waywarp --move-to 100.0 50.0 --click left
Development & Test
We use uv for local virtual environment and package management:
# Run test suite
uv run pytest
# Check code formatting & styles
uv run ruff check
uv run ruff format --check
# Check type safety
uv run mypy .
License
MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file waywarp_scanner-0.1.0.tar.gz.
File metadata
- Download URL: waywarp_scanner-0.1.0.tar.gz
- Upload date:
- Size: 16.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c676e7671472dfd579791fad5ad66b06134d84da8b7333916e747acd75709592
|
|
| MD5 |
66fe1c85ea8b943c3d3ac263c2367d52
|
|
| BLAKE2b-256 |
ebdca632096ec2df8f34538d9221a4693b2d47bf98fb31aa9e08d304dd5bbfde
|
Provenance
The following attestation bundles were made for waywarp_scanner-0.1.0.tar.gz:
Publisher:
release.yml on Xuepoo/waywarp-scanner
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
waywarp_scanner-0.1.0.tar.gz -
Subject digest:
c676e7671472dfd579791fad5ad66b06134d84da8b7333916e747acd75709592 - Sigstore transparency entry: 1694990761
- Sigstore integration time:
-
Permalink:
Xuepoo/waywarp-scanner@1eb426ef364c6c28203e0ba48af438548a1af0e1 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Xuepoo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1eb426ef364c6c28203e0ba48af438548a1af0e1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file waywarp_scanner-0.1.0-py3-none-any.whl.
File metadata
- Download URL: waywarp_scanner-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
215a5eef8e4910df3f994f41ec68599d1025fd1369442a1b98fc9ab44c31fbff
|
|
| MD5 |
3c364a3b2deb20ed9a35fad8c51e2d07
|
|
| BLAKE2b-256 |
ebe7908497e40b2cab4f50dacf6efdc6035c9947f8661b4b1b150216e02b83e4
|
Provenance
The following attestation bundles were made for waywarp_scanner-0.1.0-py3-none-any.whl:
Publisher:
release.yml on Xuepoo/waywarp-scanner
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
waywarp_scanner-0.1.0-py3-none-any.whl -
Subject digest:
215a5eef8e4910df3f994f41ec68599d1025fd1369442a1b98fc9ab44c31fbff - Sigstore transparency entry: 1694991098
- Sigstore integration time:
-
Permalink:
Xuepoo/waywarp-scanner@1eb426ef364c6c28203e0ba48af438548a1af0e1 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Xuepoo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1eb426ef364c6c28203e0ba48af438548a1af0e1 -
Trigger Event:
push
-
Statement type: