age is prefered over pgp. The keydir is different depending on os. for macos:
KEYDIR=${HOME}/Library/Application\ Support/sops/age/
mkdir -p ${KEYDIR}
# note this can be set with SOPS_AGE_KEY_FILE= to a different location if required
# note this has to be keys.txt not key.txt
age-keygen -o ${KEYDIR}/keys.txt
cat keys.txt
# created: 2021-04-13T10:41:17+01:00