# xdotool

11 Hacker News commenters recommended xdotool and 4 criticized it, November 2025 to November 2026. It was recommended in 8 of 13 months. It meets the Hacker Approved badge rule.

**Verdict:** Command-line tool for simulating keyboard, mouse and window actions on X11, popular for scripting and test automation. Critics note it runs into gaps and inconsistent behavior.

## Why people recommend it

- Automates repetitive testing and checks (2 comments): "can automate a lot of checks that normally takes hours of repetitive testing" ([source](https://news.ycombinator.com/item?id=49254733)) "I can at least add xvfb, xdotool, and other utils" ([source](https://news.ycombinator.com/item?id=48920055))
- Simple to call from scripts (2 comments): "With X it's easy, just call xdotool." ([source](https://news.ycombinator.com/item?id=46384397)) "xdotool and wmctrl is what you need" ([source](https://news.ycombinator.com/item?id=49574985))
- Best available tool for X11 (2 comments): "xdotool is kind of the best we have" ([source](https://news.ycombinator.com/item?id=46014854)) "xdotool and wmctrl is what you need" ([source](https://news.ycombinator.com/item?id=49574985))
- Works well in practice (2 comments): "that works so well (on my machine) I can't believe it" ([source](https://news.ycombinator.com/item?id=47831284)) "work fine for Cloudflare's" ([source](https://news.ycombinator.com/item?id=49930353))

## What people warn about

- Unreliable or hard to get working (2 comments): "tools like xdotool end up running into gaps or inconsistent behavior" ([source](https://news.ycombinator.com/item?id=46001205)) "I struggled to get xdotool to work correctly back in 2014" ([source](https://news.ycombinator.com/item?id=46487272))

## Alternatives hackers recommend

- [fzf](https://hackerapproved.com/p/fzf.md): 78 recommend
- [jq](https://hackerapproved.com/p/jq.md): 75 recommend
- [grep](https://hackerapproved.com/p/grep.md): 65 recommend
- [Atuin](https://hackerapproved.com/p/atuin.md): 63 recommend
- [GitHub CLI](https://hackerapproved.com/p/github-cli.md): 49 recommend

## Cite as

Hacker Approved, "xdotool", https://hackerapproved.com/p/xdotool/ (counts from 1,795,640 Hacker News comments, November 2025 to November 2026).
