hammer drives an app that runs the Hammer agent, from a Mac, or from Linux for Android apps. It sends real touches and key presses from inside the app, so it works for scripts, quick checks and AI agents alike.
Each release has a prebuilt hammer for macOS:
mkdir -p ~/.local/bin
curl -fsSL https://github.com/lyft/Hammer/releases/latest/download/hammer-macos.zip -o /tmp/hammer-macos.zip
unzip -o /tmp/hammer-macos.zip -d ~/.local/binOn Linux, which drives Android only, take the build for your CPU, x86_64 or aarch64:
mkdir -p ~/.local/bin
curl -fsSL https://github.com/lyft/Hammer/releases/latest/download/hammer-linux-x86_64.tar.gz | tar -xz -C ~/.local/binFrom a checkout of this repo you can use swift run hammer instead.
With the app running in the simulator, see what is on screen:
hammer describeIt prints the elements on screen as JSON, each with a ref such as e12, its identifier, label, value, traits, frame and whether touches reach it (hittable). Then act on an element and check the result:
hammer tap --identifier sign_in
hammer type-text --identifier email --text "me@example.com"
hammer wait-for --identifier home_title --condition visible
hammer screenshot --output screen.pnghammer commandslists every command the app runs, including the ones it adds.hammer help <command>shows a command's arguments and examples.hammer guideprints a markdown guide for AI agents, with the workflow and every command.
These work without the app running, showing only the built-in commands.
- Targeting elements: refs, identifiers, labels and points.
- Live editing: try view changes in the running app.
- MCP server: give an AI agent the commands as tools.
- Errors: what failures look like and how to handle them.
- Commands: every built-in command.