That’s really cool! I know some regex and I tried to learn vim regex, only to find out it’s a rabbithole so deep I’m afraid to look into. The feeling when you press enter and your carefully crafted regex does exactly what it’s supposed to do is awesome though. Good luck!
I’m not sure about the exact commands, but you do something like gh auth login to authenticate the CLI and then something like gh ssh setup to change ssh’s config file to authorize using the GH CLI.