another option is in an env variable (from an encrypted file).
gpg -d ~/secrets/nuclear_launch_codes.gpg
source ~/secrets/nuclear_launch_codes
where the gpg key has a password and is stored on a hardware dongle that doesn't allow copying the private key off. If you really want to be fancy, there are some hardware security keys that also require a biometric to confirm.
The other option is something like Hasicorp Vault, but we're way out of "one line bash" territory :p