diff --git a/bootstrap.sh b/bootstrap.sh index 78c7439..b6abeaf 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -4,6 +4,7 @@ set -uo pipefail STEP_NAMES=() STEP_STATUS=() STEP_DETAIL=() +KNOWN_HOSTS=() step_ok() { STEP_NAMES+=("$1"); STEP_STATUS+=("OK"); STEP_DETAIL+=("${2:-}"); echo "[OK] $1"; } step_skip() { STEP_NAMES+=("$1"); STEP_STATUS+=("SKIPPED"); STEP_DETAIL+=("${2:-}"); echo "[SKIPPED] $1 - ${2:-}"; } @@ -27,6 +28,30 @@ print_summary() { exit 1 fi echo "All steps OK or already satisfied." + echo + echo "================== next steps ======================" + echo "1. Check you're actually on the tailnet:" + echo " tailscale status" + echo + if [ "${#KNOWN_HOSTS[@]}" -gt 0 ]; then + echo "2. Open VS Code, Ctrl+Shift+P -> 'Remote-SSH: Connect to Host...'," + echo " and pick one of the hosts this run found on your tailnet:" + for h in "${KNOWN_HOSTS[@]}"; do + echo " - $h" + done + echo " (a host you expect but don't see here just isn't on the tailnet" + echo " right now - check it's powered on and connected, then re-run" + echo " this script to refresh the list)" + else + echo "2. No other tailnet peers were found yet. Once your home machine is" + echo " online and joined to the tailnet, re-run this script to add it," + echo " then use VS Code's 'Remote-SSH: Connect to Host...' to reach it." + fi + echo + echo "3. Once connected, File > Open Folder to browse that machine's" + echo " filesystem and get to your project - same as opening a folder" + echo " locally, just on the remote host." + echo "=====================================================" } # ---------- phase 0: environment ---------- @@ -227,6 +252,7 @@ EOF ) while read -r name dns; do [ -z "$name" ] && continue + KNOWN_HOSTS+=("$name") new_block+=$(cat <