If you don't want to use qjackctl to manage your connection to this metronome you are in for an adventure.
As noted above, you will likely use "jack_connect". To use this you will also probably need "jack_disconnect" and "jack_lsp"
That's just the start. The jack_metro command runs until you stop it. If you try to write a script that starts jack_metro THEN tries jack_connect it will wait until you QUIT jack_metro to make the connection. Probably not what you have in mind.
If, as your link somewhat suggests, you are on Linux, you can use "process ID" (PID) info in a bash (or other) script to "detach" the metronome, catch the PID, set up the connection, wait for some sort of "stop me now" signal, use jack_disconnect, run jack_disconnect, and be done. If things go well, jack_metro will finish starting before you try to connect to it. If not you get to learn about adding delays into your script.
To keep a burgeoning script simpler you can run jack_lsp once you have an instance of the metronome running and see what connections you can make. The names are unlikely to change between uses. But the metronome name WILL go away as soon as the metronome does (makes sense.)
There are long bash and other script tutorials out there to help you along, all by people better at it than I.