On macOS you can store secrets in Keychain and then retrieve them with a command (using biometrics by default, or without biometrics if you so wish). The most obvious example is to hook `sudo` up to biometrics using `sudo -A` and askpass to tetris the secret (password).