Enter a keyword to search published documentation.
nano-use
Commands
All eight nano-use commands and their positional arguments—screenshot, pointer, text, key, and scroll.
Observe the desktop
screenshot takes no positional arguments. It captures the current combined desktop and writes the result as a base64 PNG to standard output.
nano-use screenshotPointer actions
click x y posts one left-button click. right_click x y posts one right-button click. double_click x y posts two left-button clicks. All three validate the point against one axis-aligned bounding rectangle that encloses all active display rectangles—not against each display separately—so points in gaps between displays can pass validation.
drag x1 y1 x2 y2 validates both endpoints, then posts a left-button down event, a dragged event, and a left-button up event.
nano-use click 320 240
nano-use right_click 320 240
nano-use double_click 320 240
nano-use drag 320 240 640 480Text and key actions
type text posts the provided non-empty string as a keyboard event. keypress keys accepts one main key plus optional modifiers separated by +, like cmd+return or shift+a. Named keys available in this build include arrows, navigation keys, delete variants, and f1 through f12.
nano-use type "bounded text"
nano-use keypress cmd+returnScroll at a point
scroll x y dy validates the point, moves the cursor there, and posts one pixel-unit vertical scroll event using the signed integer dy.
nano-use scroll -- 320 240 -480These are positional arguments, not flags. There are no additional command aliases.
Invocation and result contract
The examples assume you've done the optional PATH setup from Quick Start. If not, replace nano-use with ./target/release/nano-use. Input examples change the active desktop, so use a disposable target with known focus.
Put -- before positional arguments whenever a value starts with -. For example: nano-use click -- -100 240 or nano-use type -- "-draft". Without --, the parser treats these values as options.
Coordinates are floating-point desktop coordinates; dy is a signed 32-bit integer. Available modifiers include cmd/command, ctrl/control, alt/option, shift, and fn/function. Use one main key. Letter key codes follow a US layout; use type for arbitrary text instead.
Successful input commands normally produce no stdout—verify their effect with a new screenshot. Parser errors exit 2; handled runtime errors exit 1 with a message on stderr. The tool does not return an action-result JSON object.