Files
saphidandClaude Opus 5.5 1f6115b789 Steam Frame from a Mac: research docs and helper scripts
README with the minimum-typing checklist (Developer Mode toggle + Set User
Password; the rest runs from the Mac), docs for SSH, streaming, file
transfer, and open questions with sourced confidence levels, plus Mac-side
zsh helpers and a fallback headset bootstrap.

Scripts are UNTESTED against hardware: checked with zsh -n / bash -n /
shellcheck only. Two SWE-2 Max read-only review passes (devin -p --model
swe-2-max); verified findings fixed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 15:38:43 +10:00

32 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env zsh
# Mac-side (fallback only): serve bootstrap-on-frame.sh over plain HTTP on the
# LAN, with this Mac's Frame public key embedded, and print the short
# one-liner to type in Konsole on the headset. Ctrl-C to stop.
#
# UNTESTED against real hardware. Serves only a public key; use on a trusted LAN.
set -euo pipefail
PORT=${PORT:-8765}
here=${0:A:h}
KEY="$HOME/.ssh/id_ed25519_frame"
if [[ ! -f "$KEY.pub" ]]; then
mkdir -p "$HOME/.ssh" && chmod 700 "$HOME/.ssh"
ssh-keygen -q -t ed25519 -N '' -C "mac->steam-frame" -f "$KEY"
fi
pub=$(<"$KEY.pub")
dir=$(mktemp -d)
trap 'rm -rf "$dir"' EXIT
# index.html so the bare URL works; curl doesn't care about the name.
sed "s|__PUBKEY__|$pub|" "$here/bootstrap-on-frame.sh" > "$dir/index.html"
name="$(scutil --get LocalHostName 2>/dev/null || hostname -s).local"
ip=$(ipconfig getifaddr en0 2>/dev/null || ipconfig getifaddr en1 2>/dev/null || true)
print "Type ONE of these in Konsole on the Frame:"
print " curl -fsS $name:$PORT|bash"
[[ -n "$ip" ]] && print " curl -fsS $ip:$PORT|bash"
print "Serving from $dir on port $PORT (Ctrl-C to stop)..."
python3 -m http.server "$PORT" --directory "$dir"