# Install xdotool with Homebrew, apk, apt, dnf, MacPorts, Nix, pacman, zypper

Fake keyboard/mouse input and window management for X. Version 4.20260303.1 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:xdotool
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install xdotool
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install xdotool
```

  Evidence: MacPorts ports tree: x11/xdotool/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add xdotool
```

  Evidence: Alpine Linux edge package indexes: xdotool from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install libxdo-dev
```

  Evidence: Debian stable package indexes: libxdo-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install libxdo
```

  Evidence: Fedora Rawhide package metadata: libxdo from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#xdotool
```

  Evidence: nixpkgs package indexes: pkgs/by-name/xd/xdotool/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S xdotool
```

  Evidence: Arch Linux sync databases: xdotool from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install xdotool
```

  Evidence: openSUSE Tumbleweed package metadata: xdotool from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

## Package facts

- **Package key:** brew:xdotool
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/xdotool>
- **Version:** 4.20260303.1
- **Source summary:** Fake keyboard/mouse input and window management for X
- **Homepage:** <https://www.semicomplete.com/projects/xdotool/>
- **Repository:** <https://github.com/jordansissel/xdotool>
- **Upstream docs:** <https://github.com/jordansissel/xdotool#readme>
- **License:** BSD-3-Clause
- **Source archive:** <https://github.com/jordansissel/xdotool/archive/refs/tags/v4.20260303.1.tar.gz>
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- xdotool (cli)
- xdotool (alias)

## Dependencies

- libx11
- libxi
- libxinerama
- libxkbcommon
- libxtst

## Build dependencies

- pkgconf

## Install behavior

- Post-install hook: not defined
- Caveats: You will probably want to enable XTEST in your X11 server now by running: defaults write org.x.X11 enable_test_extensions -boolean true For the source of this useful hint: https://stackoverflow.com/questions/1264210/does-mac-x11-have-the-xtest-extension
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 4.20260303.1
- Local data: ok
- Upstream repository: https://github.com/jordansissel/xdotool
- Upstream latest detected: v4.20260303.1 (current)
- info: No package-manager update timestamp was available.
## Project history and usage

xdotool is Jordan Sissel's X11 automation command: a small CLI and companion libxdo library for synthesizing keyboard and mouse input, searching for windows, and manipulating X window-manager state from scripts.

### Project history

The earliest public GitHub commit history for xdotool reaches back to 2007 and records a migration from a semicomplete Google Code Subversion repository, while the GitHub repository itself was created in 2011. Its upstream documentation has long described the same core design: use the XTEST extension and Xlib calls to fake input, locate windows, move and resize them, switch desktops, and alter window properties.

xdotool evolved from a one-command X scripting helper into a grab bag of practical desktop automation verbs. The upstream README documents not only key and mouse events but also window stacks, EWMH/NetWM-oriented window-manager interactions, and libxdo for C programs that need the same behavior without shelling out.

### Adoption history

Adoption followed the path of a classic Linux desktop utility: package it everywhere, make it scriptable, and let window-manager users compose it with shell, hotkey daemons, status bars, and test harnesses. The upstream project page lists common installs for Debian/Ubuntu, Fedora, FreeBSD, macOS through Homebrew or MacPorts, and OpenSUSE, matching its role as a small dependency-free command that distributions can ship easily.

Its importance also became clearer during the Wayland transition. The README explicitly warns that xdotool does not work correctly for many Wayland tasks because its model depends on X11 semantics; that limitation turned xdotool into both a beloved X11 automation tool and a marker of the security and protocol differences between X11 and Wayland.

### How it is used

Practitioners use xdotool to press hotkeys, type text into focused applications, click or move the pointer, activate a window found by name or class, resize matching windows, script window focus, and glue graphical applications into shell workflows. It is common in lightweight window-manager setups, kiosk scripts, GUI smoke tests, and one-off desktop automation.

The tool is intentionally composable: upstream examples show pipelines that search for Firefox, activate it, and send Ctrl+L, or find visible terminal windows and resize them. libxdo gives packagers and C applications a lower-level route to the same XTEST and Xlib behavior.

### Why package nerds care

xdotool is one of the canonical examples of a package that matters because it exposes a desktop protocol as a Unix command. It packages the old X11 assumption that clients can inspect and influence each other into a tiny CLI, which made it disproportionately useful for automation and disproportionately hard to replace under Wayland.

For package nerds, it also illustrates the value of boring distribution: a single executable, a small C library, a manpage, and enough stable behavior that scripts written years apart still tend to work on Xorg sessions.

### Timeline

- 2007: Earliest GitHub-visible commit imports xdotool history from the semicomplete Google Code Subversion repository.
- 2010: Upstream examples note simpler chained commands available as of version 2.20100623.
- 2011: The GitHub repository is created.
- 2015: The semicomplete project page documents distro install routes and the XTEST/Xlib design.
- 2020s: The README frames Wayland incompatibility as a core boundary of xdotool's X11 model.

### Related projects

- libxdo is the C library shipped with xdotool for applications that need xdotool-style X11 automation.
- XTEST is the X11 extension xdotool uses for synthetic keyboard and mouse input.
- ydotool and dotool are related tools named by upstream for Wayland-era or uinput-based input automation.

### Sources

- <https://api.github.com/repos/jordansissel/xdotool>
- <https://api.github.com/repos/jordansissel/xdotool/commits?per_page=1&page=686>
- <https://github.com/jordansissel/xdotool>
- <https://www.semicomplete.com/projects/xdotool/>


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** xdotool
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## Other Package-Manager Records

- Debian apt - libxdo-dev - 1:3.20160805.1-5.1: normalized package name match | Debian stable package indexes: libxdo-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | library for simulating X11 keyboard/mouse input | https://github.com/jordansissel/xdotool/
- Debian apt - libxdo3 - 1:3.20160805.1-5.1: normalized package name match | Debian stable package indexes: libxdo3 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | library for simulating (generating) X11 keyboard/mouse input events | https://github.com/jordansissel/xdotool/
- Debian apt - xdotool - 1:3.20160805.1-5.1: normalized package name match | Debian stable package indexes: xdotool from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | simulate (generate) X11 keyboard/mouse input events | https://github.com/jordansissel/xdotool/
- Nix - xdotool: normalized package name match | nixpkgs package indexes: pkgs/by-name/xd/xdotool/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - libxdo-dev - 1:3.20160805.1-5build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libxdo-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | library for simulating X11 keyboard/mouse input | https://github.com/jordansissel/xdotool/
- Ubuntu apt - libxdo3 - 1:3.20160805.1-5build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libxdo3 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | library for simulating (generating) X11 keyboard/mouse input events | https://github.com/jordansissel/xdotool/
- Ubuntu apt - xdotool - 1:3.20160805.1-5build1: normalized package name match | Ubuntu 24.04 LTS package indexes: xdotool from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | simulate (generate) X11 keyboard/mouse input events | https://github.com/jordansissel/xdotool/
- apk - xdotool - 4.20260303.1-r0: normalized package name match | Alpine Linux edge package indexes: xdotool from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Simulate X11 keyboard/mouse input events | https://github.com/jordansissel/xdotool
- apk - xdotool-dev - 4.20260303.1-r0: normalized package name match | Alpine Linux edge package indexes: xdotool-dev from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Simulate X11 keyboard/mouse input events (development files) | https://github.com/jordansissel/xdotool
- apk - xdotool-doc - 4.20260303.1-r0: normalized package name match | Alpine Linux edge package indexes: xdotool-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Simulate X11 keyboard/mouse input events (documentation) | https://github.com/jordansissel/xdotool
- dnf - libxdo - 3.20211022.1-10.fc44: normalized package name match | Fedora Rawhide package metadata: libxdo from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Keyboard input simulation library | https://github.com/jordansissel/xdotool
- dnf - libxdo-devel - 3.20211022.1-10.fc44: normalized package name match | Fedora Rawhide package metadata: libxdo-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Development files for libxdo | https://github.com/jordansissel/xdotool
- dnf - xdotool - 3.20211022.1-10.fc44: normalized package name match | Fedora Rawhide package metadata: xdotool from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Fake keyboard/mouse input | https://github.com/jordansissel/xdotool
- pacman - xdotool - 4.20260303.1-1: normalized package name match | Arch Linux sync databases: xdotool from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Command-line X11 automation tool | https://www.semicomplete.com/projects/xdotool/
- zypper - xdotool - 4.20251130.1-1.3: normalized package name match | openSUSE Tumbleweed package metadata: xdotool from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Fake keyboard/mouse input | https://www.semicomplete.com/projects/xdotool/
- zypper - xdotool-devel - 4.20251130.1-1.3: normalized package name match | openSUSE Tumbleweed package metadata: xdotool-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Development and Library files | https://www.semicomplete.com/projects/xdotool/


## Related links

- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Productivity CLI packages](https://www.automicvault.com/pkg/productivity-cli-packages/) - Matched curated productivity category metadata from av.db.
- [Homebrew utility packages](https://www.automicvault.com/pkg/brew-utility-packages/) - Matched Homebrew package provider.
- [libxkbcommon](https://www.automicvault.com/pkg/brew/libxkbcommon/) - Runtime dependency declared by Homebrew.
- [pkgconf](https://www.automicvault.com/pkg/brew/pkgconf/) - Build dependency declared by Homebrew.
- [cliclick](https://www.automicvault.com/pkg/brew/cliclick/) - Shares av.db curated category or tags: automation, cli, keyboard, system.
- [rex](https://www.automicvault.com/pkg/brew/rex/) - Shares av.db curated category or tags: automation, cli, system.
- [twm](https://www.automicvault.com/pkg/brew/twm/) - Shares av.db curated category or tags: cli, desktop, system, x11.
- [xcursorgen](https://www.automicvault.com/pkg/brew/xcursorgen/) - Shares av.db curated category or tags: cli, desktop, system, x11.
- [gkrellm](https://www.automicvault.com/pkg/brew/gkrellm/) - Shares av.db curated category or tags: cli, desktop, system.
- [libnotify](https://www.automicvault.com/pkg/brew/libnotify/) - Shares av.db curated category or tags: cli, desktop, system.
- [shared-mime-info](https://www.automicvault.com/pkg/brew/shared-mime-info/) - Shares av.db curated category or tags: cli, desktop, system.

## Combined YAML source

View the package source record on GitHub. [combined/xdotool.yml](https://github.com/automic-vault/db/blob/main/combined/xdotool.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
