GH-SEARCH-ISSUES(1)

πŸ’… GH-SEARCH-ISSUES β€” like, the whole manual, bestie

okay so this is gh-search-issues, straight out of the GitHub CLI manual (yes, THE GitHub CLI manual, we're fancy now πŸŽ€). Let's get into it.


✨ NAME ✨

gh-search-issues β€” search for issues πŸ”πŸ’–


🌸 SYNOPSIS 🌸

gh search issues [<query>] [flags]

πŸ¦‹ DESCRIPTION πŸ¦‹

So you wanna search for issues on GitHub. Iconic. Here's the tea: this command can build your query three different ways β€” using the GitHub search syntax, using the parameter/qualifier flags, or a mix of both. No cap, whatever vibes you want. πŸ’…

GitHub's search syntax is documented riiiight here:

⟨https://docs.github.com/search-github/searching-on-github/searching-issues-and-pull-requests⟩

Now, on supported GitHub hosts, you can flex harder and use advanced issue search syntax inside the --search query. But listen β€” advanced syntax stuff like boolean operators OR/AND and parentheses for nesting must be passed as separate arguments, not crammed inside a quoted multi-word string. Also, heads up: this syntax is not supported with --web. More deets on advanced issue search:

⟨https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/filtering-and-searching-issues-and-pull-requests#building-advanced-filters-for-issues⟩

Then there's --search-type, which lets you pick semantic or hybrid (keyword + semantic) ranking instead of the default lexical search. Slay. But bestie, listen to the fine print: semantic and hybrid search are scoped to issues, they're relevance-ranked (so --sort and --order literally cannot be used, sorry), they return a single page of results, and they are not available on GitHub Enterprise Server. 😭

And if your search query has a hyphen in it and you're confused about handling it, just run gh search --help. That's it, that's the tip. 🫢


⭐ OPTIONS ⭐

  • --app <string> β€” filter by GitHub App author
  • --archived β€” filter based on the repository archived state {true|false}
  • --assignee <string> β€” filter by assignee
  • --author <string> β€” filter by author (and hey, use --app if you're filtering by a GitHub App)
  • --closed <date> β€” filter on closed at date
  • --commenter <user> β€” filter based on comments by user
  • --comments <number> β€” filter on number of comments
  • --created <date> β€” filter based on created at date
  • --include-prs β€” include pull requests in results
  • --interactions <number> β€” filter on number of reactions and comments
  • --involves <user> β€” filter based on involvement of user
  • -q, --jq <expression> β€” filter JSON output using a jq expression
  • --json <fields> β€” output JSON with the specified fields
  • --label <strings> β€” filter on label
  • --language <string> β€” filter based on the coding language
  • -L, --limit <int> (default 30) β€” maximum number of results to fetch
  • --locked β€” filter on locked conversation status
  • --match <strings> β€” restrict search to a specific field of the issue: {title|body|comments}
  • --mentions <user> β€” filter based on user mentions
  • --milestone <title> β€” filter by milestone title
  • --no-assignee β€” filter on missing assignee
  • --no-label β€” filter on missing label
  • --no-milestone β€” filter on missing milestone
  • --no-project β€” filter on missing project
  • --order <string> (default "desc") β€” order of results returned, ignored unless the --sort flag is specified: {asc|desc}
  • --owner <strings> β€” filter on repository owner
  • --project <owner/number> β€” filter on project board owner/number
  • --reactions <number> β€” filter on number of reactions
  • -R, --repo <OWNER/REPO> β€” filter on repository, in OWNER/REPO format
  • --search-type <string> (default "lexical") β€” type of issue search to perform: {lexical|semantic|hybrid}
  • --sort <string> (default "best-match") β€” sort fetched results: {comments|created|interactions|reactions|reactions-+1|reactions--1|reactions-heart|reactions-smile|reactions-tada|reactions-thinking_face|updated}
  • --state <string> β€” filter based on state: {open|closed}
  • --team-mentions <string> β€” filter based on team mentions
  • -t, --template <string> β€” format JSON output using a Go template; see gh help formatting
  • --updated <date> β€” filter on last updated at date
  • --visibility <strings> β€” filter based on repository visibility: {public|private|internal}
  • -w, --web β€” open the search query in the web browser

πŸŽ€ JSON FIELDS πŸŽ€

here's the full roster of fields you can ask for, bestie β€” every single one:

assignees, author, authorAssociation, body, closedAt, commentsCount, createdAt, id, isLocked, isPullRequest, labels, number, repository, state, title, updatedAt, url


🌈 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. iykyk πŸ’…

πŸ”₯ EXAMPLE πŸ”₯

# Search issues matching set of keywords "readme" and "typo"
$ gh search issues readme typo

# Search issues matching phrase "broken feature"
$ gh search issues "broken feature"

# Search issues using raw search qualifiers as separate arguments
$ gh search issues label:bug author:monalisa state:open

# Search issues and pull requests in cli organization
$ gh search issues --include-prs --owner=cli

# Search open issues assigned to yourself
$ gh search issues --assignee=@me --state=open

# Search issues with numerous comments
$ gh search issues --comments=">100"

# Search issues without label "bug"
$ gh search issues -- -label:bug

# Search issues only from un-archived repositories (default is all repositories)
$ gh search issues --owner github --archived=false

# Search issues using semantic (natural-language) ranking
$ gh search issues "feature broken on web" --search-type semantic

# Search issues using hybrid (keyword + semantic) ranking
$ gh search issues "feature broken" --search-type hybrid

🫢 SEE ALSO 🫢

gh-search(1) β€” go read that one too, bestie πŸ’–


and that's the whole page!! this was generated from GitHub CLI v2.102.0, dated Oct 2026 β€” slay, go search some issues, you're gonna do amazing πŸ¦‹πŸ‘‘πŸ’œ

πŸ“¦ where this page comes from