Skip to main content

CLI to orchestrate and automate graphical desktop workflows.

Project description

weavgui

Turn any vision-capable LLM into a desktop GUI operator.

weavgui provides a minimal CLI toolkit that closes the loop between seeing and acting: take an annotated screenshot, feed it to a vision model, move the mouse, and repeat — until the model clicks exactly where it needs to.

screenshot (with crosshair) → vision model analyzes image → mouse move / click → screenshot → ...

No browser required. No DOM. No accessibility tree. Just pixels and a feedback loop.

npx skills add https://github.com/yankeguo/weavgui/tree/main/skills/weavgui -a openclaw -y

Screenshot with cursor crosshair and bounding boxes

Installation

uv tool install weavgui

To upgrade an existing installation:

uv tool upgrade weavgui

Quick Start

weavgui --version
weavgui screenshot -o out.png
weavgui mouse move '(100,100)'
weavgui mouse moveto '(500,300)'
weavgui mouse click
weavgui pasteboard write hello world
weavgui pasteboard read
weavgui keystroke command+c

Coordinate System

Mouse and screenshot-related commands share the same coordinate convention:

  • Primary-display logical coordinates (pixels)
  • Origin at top-left: (0, 0)
  • x increases to the right, y increases downward
  • Single-display only (primary monitor)
  • On macOS Retina, screenshots are downscaled to logical resolution so that pixel coordinates match mouse coordinates

Command Reference

Global

Command Description
weavgui --version Print CLI version
weavgui -h Show help

screenshot

Capture a screenshot of the primary display and save it as PNG.

weavgui screenshot -o <output.png> [--without-cursor]
Option Description
-o, --output Output .png path (required)
--without-cursor Skip cursor overlay drawing

Default behavior (without --without-cursor) annotates the cursor position:

  • Red crosshair spanning the full screenshot
  • Red small box centered on cursor (100×100 px, radius 50)
  • Green medium box centered on cursor (200×200 px, radius 100)
  • Blue large box centered on cursor (600×600 px, radius 300)

The three boxes serve as positioning references for the next mouse move / mouse moveto command:

Target location Suggested delta range
Inside the red box Fine adjustment, ±50 px
Between red and green boxes Medium adjustment, ±50–100 px
Between green and blue boxes Coarse adjustment, ±100–300 px
Outside the blue box Large move needed — estimate from the full screenshot
weavgui screenshot -o out.png
weavgui screenshot -o out-no-cursor.png --without-cursor

mouse

mouse move '(dx,dy)'

Move the cursor by a relative pixel delta. The argument uses (dx,dy) format. Fails if the target position would leave the primary display bounds.

weavgui mouse move '(100,100)'
weavgui mouse move '(-100,50)'

mouse moveto '(x,y)'

Move the cursor to an absolute position. The argument uses (x,y) format. Fails if the position is outside the primary display bounds.

weavgui mouse moveto '(500,300)'

mouse click

Left click at the current cursor position.

weavgui mouse click

mouse doubleclick

Double left click at the current cursor position.

weavgui mouse doubleclick

mouse rightclick

Right click at the current cursor position.

weavgui mouse rightclick

pasteboard

pasteboard read

Read text from the system pasteboard and print to stdout.

weavgui pasteboard read

pasteboard write <text...>

Write text to the system pasteboard. Multiple arguments are joined by a single space.

weavgui pasteboard write hello world

keystroke

Simulate keyboard input. Supports single keys and combinations joined with +.

weavgui keystroke <keys>
Input Meaning
c Press c
ctrl+c Press Ctrl+C
command+c Press Command+C
shift+a Press Shift+A
alt+f4 Press Alt+F4

Modifier aliases:

Alias Resolves to
control ctrl
cmd command
option alt

On macOS, single-key combos with command are sent via AppleScript for better reliability.

weavgui keystroke c
weavgui keystroke ctrl+c
weavgui keystroke command+c

Development

Clone the repository and install dependencies:

git clone https://github.com/yankeguo/weavgui.git
cd weavgui
uv sync

Run commands from source:

uv run weavgui --version
uv run weavgui screenshot -o out.png

Notes

  • Mouse and keystroke automation requires Accessibility permission.
  • If commands fail on macOS, go to System Settings > Privacy & Security > Accessibility and grant access to your terminal application.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

weavgui-0.1.4.tar.gz (12.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

weavgui-0.1.4-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file weavgui-0.1.4.tar.gz.

File metadata

  • Download URL: weavgui-0.1.4.tar.gz
  • Upload date:
  • Size: 12.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for weavgui-0.1.4.tar.gz
Algorithm Hash digest
SHA256 5db2ff156c2938f73b0d87f98dcd2caa52898a0a025e99faa9caf4175e07d801
MD5 c90091a51cd3978ed4dda7cb66d2a63a
BLAKE2b-256 4d8aa885a2a4e274c9d40a6c6fb9f9e88405a9da26e3d78b2e39527db0ae7d7a

See more details on using hashes here.

File details

Details for the file weavgui-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: weavgui-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for weavgui-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f687448b12f2994848a2587332da430aba34bbc8fd7d2e82c9d8b4e4c8a8251a
MD5 7c7ba32db8a9640f6ff0d4c2f2892788
BLAKE2b-256 26c4fbd8e74819833e5ee3cdb20cab29f04e5bfef915f24d34b6f950996c1550

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page