rs_peekaboo
Rust-native cross-platform computer-use CLI and library for macOS, Windows, and Linux.
rs_peekaboo focuses on capture, UI inspection, input, app/window/menu control,
clipboard, permissions, scripts, and structured JSON output. It intentionally
does not include model providers, hosted API keys, telemetry, or an assistant UI.
Install
From crates.io after release:
From source:
CLI
Global flags:
| Flag | Description |
|---|---|
--json |
Print structured JSON instead of human output. |
--json-output |
Alias for --json. |
--background |
Prefer AX/background actions that avoid focus steal. |
--mode |
Computer-use backend: hybrid (default macOS), native, vision, legacy, coords. |
Commands:
| Command | Purpose |
|---|---|
see |
Capture an image and cache a UI snapshot. |
image |
Capture a screen or focused window image. |
list apps |
List running apps/processes. |
list windows |
Return app/window accessibility context. |
list screens |
Return display information. |
list menubar |
Inspect the system menu bar. |
list permissions |
Probe screen recording, accessibility, and clipboard access. |
click |
Click a coordinate or UI element query. |
type |
Type text into the active UI. |
press |
Press a named key. |
hotkey |
Press a key combination such as cmd,l. |
paste |
Paste text while restoring the previous clipboard where possible. |
scroll |
Scroll up, down, left, or right. |
swipe |
Swipe between two coordinates. |
drag |
Drag between two coordinates. |
move |
Move the pointer to a coordinate or UI element query. |
set-value |
Set the value of a resolved UI element. |
perform-action |
Perform an accessibility action on a resolved UI element. |
window |
List, focus, close, minimize, move, resize, or set window bounds. |
app |
List, launch, switch, quit, hide, or unhide apps. |
open |
Open a path or URL, optionally with a specific app. |
menu |
List or click menu items. |
clipboard |
Read or write the clipboard. |
permissions |
Probe automation permissions. |
shell |
Run a shell command and return stdout, stderr, and exit status. |
run |
Execute a JSON automation script. |
sleep |
Sleep for a number of seconds. |
clean |
Remove cached snapshots. |
doctor |
Health report: permissions, tools, capabilities. |
mcp |
Speak MCP over stdio for agent harnesses. |
tools |
Print the command catalog. |
completions |
Generate shell completions. |
JSON Output
Click by stable snapshot index:
Library
use Target;
use ;
The v0.2.4 source shapes and method signatures are available through a namespaced compatibility facade. Migrating a v0.2.4 caller requires changing its imports; the current root API remains unchanged.
use ;
use ;
Scripts
run accepts a JSON file with ordered steps:
Shell steps are also supported:
Permissions
Most actions require macOS Accessibility permission for the terminal or host app
running rs-peekaboo. Screen capture requires Screen Recording permission.
Clipboard commands require clipboard access in the current user session.
Probe status:
Platform
| Platform | Capture | Input | UI snapshot | Notes |
|---|---|---|---|---|
| macOS | screencapture |
Accessibility / CoreGraphics | AppleScript | Full parity |
| Windows | GDI+ screenshot | SendInput + SendKeys |
UI Automation | PowerShell backend |
| Linux | grim / scrot / ImageMagick |
xdotool |
wmctrl |
X11-focused; Wayland uses grim + wl-clipboard where available |
Shell execution is cross-platform and uses the host shell.
Folk Around
rs_peekaboo is standalone. It is designed so MCP hosts such as
folk-around can call the Rust computer-use engine directly instead of
shelling out to AppleScript helpers.
License
ISC.
Acknowledgements
rs_peekaboo began as an independent Rust rewrite of
Peekaboo. Its background driver and MCP
compatibility surface also draws on public interface patterns from
Cua Driver.