diff --git a/docs/BUILD.md b/docs/BUILD.md index 67953a7..0d02ee2 100644 --- a/docs/BUILD.md +++ b/docs/BUILD.md @@ -72,14 +72,24 @@ xcrun devicectl device process launch \ ## 5. Pair the iOS app with the sidecar -Run on Mac (sidecar must be running): +Run on Mac (sidecar must be running), with the token from step 1: ```bash -node /Users/jay/.pi/agent/git/git.vpsj.de/jay/pi-remote-control/extensions/remote-control/cli/index.js pair +# Get the token from the sidecar URL, then: +curl -s "http:///pair-qr?token=" +``` + +Or one-liner (reads token from tmux pane automatically): +```bash +TOKEN=$(tmux capture-pane -t pi-sidecar -p | grep -o 'token=[^ ]*' | head -1 | cut -d= -f2) && \ +SIDECAR=$(tmux capture-pane -t pi-sidecar -p | grep -o 'http://[^ ]*' | head -1 | sed 's/?.*//') && \ +curl -s "$SIDECAR/pair-qr?token=$TOKEN" ``` Scan the QR code with the iPhone app. App stores the bearer token in Keychain and connects automatically. +Note: CLI `index.ts` requires pi's TypeScript runtime — use the HTTP endpoint above instead. + ## 6. One-liner: build + install + launch ```bash