From ad95ea3efd8ef0ebc6b77812bf279f8fd2ff61e0 Mon Sep 17 00:00:00 2001 From: jay Date: Sat, 16 May 2026 02:56:20 +0200 Subject: [PATCH] =?UTF-8?q?docs:=20BUILD.md=20=E2=80=94=20fix=20pair=20com?= =?UTF-8?q?mand,=20use=20GET=20/pair-qr=20endpoint?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/BUILD.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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