Last active
August 20, 2024 12:57
-
-
Save gabesullice/71302298db7d3fb4737efc2b326bbd3b to your computer and use it in GitHub Desktop.
Render all of a GitHub user's public repositories as a Markdown list
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
USER="$1" | |
gh api "/users/${USER}/repos?type=owner" \ | |
| jq -r '.[] | select(.private == false) | " - \(.name) (hosted at \(.html_url))"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage
First, install the GitHub CLI and the
jq
JSON processor.Then execute:
Once authenticated, run the script by passing a GitHub username as a command-line argument. For example:
The output should resemble: