Skip to content

About

Chat with Claude from your Apple Watch using your Claude Pro/Max subscription — no API key. A tiny Node relay on your Mac or homelab runs headless Claude Code; the SwiftUI watch app adds conversation history and remaining usage gauges.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

10 Commits

Folders and files

Repository files navigation

claude-watchOS

Chat with Claude from your Apple Watch on your Claude subscription (Pro/Max), with no API key.

The watch app talks to a tiny relay server that runs headless Claude Code (claude -p) on a machine you own: your Mac, or a Linux box in your homelab.

Apple Watch app ──HTTPS (Tailscale Funnel) or LAN──▶ host: server/server.ts ──▶ claude -p --resume <id>

App on the watch home screen Home screen with usage gauges and conversations Chat screen

Features

  • Chat from the watch keyboard, Scribble or dictation.
  • Conversation history: every conversation is stored on the host (server/session/history/) and can be reopened and continued.
  • Remaining subscription usage (5-hour session and weekly) with reset times, read from Claude Code's own login.
  • Ask about photos taken on the iPhone: an iPhone Shortcut uploads each new photo to the host, and the chat's "Fotos del iPhone" grid lets you attach one (see Photos from the iPhone).

Chat only, by design

The relay runs Claude Code with all tools disabled (--tools "", no MCP servers, no settings) and a plain chat system prompt. Claude can answer questions, but it cannot run commands, read files or change anything on the host, even if someone gets your token.

Requirements

  • Host (the machine running the relay): Claude Code logged in to a Claude subscription, and Node 24+. macOS or Linux. For iPhone photos, also ImageMagick with HEIC support (convert; set IMAGEMAGICK=magick for ImageMagick 7).
  • Build Mac: Xcode and XcodeGen, to install the watch app.
  • Apple Watch with Developer Mode on. If Xcode does not list the watch, check that the Mac's Bluetooth is on.

Layout

server/                    Node relay (no dependencies)
  server.ts                HTTP routes, auth (composition root)
  claude-cli.ts            Runs `claude -p` and serializes calls
  conversation-store.ts    Conversation history as JSON files
  usage-client.ts          Subscription usage from the OAuth usage endpoint
  photo-converter.ts       iPhone originals (HEIC…) → watch thumbnails and Claude-ready JPEGs, via ImageMagick
  upload-janitor.ts        Deletes old photos, including their copies in Claude Code's session transcripts
watch/                     watchOS app (SwiftUI), project generated by XcodeGen
  project.yml
  ClaudeWatchOS/           Views, view models, models and ChatService
setup.sh                   Creates the token and watch/ClaudeWatchOS/Config.swift, generates the Xcode project
tools/elite/
  renew-watch-app.sh       Re-signs and reinstalls the app over Wi-Fi from a Linux host (see below)

Setup

  1. Pick how the watch reaches the host (the watch cannot run a VPN, so it needs a public URL or the same LAN):
    • Anywhere (Tailscale Funnel): on the host, install Tailscale, log in and run tailscale funnel --bg 8787. Server URL: https://<host>.<tailnet>.ts.net.
    • LAN only: server URL http://<host-lan-ip>:8787, and start the server with HOST=0.0.0.0.
  2. On the build Mac, run ./setup.sh <server-url>. It creates server/token.txt and watch/ClaudeWatchOS/Config.swift (both git-ignored) and generates watch/ClaudeWatchOS.xcodeproj. The signing team is taken from $DEVELOPMENT_TEAM or, if unset, from your "Apple Development" certificate.
  3. If the host is another machine, copy server/ there, including token.txt.
  4. Start the relay on the host: cd server && node server.ts (or HOST=0.0.0.0 node server.ts for LAN).
  5. Open watch/ClaudeWatchOS.xcodeproj, pick your watch and Run. With a free Apple ID the app expires after 7 days; run it again from Xcode.

Automatic 7-day renewal from Linux, over Wi-Fi (experimental)

A free Apple ID profile lasts 7 days. Instead of re-running Xcode, the relay host can re-sign and reinstall the app itself, with no Mac and no cable, using a watchOS-enabled xtool (based on xtool PR #350) and pymobiledevice3. Tested on an Apple Watch Series 7 (watchOS 26.6, arm64_32) paired with an iPhone on iOS 27.2, from Ubuntu 24.04.

How it works: the host opens a RemoteXPC Wi-Fi tunnel to the iPhone, reaches the Watch through the iPhone's companion_proxy, signs a fresh copy with xtool dev sign-watch and installs it as a developer install (streaming_zip_conduit). Installing through an iOS stub app does not work with a free account: watchOS rejects free-profile apps from that source.

One-time setup on the host, with the iPhone plugged in by USB once:

  1. Trust the host on the iPhone (pymobiledevice3 lockdown pair), then the host on the Watch (watch_device.py --pair).
  2. Create the Wi-Fi pairing record: pymobiledevice3 lockdown remotepairing --pair.
  3. xtool auth with the same Apple ID as Xcode. A free account allows one development certificate, so share the Mac's certificate and key with xtool instead of letting either side revoke the other's.
  4. Copy the Mac-built ClaudeWatchOS.app to the host and run tools/elite/renew-watch-app.sh from a systemd timer (IPHONE_UDID must be set). It renews when 2 days or less remain; FORCE=1 renews now.

The Wi-Fi tunnel needs Python 3.13+ (iOS 18.2+ only offers TCP tunnels) and root for its TUN interface.

Photos from the iPhone

The watch cannot see the iPhone's photo library, so the iPhone pushes new photos to the host:

  1. Create a Shortcut on the iPhone: Get Latest Photos (1) → Base64 Encode (line breaks: none) → Get Contents of URL POST <server-url>/photos, header Authorization: Bearer <token>, JSON body {"photo": <Base64 Encoded>}. Send JSON, not the raw file: raw bodies from automations arrive chunk-framed through Tailscale Funnel and are rejected.
  2. Add a personal automation: App → Camera → Is Closed → Run Immediately → that Shortcut.
  3. On the watch, in a chat, tap Fotos del iPhone and pick a photo; the watch sends only its id.

The host keeps the original as uploaded (deduplicated by content hash) for 1 day, and gives Claude a JPEG of at most 1568 px. Photos sent in a chat stay in Claude Code's transcript for 2 days, then are replaced by a placeholder. Known limit: locking the iPhone right after leaving the Camera can cancel the upload.

Running the relay on a MacBook

A MacBook sleeps when the lid closes. To keep it awake: sudo pmset -a disablesleep 1, and undo it with sudo pmset -a disablesleep 0. It needs internet (for example an iPhone hotspot) and gets warm in a closed bag. An always-on homelab host avoids this.

Server API (Bearer token)

  • POST /chat {text, conversationId?, photoId?} → {reply, conversationId}
  • POST /photos {photo: base64} (or the raw JPEG/PNG/HEIC body) → {ok, duplicate?}
  • GET /photos → [{id, takenAt}] from the last day, newest first; GET /photos/:id → {thumbnail} (base64 JPEG)
  • GET /conversations, GET /conversations/:id
  • GET /usage → {session, weekly} with usedPercent and resetsAt

Disclaimer

Personal project, not affiliated with or endorsed by Anthropic or Apple. It drives your own Claude Code login for your own use; use it within Claude's terms of service.

License

MIT

About

Chat with Claude from your Apple Watch using your Claude Pro/Max subscription — no API key. A tiny Node relay on your Mac or homelab runs headless Claude Code; the SwiftUI watch app adds conversation history and remaining usage gauges.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages