docs: BUILD.md — fix pair command, use GET /pair-qr endpoint
This commit is contained in:
parent
91baac5420
commit
ad95ea3efd
|
|
@ -72,14 +72,24 @@ xcrun devicectl device process launch \
|
||||||
|
|
||||||
## 5. Pair the iOS app with the sidecar
|
## 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
|
```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://<SIDECAR_URL>/pair-qr?token=<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
|
Scan the QR code with the iPhone app. App stores the bearer token in Keychain
|
||||||
and connects automatically.
|
and connects automatically.
|
||||||
|
|
||||||
|
Note: CLI `index.ts` requires pi's TypeScript runtime — use the HTTP endpoint above instead.
|
||||||
|
|
||||||
## 6. One-liner: build + install + launch
|
## 6. One-liner: build + install + launch
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue