VM Board
Your VMPal VMs with Start, Stop, Open and a Peek screenshot, from your Mac. For your iPhone, turn on Show on my iPhone and Sync to My Devices: it starts, stops and peeks at VMs via your Mac.
by MArk · Version 2 · Updated 2 hours ago
- Price
- Free
- Works on
- Mac · iPhone (as a card)
- Permissions
- 12
What it does
-
Lives where you glance
Menu bar, TailApps Dock, Dashboard, a floating window, and a card on your iPhone.
-
Talks to your other devices
Turn on Sync to My Devices and its messages travel end-to-end encrypted.
-
Stays up to date
Runs its script list.sh on your Mac every 10 seconds
-
Stays up to date
Runs its script peek.sh on your Mac every 30 seconds
-
Stays up to date
Updates when something is sent to its inbox shared
-
Stays up to date
Updates when something is sent to its inbox ask
-
Stays up to date
Updates when something is sent to its inbox done
-
Stays up to date
Updates when something is sent to its inbox peek
-
Asks you to set up
Show on my iPhone
What it may do
TailApps shows this list before installing and asks you once. The card can do nothing else.
-
Run its script list.sh
script:list.sh
-
Run its script control.sh
script:control.sh
-
Run its script peek.sh
script:peek.sh
-
Open links
open:url
-
Receive events sent to its inbox shared (from your hooks, webhooks or other devices)
inbox:shared
-
Send to its copies on your other devices (when you turn on Sync to My Devices)
send:shared
-
Receive events sent to its inbox ask (from your hooks, webhooks or other devices)
inbox:ask
-
Send to its copies on your other devices (when you turn on Sync to My Devices)
send:ask
-
Receive events sent to its inbox done (from your hooks, webhooks or other devices)
inbox:done
-
Send to its copies on your other devices (when you turn on Sync to My Devices)
send:done
-
Receive events sent to its inbox peek (from your hooks, webhooks or other devices)
inbox:peek
-
Send to its copies on your other devices (when you turn on Sync to My Devices)
send:peek
Scripts
Everything it runs is here to read before you install.
control.sh
#!/bin/sh
# Start, stop or show (bring forward) the VMPal VM with ID $2 ($3 is its name, for the message).
# Always prints {"ok":…,"message":…} and exits 0, so the card (and the iPhone) can say what happened.
# Stop shuts the VM down as its own Shut Down does.
app=/Applications/VMPal.app/Contents/Helpers/VMPalMachine.app/Contents/MacOS/VMPalMachine
cmd=$1
id=$2
name=${3:-$2}
fail() { jq -nc --arg m "$1" '{ok: false, message: $m}'; exit 0; }
case "$cmd" in
start) past="Started" ;;
stop) past="Shut down" ;;
show) past="Opened" ;;
*) fail "Unknown command: $cmd" ;;
esac
case "$id" in
""|-*) fail "Pick a VM" ;;
esac
if command -v vmpal >/dev/null 2>&1; then set -- vmpal
elif [ -x "$app" ]; then set -- "$app" --cli
else fail "VMPal is not installed on this Mac"; fi
err="${TMPDIR:-/tmp}/vm-board-control.err"
if "$@" "$cmd" "$id" >/dev/null 2>"$err"; then
jq -nc --arg m "$past $name" '{ok: true, message: $m}'
else
fail "$(head -n 1 "$err" | sed 's/^vmpal: //')"
fi
list.sh
#!/bin/sh
# VMPal's VMs as JSON: {"vms":[{id,name,system,state,agent}], "running": N, "choices": [...]},
# or with "missing" / "error". "choices" are the running VMs for Peek's picker.
# Uses the vmpal command, or VMPal's own copy of it when the command isn't installed. Changes nothing.
app=/Applications/VMPal.app/Contents/Helpers/VMPalMachine.app/Contents/MacOS/VMPalMachine
if command -v vmpal >/dev/null 2>&1; then set -- vmpal
elif [ -x "$app" ]; then set -- "$app" --cli
else echo '{"missing":true,"vms":[],"running":0,"choices":[]}'; exit 0; fi
err="${TMPDIR:-/tmp}/vm-board-list.err"
if ! out=$("$@" list --json 2>"$err"); then
jq -nc --rawfile e "$err" '{vms: [], running: 0, choices: [], error: ($e | split("\n")[0] | sub("^vmpal: "; ""))}'
exit 0
fi
printf '%s' "$out" | jq -c '{
vms: [.vms[] | {id, name, system, state, agent: .agentControl}],
running: ([.vms[] | select(.state == "running")] | length),
choices: ([{label: "First running VM", value: ""}] + [.vms[] | select(.state == "running") | {label: .name, value: .id}])
}'
peek.sh
#!/bin/sh
# A screenshot of the VMPal VM with ID $1 (the first running VM when empty), for the Peek tab.
# $2 is "true" to take one now; anything else prints {"paused":true} (Live is off).
# Prints {"vm","path","at"} or {"vm","error"}. Needs the VM's agent control (on by default).
# If the guest's display is asleep, VMPal wakes it with a press of Shift.
id=$1
[ "$2" = "true" ] || { echo '{"paused":true}'; exit 0; }
app=/Applications/VMPal.app/Contents/Helpers/VMPalMachine.app/Contents/MacOS/VMPalMachine
fail() { jq -nc --arg vm "$1" --arg e "$2" '{vm: $vm, error: $e}'; exit 0; }
if command -v vmpal >/dev/null 2>&1; then set -- vmpal
elif [ -x "$app" ]; then set -- "$app" --cli
else fail "" "VMPal is not installed on this Mac"; fi
case "$id" in -*) fail "" "Pick a VM" ;; esac
# The VM's name for the caption; with no ID, the first running VM.
vm=$("$@" list --json 2>/dev/null | jq -r --arg id "$id" \
'[.vms[] | select(if $id == "" then .state == "running" else .id == $id end)][0] | select(.) | "\(.id)\t\(.name)"')
[ -n "$vm" ] || { [ -z "$id" ] && fail "" "No VM is running"; fail "" "That VM isn't in VMPal any more"; }
id=${vm%%" "*}
name=${vm#*" "}
# The card's own tmp folder (the parent of this run's $TMPDIR): the card can show the picture and send it to
# your iPhone from there, and TailApps empties it after a day. A Trusted run has no $TMPDIR: caches instead
# (the Mac shows it, but it can't go to the iPhone).
if [ -n "$TMPDIR" ]; then dir=$(dirname "$TMPDIR"); else dir="$HOME/Library/Caches/TailApps VM Board"; mkdir -p "$dir"; fi
# A new file each time, so a picture never changes under its caption; older ones go after 10 minutes.
find "$dir" -maxdepth 1 -name 'peek-*.jpg' -mmin +10 -delete 2>/dev/null
file="$dir/peek-$(date +%s)-$$.jpg"
err="${TMPDIR:-/tmp}/vm-board-peek.err"
if "$@" ui "$id" screenshot -o "$file" --max-width 960 >/dev/null 2>"$err"; then
jq -nc --arg vm "$name" --arg p "$file" --argjson at "$(date +%s)" '{vm: $vm, path: $p, at: $at}'
else
fail "$name" "$(head -n 1 "$err" | sed 's/^vmpal: //')"
fi
More in Developer
See all →CI run
The latest GitHub Actions run of a repo, job by job. Checks from your Mac with the GitHub CLI; for your iPhone too, turn on "Show on my other devices" there, then Sync to My Devices.
Claude Chat
Chat with Claude using your own Anthropic API key; messages go to api.anthropic.com. Mac only until Connections (keys) come to the iPhone; the conversation stays on this device.
Claude sessions
Your running Claude Code sessions: folder, working, done or waiting on you, and for how long. Fed by Claude Code hooks on your Mac; with Sync to My Devices it nudges your iPhone too.