← robert kirsammer
project en de

02 — public · macos · android

Legion Control

Remote control for the machines on your desk, from the menu bar of a Mac or from a phone — without walking over to them.

1
ssh round trip per action
15 min
update cycle, busy‑gated
2
apps, one agent
how it fits together

Three pieces and one contract, with nothing between them but ssh: an agent in plain Node on every system, a SwiftUI menu‑bar app on the Mac, and an Android port that carries its own ssh client. Every action is exactly one ssh round trip that prints one JSON object and exits. No daemon, no open port, no credential store, no polling service.

The apps don’t know which system of a dual‑boot machine is up, and don’t need to: they try the remembered system’s command shape first and fall back to the others. Only the running system has the interpreter and the script at its path, so a wrong guess costs one extra round trip and never a wrong answer.

busy detection

Every disruptive action — update, restart, boot, sleep — asks one question first: would stopping this lose work? For T3 Code the agent reads the server’s own state database and counts running turns and pending approvals. The rule is fail closed: if a probe can’t be read, the machine counts as busy, and interrupting is always a decision someone made.

boot switching

A dual‑boot machine is switched by arming the firmware for one boot and rebooting: efibootmgr on Linux, bcdedit on Windows, grub‑reboot for GRUB users. Arming is read back and verified before anything reboots.