DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to script a phone task in Python with Phone Harness

Pipe a short script of helper calls into Phone Harness to open an app, tap and type.

Short answer: Run phone-harness config set platform ios|android to pick the default phone; then run phone-harness <<'PY' and in the script call open_app("Notes"), tap_text("New Note") and type_text("hello from the harness"); Print the screen text with print([o["text"] for o in screen()][:10]). All steps.

Who it is forA tester who wants to repeat the same steps in the Notes app.

The problemManual tapping through the same flow wastes time.

The outcomeA note typed on the phone and the first screen texts printed.

What you need first

  • An iPhone with iPhone Mirroring on macOS 15 or newer, or an Android with adb and USB debugging
  • A coding agent such as Claude Code or Codex
  • uv with Python 3.12

Steps

  1. Run phone-harness config set platform ios|android to pick the default phone
  2. Run phone-harness <<'PY' and in the script call open_app("Notes"), tap_text("New Note") and type_text("hello from the harness")
  3. Print the screen text with print([o["text"] for o in screen()][:10])
  4. End the heredoc with PY

Prompt for your agent

Using phone-harness, write the heredoc script that opens Notes, taps New Note, types a line and prints the first 10 screen texts.

Caveat. The README notes OCR sees text, not icons, and there is no multi-touch.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for phone-harness/phone-harness and "Script a phone task in Python"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer