Using Github’s CLI to make onboarding Devs easier 🧘‍♂️

Nicholas Oxford

--

I added a video walkthrough: https://www.youtube.com/watch?v=fr999osksI4

During the pandemic, my teammates and I have worked hard on improving our onboarding process. When you are in person, you probably don’t even realize how clunky getting a developer up and running can be. Now we have easy-to-follow steps, but there was always one section that seemed to cause a headache. Connecting to Github With SSH.

If you have ever worked somewhere with 2FA in Github you’ve probably seen this screen:

While the process by itself isn’t too bad, it can feel like you are going headfirst into the deep end on your first day. Creating ssh keys based on the Edwards-curve Digital Signature Algorithm — scary. There has to be a better way!

When I learned about the Github Command Line Interface (CLI), I thought this is neat, and I made some trivial PRs with it’s nice terminal flow. However, when they released 2.0 with extensions, I thought I could improve at least one or two of our developer flows.

Well turns out I created two useless extensions. The first went and fetched latest in my submodule, then run git submodule update on my current directory. The problem with this is that all I needed to do was run

git config — global submodule.recurse true. 

The joys of life.

My next attempt was to automate this whole ssh-key gen workflow, which I did!

When I went to go test this, I learned something new. To run gh extension install xyz you first have to run gh auth login. Okay, I’ll do this! Well when I ran gh auth login, guessed what it did. It generated the ssh keys for me, and it was so easy.

While this is one of those things I wish I knew at the beginning of my day, before I learned shell scripting 101; I know tomorrow I can use this to improve our onboarding experience. With gh auth login && gh repo clone xyz/zyx I can get the developer exactly where I want them to be.

Maybe one day I’ll create a useful GitHub CLI extension, I’m thinking about automatically writing the descriptions of our QA pull requests. Or perhaps an extension that goes through your directories to find package.json and downloads all the dependencies for you. In the meantime check out what others are making!

Nicholas Oxford

--

--

Nicholas Oxford
Nicholas Oxford

No responses yet