/hypruse:hyprusefrom hypruse
Controls the Hyprland Wayland desktop via the hypruse CLI: lists/focuses/moves/closes windows, launches apps, takes screenshots, clicks GTK/Qt controls, types text, and reads clipboard. Use for GUI automation and window management on Hyprland.
Ships in hypruse. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Every verb is hypruse <verb> [args]. hypruse --help lists every verb and
hypruse <verb> [<action>] --help is the ground truth for its flags; read it
before guessing. Observation verbs print one plain line per fact; acting verbs print
one result line and exit 0 only when the action was delivered. The same
fifteen tools exist as an MCP server (claude mcp add -s user hypruse -- uvx hypruse); this CLI is for agents that run shell commands.
hypruse doctor # exit 0: session, event socket, pointer and grim are green
hypruse desktop # monitors, workspaces, windows (address, class, title, at, size), active, cursor, layers
Read desktop first, every task, and act on window addresses. Never take a
screenshot to find or arrange windows. Layers (launchers, bars, popups,
on-screen keyboards) are listed when the compositor tracks them, not when
they are visible; screenshot when visibility matters.
| Need | Verb | Why it comes first |
|---|---|---|
| switch workspace; focus, move, close, fullscreen, float a window | hypruse hypr ... | IPC, milliseconds, exact, no image |
| start an app and get its window address | hypruse launch CMD [--workspace N] | blocks on the real openwindow event; opens on the agent's own workspace unless told otherwise |
| click a named control in a GTK/Qt app | hypruse click_ui NAME --window ADDR | coordinate comes from the accessibility tree, one call |
| set a slider, spin button or a field's whole text | hypruse click_ui NAME --window ADDR --value N or --text TEXT | no pointer and no focus change, in any window, read back |
| read a form's state, list what is clickable | hypruse ui --window ADDR [--name N] | a few hundred exact tokens, no image |
| see the clickable controls numbered | hypruse marks --window ADDR, then hypruse click_ui --mark N | numbered screenshot plus legend |
| look at what the tree cannot name (terminal, canvas, Electron/Chrome without the a11y flag) | hypruse screenshot --window ADDR, then hypruse zoom X Y | coarse to fine |
| click, drag or scroll at a point | hypruse pointer click X Y | last resort, only after zoom |
| type text, press an app shortcut | hypruse keyboard type TEXT --window ADDR, hypruse keyboard key ctrl+s --window ADDR | --window aims the keys, in the background on any window but the human's |
| run a compositor keybind (super+...) | hypruse binds, then hypruse use_bind SUPER+F | keyboard never runs a compositor bind |
| wait for something to happen | hypruse wait_for window_open --match firefox | instead of sleep |
| click, type, enter as one process | hypruse sequence '[...]' | one round-trip; stops on an unexpected structural change |
desktop, then ui or screenshot --window ADDR of the one window
you care about.--then desktop|ui|screenshot (every acting verb but
launch and clipboard) to get the effect back in the same call
(--then ui after typing or toggling is cheapest).Small target: screenshot --window ADDR, estimate the target's global point
by proportion ("60% across a 300 px crop is x+180"), zoom X Y, re-estimate
on the zoomed image, then click. Never click from a full-screen estimate.
After two failed attempts at the same step, stop and ask.
By default, an action on any window the human is not in runs in the background: their cursor, keyboard focus and workspace stay where they are.
launch with no --workspace opens the app on one of the agent's own
workspaces (99 down to 90 unless the owner set HYPRUSE_AGENT_WORKSPACES),
out of the human's sight. Do your work there.click_ui NAME --window ADDR presses the control through the
accessibility tree, and keyboard ... --window ADDR types into the
window's text field or sends the keys to that window alone. The result
line says which method it used and what it read back. A line ending in
WARNING: the human's focused window changed means their focus moved
during the action (the app brought a window forward, or the human
switched): stop and tell the user.keyboard key, or text that goes key by key) reach the control
the app itself has focused, not the field text went into: run
click_ui FIELD --window ADDR first, then send the keys.focused ... 'SetFocus' means the
row was focused, not opened. A key sent next goes to whatever the app
has focused, and may do nothing: in testing, Enter on a focused Qt
WebEngine row did not open it. Check the effect with ui before going
on, and tell the user when a row will not open in the background.ui, not a screenshot: hidden apps often stop
drawing, so their pixels can be stale.pointer is the human's cursor and is refused over any window but
theirs. Press controls with click_ui instead.--foreground does the action on the human's screen and takes it over;
use it only when the user asked for that. Under HYPRUSE_BACKGROUND=1
nothing may take the foreground: ask the user.launch moves it; the note says so. Never
launch a command that drives the desktop itself (hyprctl, wtype).One space everywhere: Hyprland global logical pixels, the space window at,
the cursor and every click argument use. Screenshots are pixel space. Each
capture prints its file path on line 1 and, on line 2, JSON with geometry
[x, y, w, h], scale and image [w, h], so
global = geometry[:2] + image_pixel / scale. Zoomed captures come back
near scale 1.0 with their origin in geometry, so
global = geometry[:2] + image_pixel lands cleanly. On scale 1.0 monitors
image pixels are global coordinates. The formula already covers
multi-monitor layouts and fractional scale; never convert by hand from
hyprctl monitors. Read the file a capture prints to see it.
| code | meaning | what to do |
|---|---|---|
| 0 | delivered, or observed | verify the effect |
| 1 | runtime error, hypruse: error: ... on stderr | fix the call or the environment |
| 2 | usage, hypruse: usage: ... | read hypruse <verb> --help |
| 3 | refused by a trust layer, background mode, a mode gate, or an argument hypruse will not send to Hyprland, hypruse: refused: ... | report the reason; never retry or work around it |
| 4 | ran, no result (timeout, no tree, ambiguous name, sequence stopped early) | re-observe, then pick another channel |
desktop first.--allow-auth unless the user asked for that credential
entry. A background refusal ("so it cannot be done in the background")
is the one that names its own way forward: follow that, or ask.--then ui or a screenshot, then press
enter as a separate step once the user has confirmed.--window ADDR to keyboard type and keyboard key, so
keystrokes land in the intended app. The single exception: a launcher
opened with use_bind holds the keyboard grab and is not a window, so
type into it with no --window, and press esc to leave it.clipboard exists only when the owner set HYPRUSE_CLIPBOARD=1, because
clipboards hold passwords. Never quote its contents into a report.--dry-run rehearses: every guard runs, nothing is delivered, and the
result says so. Do not retry a dry run because "it did not work".hypruse hypr workspace 3 # focus_window ADDR | move_window ADDR WS | close_window ADDR | fullscreen [ADDR] | maximize [ADDR] | toggle_floating [ADDR]
hypruse hypr center_window 0x5f2a # floating only: place_window ADDR X Y | resize_window ADDR W H | toggle_pin [ADDR]
hypruse hypr toggle_special term # show or hide scratchpad special:term; the reply says which
hypruse launch kitty # 0x55a4479a1200 kitty "~" workspace 99, plus a note: an agent workspace
hypruse launch kitty --workspace 2 # 0x55a4479a1200 kitty "~" workspace 2
hypruse launch --workspace 2 -- firefox --new-window https://example.org # the app's own flags go after --
hypruse ui --window 0x5f2a --name Save # [0] push button "Save" @1204,88
hypruse click_ui Save --window 0x5f2a --then ui
hypruse screenshot --window 0x5f2a # path, then {"geometry":[x,y,w,h],"scale":1.0,"image":[w,h],...}
hypruse zoom 1180 840 --window 0x5f2a
hypruse pointer click 1183 842 # move X Y | drag X Y TO_X TO_Y | scroll DY [DX] --at X Y
hypruse keyboard type "hello" --window 0x5f2a
hypruse keyboard key ctrl+shift+t --window 0x5f2a
hypruse use_bind SUPER+RETURN # combos come from `hypruse binds`
hypruse wait_for title_change --match Inbox --timeout 10
hypruse sequence '[{"op":"click_ui","name":"Search","window":"0x5f2a"},
{"op":"keyboard","action":"type","text":"btop","window":"0x5f2a"},
{"op":"keyboard","action":"key","keys":"enter","window":"0x5f2a"},
{"op":"wait_for","event":"window_open","match":"btop"}]'
wait_for events: window_open, window_close, workspace, title_change,
layer_open, layer_close, urgent, screencast, scratchpad, fullscreen,
monitor_added, monitor_removed, keyboard_layout, config_reload. Every
verb takes --json for one compact {"ok":true,"tool":...,"result":...}
line.
ui answers "exposes no accessibility tree" (exit 4) for terminals, canvas
apps, and Chrome and Electron apps started before the user switched their
accessibility on. Fall back to screenshot, zoom, pointer. For web pages
prefer a browser tool if one is installed; hypruse is for the desktop around
the browser.
For Chromium, Chrome, their web apps and Obsidian, tell the user the fix
rather than applying it yourself. Chrome needs both
--force-renderer-accessibility on its own line in
~/.config/chromium-flags.conf (or chrome-flags.conf, brave-flags.conf,
~/.config/obsidian/user-flags.conf) and either the session accessibility
switch (hypruse a11y on) or ACCESSIBILITY_ENABLED=1 in its environment.
Either one alone gives no tree. Then the app needs a restart.
hypruse a11y on changes every app in the user's session, so it is their
call to run. Qt 6 apps pick the switch up while running, with no restart.
HYPRUSE_LAUNCH_A11Y=1 in the server's env supplies the environment half
for apps hypruse launches; Chromium apps still need the flag in their flags
file. hypruse doctor names the open windows that still have no tree.
references/verbs.md: every verb, flag, output shape and exit code. Read
it when a call errors or you need a flag not shown above.references/recipes.md: worked flows (launch and fill a form, the zoom
loop, driving the owner's launcher, a sequence micro-plan, reading a form
back, handling a refusal, finding a window on another workspace) and
troubleshooting.hypruse journal, hypruse replay, hypruse stop, hypruse init,
hypruse skill: the owner's tools. You do not run them.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
hyprland, wayland, gui-automation, window-management, desktop-control
npx claudepluginhub ilyaskhallouki/hypruse --plugin hypruseOther plugins' skills for the same job