--- id: pyautogui version: "0.9.54" license: BSD license_treatment: permissive maintenance: dormant --- # PyAutoGUI — PyAutoGUI lets Python control the mouse and keyboard, and other GUI automation tasks. For Windows, macOS, and Linux, on Python 3 and 2. License: permissive · Maintenance: dormant · Downloads: 2.9M/mo ## What it is and what it does PyAutoGUI is a cross-platform Python library that abstracts away the complexity of controlling the mouse and keyboard on Windows, macOS, and Linux. It provides a simple API to move the cursor, click, type, press keys, and perform other GUI automation tasks by hiding the platform-specific details—using ctypes and the Windows API on Windows, the Cocoa API on macOS, and Xlib on Linux. The package also includes screenshot capture and image-location features (powered by Pillow) to find and interact with on-screen elements. It is commonly used for test automation, repetitive task scripting, and GUI interaction workflows. Installation requires platform-specific system dependencies and Pillow, and the package is currently dormant but remains stable and widely downloaded. Use it for: - Automate repetitive GUI tasks such as form filling, data entry, or clicking through dialogs in applications without native APIs. - Write end-to-end GUI tests that simulate user interactions like mouse clicks, keyboard input, and screenshot verification. - Build scripts to control legacy applications or third-party software that lack programmatic interfaces. - Capture screenshots and locate UI elements on screen to enable conditional automation workflows. - Create accessibility tools or macros that simulate keyboard and mouse events for users with mobility constraints. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. PyAutoGUI programmatically controls the mouse and keyboard across Windows, macOS, and Linux, enabling GUI automation tasks like clicking, typing, and taking screenshots. Yes, with conditions. PyAutoGUI is worth installing if you need cross-platform GUI automation and can manage its platform-specific dependencies (pyobjc on macOS, python3-xlib on Linux, Pillow everywhere). The package is stable, permissively licensed, and widely used, but it is dormant—last released in May 2023—so expect no active maintenance. It works reliably on the primary monitor only and is best suited for scripting and testing, not production services. ## Install pip install pyautogui uv add pyautogui poetry add pyautogui ## Installing PyAutoGUI Before you install: Installation friction is high due to platform-specific system dependencies: Windows requires no extras, macOS requires pyobjc-core and pyobjc, and Linux requires python3-xlib. Pillow is also required and may need additional system libraries for PNG/JPEG support on Linux. The package is dormant (last release 2023-05-24, last commit 2024-08-20) but remains widely used. License in practice: BSD license is permissive, allowing commercial and private use with minimal restrictions. You may use, modify, and distribute this package freely provided you include the original license notice. Quickstart: pip install pyautogui import pyautogui # Move mouse and click pyautogui.moveTo(100, 150) pyautogui.click() # Type text pyautogui.write('Hello world!') # Take screenshot im = pyautogui.screenshot() im.save('screenshot.png') Platform-specific dependencies required: pyobjc-core and pyobjc on macOS; python3-xlib on Linux. Pillow must be installed and may require system libraries for image support on Linux. Verify before relying: - Whether multi-monitor support has improved since the documented limitation to primary monitor only - Current stability and bug-fix status given dormant maintenance (last release over 2 years old) ## Package facts - License: BSD (permissive) - Python support: unspecified - Install friction: high - Maintenance: dormant - Downloads: 2.9M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags gui automation mouse keyboard control, programmatic mouse and keyboard control, cross-platform gui automation, automated mouse clicks and typing, screenshot and image location on screen, desktop automation python, simulate keyboard and mouse events, gui-automation, cross-platform, testing [View on SkillFed](https://skillfed.io/packages/pyautogui) · [View on PyPI](https://pypi.org/project/pyautogui/)