3 ms·
I use the gh client quite heavily and tend to have most of the repos I'm interested in already cloned. Having said that, I had a quick go at making a one-liner
by petepete 6y ago
I use the gh client quite heavily and tend to have most of the repos I'm interested in already cloned.
Having said that, I had a quick go at making a one-liner for this from the terminal. Note, this is using HTTPie instead of cURL.
xdg-open $(http get https://api.github.com/orgs/your-org/repos | jq -r '.[].html_url' | fzf)
- JNRowe 6y agoGitHub's own gh tool is really useful for things like this, as its builtin api subcommand¹ performs authenticated requests. Using that you can also see private repos and GitHub Enterprise usage is pretty seamless. Just replace HTTPie, with `gh api <endpoint>`. ¹ https://cli.github.com/manual/gh_api https://cli.github.com/manual/gh_api
- petepete 6y agoI've used gh daily for months and didn't even realise it had an api subcommand! Fantastic, thanks.