I've had better luck with https://drop.lol/ - it allows local discovery but can also share a link (drop.lol/XXXXX) to invite a device to the "network". There have been a number of times/networks local peer discovery doesn't work for me, but maybe that's because I haven't installed the localsend app.
You write your prompt in any terminal, press alt-backslash and it'll give you a command which you can either refine or accept (or esc/ctrl-c out).