2FA appears in Terminal/CLI -- in a login item

I’m not sure that I understand your question.

Maybe this comment will provide some information that can help you:

(however, please note that the script in the linked comment uses a bash shell, not zsh, so some of the required syntax may be different)