GH-SEARCH-REPOS(1)

NAME
gh-search-repos - Search for repositories

SYNOPSIS
gh search repos [<query>] [flags]

DESCRIPTION
Search for repositories on GitHub.

The command supports constructing queries using the GitHub search syntax, using the parameter and qualifier flags, or a combination of the two.

GitHub search syntax is documented at: ⟨https://docs.github.com/search-github/searching-on-github/searching-for-repositories⟩

OPTIONS

--archived
    Filter based on the repository archived state {true|false}

--created <date>
    Filter based on created at date

--followers <number>
    Filter based on number of followers

--forks <number>
    Filter on number of forks

--good-first-issues <number>
    Filter on number of issues with the 'good first issue' label

--help-wanted-issues <number>
    Filter on number of issues with the 'help wanted' label

--include-forks <string>
    Include forks in fetched repositories: {false|true|only}

-q, --jq <expression>
    Filter JSON output using a jq expression

--json <fields>
    Output JSON with the specified fields

--language <string>
    Filter based on the coding language

--license <strings>
    Filter based on license type

-L, --limit <int> (default 30)
    Maximum number of repositories to fetch

--match <strings>
    Restrict search to specific field of repository: {name|description|readme}

--number-topics <number>
    Filter on number of topics

--order <string> (default "desc")
    Order of repositories returned, ignored unless '--sort' flag is specified: {asc|desc}

--owner <strings>
    Filter on owner

--size <string>
    Filter on a size range, in kilobytes

--sort <string> (default "best-match")
    Sort fetched repositories: {forks|help-wanted-issues|stars|updated}

--stars <number>
    Filter on number of stars

-t, --template <string>
    Format JSON output using a Go template; see "gh help formatting"

--topic <strings>
    Filter on topic

--updated <date>
    Filter on last updated at date

--visibility <strings>
    Filter based on visibility: {public|private|internal}

-w, --web
    Open the search query in the web browser

JSON FIELDS
createdAt, defaultBranch, description, forksCount, fullName, hasDownloads, hasIssues, hasPages, hasProjects, hasWiki, homepage, id, isArchived, isDisabled, isFork, isPrivate, language, license, name, openIssuesCount, owner, pushedAt, size, stargazersCount, updatedAt, url, visibility, watchersCount

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.

EXAMPLE
    # Search repositories matching set of keywords "cli" and "shell"
    $ gh search repos cli shell
    # Search repositories matching phrase "vim plugin"
    $ gh search repos "vim plugin"
    # Search repositories public repos in the microsoft organization
    $ gh search repos --owner=microsoft --visibility=public
    # Search repositories with a set of topics
    $ gh search repos --topic=unix,terminal
    # Search repositories by coding language and number of good first issues
    $ gh search repos --language=go --good-first-issues=">=10"
    # Search repositories without topic "linux"
    $ gh search repos -- -topic:linux
    # Search repositories excluding archived repositories
    $ gh search repos --archived=false

SEE ALSO
gh-search(1)