gh-cli

Solid

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.

AI & Automation 37 stars 1 forks Updated 3 days ago MIT

Install

View on GitHub

Quality Score: 86/100

Stars 20%
53
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

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