Hammer simulates real touch, stylus and keyboard events on iOS. Use it to write unit tests that interact with your UI like a user, or to drive a running app from the command line and AI agents.
- Getting started: install Hammer and write your first test.
- Touches: fingers, gestures and stylus.
- Keyboard: typing and key presses.
- Finding views: identifiers, queries and SwiftUI.
- Waiting: waiting for the app, finishing and settings.
- Swift Testing
- Upgrading from 1.x
- Troubleshooting
Add the agent to your app:
- Getting started: start the agent in a debug build.
- Security: tokens, physical devices and remote connections.
- Custom commands: add commands for your app.
Or add it to an Android app:
- Getting started: one line of Gradle for debug builds.
- Security: who can connect, release builds and physical devices.
- Custom commands: add commands for your app.
Then use the hammer command line tool:
- Getting started: install
hammerand run your first commands. - Targeting elements: refs, identifiers, labels and points.
- Live editing: try view changes in the running app.
- System UI: tap permission alerts and the home screen in the simulator.
- MCP server: give AI agents the commands as tools.
- Android: drive an Android app through adb.
- Errors: error codes and exit codes.
- Commands: every built-in command.
- Agent HTTP API: the contract between the agent and its clients.
- Built-in commands: what every command does, to implement it in another agent.
- Drivers: how the CLI runs commands in the app or on the simulator, and how to add a driver.
- The Android agent's contract files: how the Kotlin agent stays in step with the Swift side.
- Contributing