Loading...
Loading...
GitHub CLI for remote repository analysis, file fetching, codebase comparison, and discovering trending code/repos. Use when analyzing repos without cloning, comparing codebases, or searching for popular GitHub projects.
npx skill4agent add tenequm/claude-plugins gh-cligh api repos/OWNER/REPO/contents/path/file.ts | jq -r '.content' | base64 -dgh api repos/OWNER/REPO/contents/PATHgh search code "pattern" --language=typescriptgh search repos --language=rust --sort stars --order descgh api repos/OWNER-A/REPO-A/contents/PATH > repo1.json
gh api repos/OWNER-B/REPO-B/contents/PATH > repo2.jsonpackages/explorerkit-idlsjq -r '.[].name' repo1.json > repo1-files.txt
jq -r '.[].name' repo2.json > repo2-files.txt
diff repo1-files.txt repo2-files.txtgh api repos/OWNER-A/REPO-A/contents/package.json | jq -r '.content' | base64 -d > repo1-pkg.json
gh api repos/OWNER-B/REPO-B/contents/package.json | jq -r '.content' | base64 -d > repo2-pkg.jsongh api repos/OWNER-A/REPO-A/contents/src/index.ts | jq -r '.content' | base64 -d > repo1-index.ts
gh api repos/OWNER-B/REPO-B/contents/src/index.ts | jq -r '.content' | base64 -d > repo2-index.ts# Most starred repos
gh search repos --sort stars --order desc --limit 20
# Trending in specific language
gh search repos --language=rust --sort stars --order desc
# Recently popular (created in last month)
gh search repos "created:>2024-10-01" --sort stars --order desc
# Trending in specific topic
gh search repos "topic:machine-learning" --sort stars --order desc# Find popular implementations
gh search code "function useWallet" --language=typescript --sort indexed
# Find code in popular repos only
gh search code "implementation" "stars:>1000"
# Search specific organization
gh search code "authentication" --owner=anthropics# Search across all repositories
gh search code "API endpoint" --language=python
# Search in specific organization
gh search code "auth" --owner=anthropics
# Exclude results with negative qualifiers
gh search issues -- "bug report -label:wontfix"# Find open bugs
gh search issues --label=bug --state=open
# Search assigned issues
gh search issues --assignee=@me --state=open| Field | | |
|---|---|---|
| Stars | | |
| Forks | | |
# ✅ Correct for gh repo view
gh repo view owner/repo --json stargazerCount,forkCount
# ✅ Correct for gh search repos
gh search repos "query" --json stargazersCount,forksCount-label:bug--gh search issues -- "query -label:bug"