Files
python-sdk/pkg/hanzo-tools-computer
zeekay 1a7ec1bad0 fix: Windows + WSL compatibility across python-sdk
Make uvloop fully opt-in (performance extra only, not a hard dep).
Add Windows native support: shell resolution (pwsh/cmd), signal
handling (SIGKILL guard), platform-appropriate paths, chmod guards.

Changes:
- hanzo-mcp: move uvloop from hard dep to [performance] extra
- hanzo-tools-shell: resolve pwsh/powershell/cmd on Windows,
  use correct invocation flags (cmd /c, pwsh -Command)
- hanzo-tools-shell: guard signal.SIGKILL (doesn't exist on Windows)
- hanzo-tools-computer: replace HOME=/tmp fallback with Path.home()
- hanzo-mcp cli: platform-appropriate socket path default
- hanzoai auth: skip os.chmod on Windows
- hanzo install: skip os.chmod on Windows
- Add .github/workflows/test-windows.yml (native + WSL2 matrix)

Versions bumped: hanzo-mcp 0.12.7, hanzo-async 0.1.2,
hanzo-tools-shell 0.6.2, hanzo-tools-computer 0.5.4
2026-03-09 20:50:55 -07:00
..
2025-12-27 15:00:11 -08:00

hanzo-tools-computer

Computer control tools for Hanzo AI - pyautogui-based Mac automation.

Installation

pip install hanzo-tools-computer

Usage

from hanzo_tools.computer import ComputerTool, register_tools

# Register with MCP server
register_tools(mcp_server, permission_manager)

Actions

Mouse

  • click - Click at (x, y)
  • double_click - Double click at (x, y)
  • right_click - Right click at (x, y)
  • move - Move mouse to (x, y)
  • drag - Drag to (x, y)
  • scroll - Scroll by amount

Keyboard

  • type - Type text string
  • press - Press single key
  • hotkey - Press key combination

Screen

  • screenshot - Capture screen
  • locate - Find image on screen
  • info - Get screen/mouse info

Examples

# Click at coordinates
computer(action="click", x=100, y=200)

# Type text
computer(action="type", text="Hello world")

# Keyboard shortcut (Cmd+C on Mac)
computer(action="hotkey", keys=["command", "c"])

# Take screenshot
computer(action="screenshot")

# Get screen info
computer(action="info")

Safety

  • FAILSAFE enabled: Move mouse to corner to abort
  • macOS only (checks platform)
  • All actions run in executor threads (non-blocking)

License

MIT