| name | gui-automation |
| description | Desktop GUI automation using reyes. Use when the user needs to control the mouse, send keyboard input, take screenshots, or execute GUI automation commands. Triggers include requests to "click at coordinates", "type text", "take a screenshot", "move the mouse", "drag and drop", "press a key", "automate desktop actions", or any task requiring programmatic GUI interaction. |
| allowed-tools | Bash(reyes) |
SKILL.md
Reyes - Rust Computer Use Automation
A comprehensive computer-use CLI built on rustautogui that gives AI vision and control over your computer. This tool provides the "eyes" and "limbs" for AI agents to interact with the desktop environment.
Overview
Reyes is a Rust-based CLI that wraps the rustautogui library, providing AI agents with the ability to:
- See the screen (screenshots, pixel colors)
- Control the mouse (click, move, drag, scroll)
- Control the keyboard (type text, press keys, hotkeys)
- Find and interact with UI elements (image recognition, template matching)
- Get system information (screen size, mouse position)
All commands return JSON-formatted results for easy parsing by AI systems.
Installation
NPM
npm install -g reyes-cli
Cargo
cargo install reyes
From Source
git clone https://github.com/Blankeos/reyes.git
cd reyes
cargo install --path .
System Dependencies
Linux:
sudo apt-get update
sudo apt-get install libx11-dev libxtst-dev
macOS:
Grant necessary accessibility permissions in System Settings.
Windows:
No additional dependencies required.
Commands Reference
Screenshot
Capture the screen and save to file.
reyes screenshot
reyes screenshot --output my_screenshot.png
reyes screenshot --output region.png --region "100,100,400,300"
reyes screenshot --base64
Mouse Control
Click Operations
reyes click --x 100 --y 200
reyes click --x 100 --y 200 --button right
reyes click --x 100 --y 200 --clicks 2 --duration 0.5
reyes double-click --x 100 --y 200 --duration 0.5
reyes mouse-down --button left
reyes mouse-up --button left
Mouse Movement
reyes move-mouse --x 500 --y 300 --duration 0.5
reyes move-mouse-rel --x 100 --y -50 --duration 0.5
reyes get-mouse-position
reyes print-mouse-position --count 10 --interval 0.5
Drag and Scroll
reyes drag-mouse --x 800 --y 600 --duration 1.0
reyes scroll --amount 500
reyes scroll --amount -500 --x 500 --y 300
Keyboard Control
reyes type-text --text "Hello World"
reyes type-text --text "Hello World" --interval 0.1
reyes press-key --key enter
reyes press-key --key esc
reyes hotkey --keys "ctrl,c"
reyes hotkey --keys "ctrl,shift,esc"
reyes key-down --key shift
reyes key-up --key shift
Keyboard Shortcuts
reyes shortcut --name copy
reyes shortcut --name paste
reyes shortcut --name cut
reyes shortcut --name select-all
reyes shortcut --name undo
reyes shortcut --name redo
reyes shortcut --name save
Color Operations
reyes get-pixel-color --x 100 --y 200
reyes find-color --rgb "255,255,255"
reyes find-color --rgb "255,255,255" --tolerance 10
reyes find-color --rgb "255,0,0" --region "0,0,800,600"
Image Recognition
Reyes uses rustautogui's template matching algorithms to find images on screen.
reyes locate-on-screen --image button.png --confidence 0.9
reyes locate-on-screen --image button.png --region "0,0,800,600" --confidence 0.9
reyes locate-all-on-screen --image icon.png --confidence 0.9
reyes wait-for-image --image loading.png --timeout 10 --confidence 0.9
reyes wait-for-image-to-vanish --image loading.png --timeout 30 --confidence 0.9
reyes click-on-image --image submit.png --confidence 0.9 --duration 0.5
reyes locate-on-screen --image button.png --mode segmented --confidence 0.9
reyes locate-on-screen --image button.png --mode fft --confidence 0.9
Template Management
Store templates in memory for repeated use (faster than loading from disk each time).
reyes store-template --image button.png --alias "submit_button" --mode segmented
reyes find-stored-template --alias "submit_button" --confidence 0.9
Screen Information
reyes get-screen-size
reyes sleep --seconds 2
Response Format
All commands return JSON responses:
Success Response
{
"success": true,
"message": "Operation completed"
}
Position Response
{
"x": 500,
"y": 300
}
Size Response
{
"width": 1920,
"height": 1080
}
Color Response
{
"rgb": [255, 255, 255],
"hex": "#ffffff"
}
Image Match Response
{
"found": true,
"locations": [
[100, 200, 0.95],
[150, 250, 0.92]
]
}
Automation Examples
Login Flow
reyes screenshot --output login_start.png
reyes click --x 500 --y 300
reyes type-text --text "myusername"
reyes press-key --key tab
reyes type-text --text "mypassword"
reyes click --x 500 --y 400
reyes sleep --seconds 3
reyes screenshot --output login_end.png
Image-Based Interaction
result=$(reyes locate-on-screen --image submit_button.png --confidence 0.9)
reyes click-on-image --image submit_button.png --confidence 0.9 --duration 0.5
Form Automation
reyes click --x 100 --y 100
reyes type-text --text "John Doe"
reyes press-key --key tab
reyes type-text --text "john@example.com"
reyes press-key --key tab
reyes type-text --text "Hello, this is a test message"
reyes shortcut --name submit
Drag and Drop
reyes move-mouse --x 100 --y 100 --duration 0.5
reyes mouse-down --button left
reyes move-mouse --x 400 --y 400 --duration 1.0
reyes mouse-up --button left
reyes drag-mouse --x 400 --y 400 --duration 1.0
Best Practices
1. Use Animation
Always include --duration parameter for mouse movements to make actions look natural and give UI time to respond.
2. Wait for Elements
Use wait-for-image instead of sleep when possible to make scripts more robust.
3. Confidence Levels
- Use 0.9+ for precise matching
- Use 0.8-0.85 for fuzzy matching
- Test different values for your specific images
4. Match Mode Selection
- Segmented: Faster for small templates, less visually complex images
- FFT: Better for large templates, when template approaches region size
5. Region Optimization
Specify search regions to speed up image recognition:
reyes locate-on-screen --image button.png --region "0,0,500,500"
6. Template Storage
For repeated searches, store templates:
reyes store-template --image button.png --alias "my_button"
Important Notes
- macOS Retina: Screenshots are automatically handled for Retina displays
- Linux: Only X11 is supported (not Wayland)
- Multi-monitor: Windows/macOS searches main monitor only; Linux searches all monitors
- Permissions: macOS requires accessibility permissions; Linux may need additional setup
AI Agent Integration
Reyes is designed for AI agents. Key features:
- JSON Output: All commands return parseable JSON
- Exit Codes: Non-zero on error for shell integration
- Coordinate System: (0,0) is top-left, positive X right, positive Y down
- Image Recognition: Provides computer "vision" for UI element detection
- Atomic Operations: Each command is independent and atomic
Keyboard Keys Reference
Common keys for press-key and hotkey commands:
- Letters:
a, b, c, ...
- Numbers:
1, 2, 3, ...
- Function:
f1, f2, ... f12
- Navigation:
up, down, left, right, home, end, pageup, pagedown
- Editing:
enter, return, tab, backspace, delete, esc, space
- Modifiers:
ctrl, alt, shift, command (macOS), win (Windows)
Troubleshooting
"Permission denied" on macOS
Grant accessibility permissions in System Preferences > Security & Privacy > Accessibility
Image not found
- Increase confidence threshold (try 0.8)
- Check if image is on screen
- Try different match mode
- Verify image format (PNG recommended)
Slow performance
- Use segmented match mode
- Specify smaller search regions
- Store templates for reuse
- Use lower confidence if acceptable
Keyboard not working
- Check keyboard layout (US layout recommended)
- Verify key names match supported keys
- Some keys may not work on all platforms
License
MIT License - See LICENSE file for details.