GH-SEARCH(1)
π GH-SEARCH β the "search all of GitHub" era β¨
okay bestie, welcome to gh-search, straight out of the GitHub CLI manual π β this is the portal that lets you search for repositories, issues, and pull requests across all of GitHub. buckle up π¦
π SYNOPSIS
gh search <command> [flags]
π DESCRIPTION
Search across all of GitHub. yes, the whole thing. it's giving main character energy π
π Excluding search results that match a qualifier
So in a browser, the GitHub search syntax lowkey supports excluding results that match a search qualifier β you just prefix the qualifier with a hyphen. iconic. for example, if you wanted to search for issues that do not have the label "bug", you'd use -label:bug as a search qualifier β¨
gh supports this syntax in gh search too, but ngl it needs extra command line arguments, because the hyphen would otherwise get interpreted as a command line flag (rude of it, honestly) since it begins with a hyphen π
On Unix-like systems, you can use the -- argument to say "hey, the arguments that follow are not a flag, they're a query string." like so:
$ gh search issues -- "my-search-query -label:bug"
On PowerShell, you have to use both the --% argument and the -- argument to get the same effect. for example:
$ gh --% search issues -- "my search query -label:bug"
See the following for more information π«Ά
- GitHub search syntax: β¨https://docs.github.com/en/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#exclude-results-that-match-a-qualifierβ©
- The PowerShell stop parse flag
--%: β¨https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_parsing?view=powershell-7.5#the-stop-parsing-tokenβ© - The Unix-like
--argument: β¨https://www.gnu.org/software/bash/manual/bash.html#Shell-Builtin-Commands-1β©
β¨ AVAILABLE COMMANDS β¨
gh-search-code(1)β search within code π§gh-search-commits(1)β search for commits πgh-search-issues(1)β search for issues πΈgh-search-prs(1)β search for pull requests πgh-search-repos(1)β search for repositories β
πͺ EXIT CODES πͺ
0β successful execution π1β error π2β command canceled π4β authentication required π
NOTE: specific commands may have additional exit codes. refer to the command's help for more information π
π SEE ALSO
that's the whole vibe, bestie π this page is from GitHub CLI v2.102.0, dated Oct 2026 β go forth and search, no cap π«Άπ
π¦ where this page comes from
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms