gh-cli
SolidGitHub 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.
AI & Automation 37 stars
1 forks Updated 3 days ago MIT
Install
Quality Score: 86/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# GitHub CLI - Remote Analysis & Discovery
Remote repository operations, codebase comparison, and code discovery without cloning.
## When to Use
- Analyze repositories without cloning
- Compare codebases side-by-side
- Fetch specific files from any repo
- Find trending repositories and code patterns
- Search code across GitHub
## Quick Operations
### Fetch a file remotely
```bash
gh repo read-file path/file.ts --repo OWNER/REPO
```
`gh repo read-file` (preview) is the preferred path: it prints raw content, takes `--ref` for any branch/tag/commit, and handles large files. `--output PATH` writes to disk (`--clobber` to overwrite); `--json` returns metadata (`content, downloadUrl, encoding, gitSHA, gitUrl, htmlUrl, name, path, size, type, url`). Fall back to `gh api` where the command is unavailable:
```bash
gh api repos/OWNER/REPO/contents/path/file.ts -H "Accept: application/vnd.github.raw"
```
There is **no `base64decode` template function** - `--template '{{.content | base64decode}}'` fails with `function "base64decode" not defined`. To decode the default JSON response, pipe it:
```bash
gh api repos/OWNER/REPO/contents/path/file.ts --jq '.content' | base64 -d
```
The Contents API inlines only files up to **1MB**. Past that, `.content` is an empty string (`encoding: "none"`) and the pipe above silently prints nothing - use `read-file` or the raw `Accept` header instead.
### Terminal escape sequences (gh 2.97.0+)
`gh` refuses to print remote content containing ter...
Details
- Author
- tenequm
- Repository
- tenequm/skills
- Created
- 10 months ago
- Last Updated
- 3 days ago
- Language
- Python
- License
- MIT
Integrates with
Similar Skills
Semantically similar based on skill content — not just same category
AI & Automation Listed
gh
Use gh for GitHub repositories, issues, PRs, Actions, and APIs with explicit account and scope.
9 Updated today
fmind Code & Development Featured
github
GitHub CLI operations via `gh` for issues, PRs, Actions, releases, and REST/GraphQL API with `--json`/`--jq` parsing. Triggers on: "create an issue", "submit a PR", "check CI status", "why did CI fail", "merge a PR", or pasted GitHub URLs.
325 Updated 5 days ago
Mathews-Tom Code & Development Listed
github
当用户需要查询和操作 GitHub 或者提到 issue 等情况使用。使用 gh cli 进行仓库信息查询、文件读取、分支查看、Issue/PR 查询等操作
6 Updated yesterday
beixiyo