| name | github |
| version | 0.3.0 |
| author | devclaw |
| description | Full GitHub integration via gh CLI — issues, PRs, releases, CI, search |
| category | development |
| tags | ["github","git","issues","pull-requests","repositories","ci","releases"] |
| requires | {"bins":["gh"]} |
GitHub
You have full access to GitHub using the gh CLI. Make sure gh auth status shows authenticated.
Setup
-
Check if installed:
command -v gh && gh --version
-
Install:
brew install gh
type -p curl >/dev/null || (sudo apt update && sudo apt install curl -y)
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
sudo apt update && sudo apt install -y gh
-
Auth:
gh auth login
vault_save github_token "ghp_..."
echo $GITHUB_TOKEN | gh auth login --with-token
Issues
gh issue list -R OWNER/REPO --limit 10
gh issue list -R OWNER/REPO --state closed --label "bug"
gh issue view NUMBER -R OWNER/REPO
gh issue create -R OWNER/REPO --title "TITLE" --body "BODY" --label "bug" --assignee "@me"
gh issue close NUMBER -R OWNER/REPO
gh issue comment NUMBER -R OWNER/REPO --body "Comment text"
gh issue list -R OWNER/REPO --json number,title,state,labels,assignees | jq '.'
Pull Requests
gh pr list -R OWNER/REPO --limit 10
gh pr list -R OWNER/REPO --state merged
gh pr view NUMBER -R OWNER/REPO
gh pr diff NUMBER -R OWNER/REPO
gh pr checks NUMBER -R OWNER/REPO
gh pr merge NUMBER -R OWNER/REPO --squash --delete-branch
gh pr create -R OWNER/REPO --title "TITLE" --body "BODY" --base main
CI / GitHub Actions
gh run list -R OWNER/REPO --limit 5
gh run list -R OWNER/REPO --workflow "ci.yml"
gh run view RUN_ID -R OWNER/REPO
gh run view RUN_ID -R OWNER/REPO --log-failed
gh run rerun RUN_ID -R OWNER/REPO --failed
Releases
gh release list -R OWNER/REPO --limit 5
gh release view --latest -R OWNER/REPO
gh release create TAG -R OWNER/REPO --title "TITLE" --notes "Release notes" --generate-notes
gh release upload TAG ./file.zip -R OWNER/REPO
Search & API
gh search repos "QUERY" --limit 10
gh search code "QUERY" -R OWNER/REPO --limit 10
gh api repos/OWNER/REPO/commits --paginate | jq '.[0:5] | .[].commit.message'
gh api repos/OWNER/REPO/contributors | jq '.[] | {login, contributions}'
Repo management
gh repo clone OWNER/REPO
gh repo fork OWNER/REPO
gh repo view OWNER/REPO
gh repo create NAME --public --description "DESC" --clone
Tips
- Always use
-R OWNER/REPO to target the correct repository.
- Use
--json flag for structured output, then filter with jq.
- Use
--limit to cap results and avoid overwhelming output.
- Check
gh auth status if you get permission errors.
- For large diffs, use
gh pr diff NUMBER | head -100.
Triggers
github, issue, pull request, PR, workflow, CI, release, create issue,
check repo, merge PR, check CI