app
Session Monitor
Public Made by Adomby adom
Drive your Claude Code sessions from your phone — every container's sessions in one board. Talk to any of them by voice or text, pick the model per session, and get a push when a session asks a question or is ready for you. Install this CLI to hook a container in and manage its keeper.
#!/usr/bin/env bash
# adom-wiki pkg install hook for session-monitor-cli. Drops the `session-monitor`
# command on your PATH plus the keeper runtime it drives.
set -uo pipefail
HERE="$(cd "$(dirname "$0")" && pwd)"
DEST="$HOME/.session-monitor-cli"
BIN="$HOME/.local/bin"
mkdir -p "$DEST" "$BIN"
cp "$HERE/session-monitor" "$HERE/keeper.py" "$HERE/setup.sh" "$HERE/stop.sh" "$DEST/"
chmod +x "$DEST/session-monitor" "$DEST/"*.sh
ln -sf "$DEST/session-monitor" "$BIN/session-monitor"
echo "✓ session-monitor CLI installed"
# If a keeper daemon is already hooked up on this container, swap it to THIS
# version too — so `adom-wiki pkg install` fully updates (not just the CLI on
# PATH, but the live keeper that actually reports to your board). Without this,
# a stale daemon keeps reporting old-shape data even after you "install latest",
# leaving that container's sessions looking week-behind on the board.
if [ -f "$HOME/.session-keeper/env" ] && [ -f "$HOME/.session-keeper/keeper.py" ]; then
# shellcheck disable=SC1091
set -a; . "$HOME/.session-keeper/env" 2>/dev/null || true; set +a
if [ -n "${SM_SERVICE_URL:-}" ]; then
echo " a keeper is already running here — updating it to this version…"
if bash "$DEST/setup.sh" "$SM_SERVICE_URL" "${SM_TOKEN:-}" >/dev/null 2>&1; then
echo " ✓ running keeper updated + restarted"
else
echo " ! couldn't auto-restart the keeper — run: session-monitor keeper start"
fi
fi
fi
echo " Hook this container in: session-monitor keeper start --token <YOUR_TOKEN>"
case ":$PATH:" in
*":$BIN:"*) ;;
*) echo " NOTE: add ~/.local/bin to PATH — e.g. export PATH=\"\$HOME/.local/bin:\$PATH\"";;
esac