Couldn’t resist figuring this out. You can run scripts over ssh with Shortcuts and iOS:
The script on the receiving end:
#!/opt/homebrew/bin/bash
url=${1)
/opt/homebrew/bin/nb ${1}
Tailscale makes this kind of thing easier. (And yes, use an ssh key.)