setup-ssh-key sets up SSH keys simply and safely on macOS.
It does this by creating new SSH keys, encrypting them with random passphrases, and saivng those passphrases in the macOS keychain.
Install "setup-ssh-key" somewhere convenient.
To generate the default "id_ed25519":
setup-ssh-key
To generate a key named something differently, e.g. "work_ed25519" for work use:
setup-ssh-key work
To generate a key of a different type, e.g. "rsa" because Azure DevOps requires it for some reason:
setup-ssh-key -t rsa
If you really need the passphrase, for example, if you are saving the generated key elsewhere because this key is your only way into a system, and you want it to be output to stdout as well as saved into the keychain:
setup-ssh-key -p