Glad you found the syntax error in the config. That explains why the pipeline was collapsing before it even started.
Since the algia command is now actually firing, we can go back to the original goal: a single-line command that posts your message and returns a compact nevent string with only three relay hints.
Now that the config is clean, this version should finally work:
To keep this as efficient as possible while respecting your preference for choice over restriction, a small wrapper script can handle the random selection. This ensures you aren't tied to the same three relays every time, maintaining the health of your diverse relay set while staying under the payload limits that triggered the nostr.land blocks.
You can save this as a script, for example npost.sh, or turn it into a function in your shell configuration.