FrankWiles.com

Navigating Tons of Github Repos

Are you part of a dozen or more Github Orgs?

Do you have access to hundreds of Github repos?

Probably not, BUT IF YOU DO, I built a new little tool for you gg.

Ok, I built it for me 🤣, but you can use it too!

TL;DR

Here’s what gg does for you.

  1. It scans all of the Github Orgs you’re a part of, along with your own personal org, and collects all of the names of the repos in a small sqlite3 database locally on your computer.
  2. Provides fzf-like fuzzy searching of this info to quickly narrow down to the repo or organization you’re after
  3. Makes it super fast to navigate to that item’s Github URL, or it’s Issues, or Pull Requests, or Actions, and/or Milestones.
  4. Even without the database running one of the sub-commands, such as gg issues while in the folder structure of a git repo, it will inspect your remote and take you where you want to go.

Motivation

I’m constantly bouncing between projects. It’s not uncommon for me to need to poke around in a dozen or more different repos in a given work day. I realize this is not everyone’s usual day.

I also often structure my checkouts by client, as many people end up with an ops, devops, or gitops repo for example.

I need to get to their Issues, Actions, or Pull Requests *ALL THE TIME and shaving a couple of mouse clicks, keystrokes, and seconds off each of these interactions removes a speedbump for me.

I also felt like building something in Rust this weekend 😀.

Search Screenshot

If you run gg without a sub-command it launches into a super fast TUI and let’s you narrow down your search with smart fuzzy matching while also taking into account the frequency you interact with the repos when using gg. So it gets a bit smarter over time.

Image of gg's TUI screen showing a list of github repositories

Typing django-t limited my list of, at the moment 453 repos in 23 orgs down to a managble list.

I can then navigate up and down with my arrow keys to pick a specific one. Then I can:

Get there faster

Let’s suppose you’re sitting in ~/src/work-project-1/frontend/src/components/ and you want to create a new Issue before you forget it about, but you think it might exist already.

You can launch a new browser tab, type in github.com, wait for it to load, click into the Search box and go look for it. Or you can use the gh CLI tool, but I find it’s UX to be hard to remember when I can or cannot use --web.

Now I can just gg issues or gg i<tab><enter> and launch right into the Issues web page.

Or I can do gg pulls to get to the Pull Requests or gg milestones or to look at all of the recent actions with gg actions.

Action Jackson

Looking at the currently running or the most recent action run for the branch I’m sitting on is something I need to do ALL THE TIME. So I made a special command for it.

gg watch action will take you not to the full list of Actions for you to dig around in, but takes you to /actions/runs/20888290469 or whatever the correct Workflow Run. that is most recent is for your branch.

Useful aliases

If you do find gg useful, I suggest setting up the following aliases to remove a few more keystrokes from the process:

shell
# gg aliases https://github.com/frankwiles/gg/
alias ggi='gg issues'
alias ggm='gg milestones'
alias gga='gg actions'
alias ggp='gg prs'

Installation

Piqued your interest? Great! Right now you have to install it via cargo, but if this gets useful I’ll see about adding it to Homebrew and similar places.

To install run:

shell
$ cargo install gg-github

Or you can download pre-built binaries for Windows, Linux, and OSX from Github and toss them into your $PATH.

Going forward

I’ve built myself a little Raycast extension that allows me to search and do these same sorts of actions with a shell. I will probably publish it at some point if gg seems to be popular with folks.

If you run into any bugs or have suggestions on how to improve gg I’d be interested in hearing about them.

Hope you find my little afternoon of Rust useful!

Headshot of Frank Wiles

Frank Wiles

Founder of REVSYS, Django Steering Council, PSF Fellow, and former President of the Django Software Foundation .

Expert in building, scaling and maintaining complex web applications. Want to reach out? Contact me here or use the social links below.

Infrequent Insights

Join my newsletter!

Get the occasional email from me when I write something new.

Ask Frank Anything

Struggling with architecture decisions or team dynamics? Ask me any tech, business process, or entrepreneurial question, and I'll do my best to help!

Submit a Question