pixelactions vs PyAutoGUI
The incumbent and the executor: every tutorial teaches PyAutoGUI; pixelactions moves the coordinates out of the code.
The short version
PyAutoGUI made desktop automation a Python one-liner, and its reach is unmatched — every tutorial teaches it, and agent stacks default to it. That reach is real and earned. The difference is what happens to the coordinates: in a script they are arithmetic that goes stale silently, and click() returns Nonewhether the click landed or not. pixelactions takes its targets from a session a human marked in pixelcoords — by label — re-locates each one against a fresh capture before acting, verifies after, and refuses rather than guesses. Your Python keeps owning the loop: over the line protocol, pixelactions is the executor under your program, not a library replacing it. Worth knowing when comparing: PyAutoGUI's last release was May 2023, and it has no Wayland support.
Feature for feature
| Feature | pixelactions | PyAutoGUI |
|---|---|---|
| Price | Free | Free |
| Platforms | macOS today; Windows and X11 nextearly — no crate or binaries published yet | Windows · macOS · Linux (X11)no Wayland; primary monitor only |
| Declarative, reviewable flows | TOML flows + chained argva pull request shows "click submit", not arithmetic | not offered |
| Language it takes to drive it | Any — JSON line protocol over stdioa 40-line stdlib Python client ships in the docs; no embedded interpreter, ever | Python |
| Re-location before acting | Every target re-located against a fresh capture before actinga crop that matches in more than one place stops the run — ambiguity is the test, not distance | locateOnScreen image search, in-script |
| Verified execution | Distinguishes executed from verified; exit codes 0/1/2/3 | not offered |
| Maintenance status | In active development — v0.1.0, unpublished | Last release May 2023 |
| License | MIT, open source | BSD-3, open source |
When to pick PyAutoGUI
- A quick one-off script you will watch run — reach for the thing every tutorial teaches.
- You need raw reads from the same library — pixel colors, screenshots. pixelactions acts and verifies; it does not expose the capture.
- Your stack already speaks it and the runs are supervised — switching has a cost and this is where PyAutoGUI is fine.
When to pick pixelactions
- The UI moves between runs — every target is re-located against a fresh capture before anything is injected.
- Unattended runs need more than "the call returned": executed vs verified, and exit codes a CI job can gate on.
- Coordinates belong in a reviewable artifact — a flow file in a pull request shows click submit, not arithmetic.
- Your loop is not Python — the line protocol makes any language a first-class driver, and keeps Python one.
What a flow looks like
session = "~/captures/checkout"
[[step]]
action = "click"
target = "email"
[[step]]
action = "type"
text = "a@b.com"
[[step]]
action = "key"
chord = "enter"
[[step]]
action = "verify"
target = "success"Two ways in
cargo install pixelactionsOr skip the toolchain: prebuilt binaries — download, unpack, run.