LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

gh-search

Search GitHub for repositories, code, issues, and more

TLDR

Search repositories
$ gh search repos [query]
copy
Search issues
$ gh search issues [query]
copy
Search pull requests
$ gh search prs [query]
copy
Search code
$ gh search code [query]
copy
Search commits
$ gh search commits [query]
copy
Search with filters
$ gh search repos [query] --language [python] --stars "[>100]"
copy

SYNOPSIS

gh search type query [options]

DESCRIPTION

gh search provides command-line access to GitHub's powerful search capabilities across repositories, code, issues, pull requests, and commits. It supports GitHub's full search syntax including qualifiers, filters, and boolean operators.Repository search enables finding projects by language, stars, topics, and other metadata. Code search indexes file contents across public repositories, useful for finding implementation examples. Issue and PR search support filtering by state, author, labels, and mentions.

PARAMETERS

--language lang

Filter by programming language (repos, code, issues, prs).
--stars range
Filter by star count (repos only; e.g. `>100`).
--owner user
Filter by repository owner.
--repo owner/repo
Filter by repository (code, issues, prs, commits).
--topic topic
Filter on topic (repos).
--license key
Filter based on license type (repos).
--sort field
Sort fetched results (e.g. stars, forks, updated).
--order asc|desc
Order of results (with --sort).
-L, --limit num
Maximum number of results (default 30).
--json fields
Output JSON with the specified fields.
-w, --web
Open search results in a browser.

SUBCOMMANDS

repos

Search repositories.
issues
Search issues.
prs
Search pull requests.
code
Search code.
commits
Search commits.

SEE ALSO

gh(1), gh-repo(1)

Copied to clipboard
Kai