{"id":13588682,"url":"https://github.com/feinoujc/gh-search-cli","last_synced_at":"2025-04-08T06:32:28.778Z","repository":{"id":29794786,"uuid":"122796034","full_name":"feinoujc/gh-search-cli","owner":"feinoujc","description":"searches github via command line. Supports repo, issues, code and commit searches and listing notifications","archived":true,"fork":false,"pushed_at":"2022-05-03T15:56:57.000Z","size":4527,"stargazers_count":120,"open_issues_count":9,"forks_count":17,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-06T10:12:09.309Z","etag":null,"topics":["cli","github","oclif","search"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/feinoujc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-25T01:39:16.000Z","updated_at":"2024-11-02T08:23:59.000Z","dependencies_parsed_at":"2022-08-08T05:00:14.015Z","dependency_job_id":null,"html_url":"https://github.com/feinoujc/gh-search-cli","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feinoujc%2Fgh-search-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feinoujc%2Fgh-search-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feinoujc%2Fgh-search-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feinoujc%2Fgh-search-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/feinoujc","download_url":"https://codeload.github.com/feinoujc/gh-search-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247792136,"owners_count":20996878,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","github","oclif","search"],"created_at":"2024-08-01T15:06:51.748Z","updated_at":"2025-04-08T06:32:25.882Z","avatar_url":"https://github.com/feinoujc.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","cli"],"sub_categories":[],"readme":"# NO LONGER MAINTAINED \n\nThe [GitHub CLI](https://cli.github.com/) has added functionality similar to this library (`gh search issues, ...`), so just use that instead.\n\ngh-search-cli\n=============\nProvides a cli for searching github.com. Supports repositories, code, issues and commits. Can be configured for github enterprise instances as well. Built using [oclif](https://github.com/oclif/oclif)\n\n[![Version](https://img.shields.io/npm/v/gh-search-cli.svg)](https://npmjs.org/package/gh-search-cli)\n[![Codecov](https://codecov.io/gh/feinoujc/gh-search-cli/branch/master/graph/badge.svg)](https://codecov.io/gh/feinoujc/gh-search-cli)\n[![License](https://img.shields.io/npm/l/gh-search-cli.svg)](https://github.com/feinoujc/gh-search-cli/blob/master/package.json)\n[![Dependabot Status](https://api.dependabot.com/badges/status?host=github\u0026repo=feinoujc/gh-search-cli)](https://dependabot.com)\n\n\u003c!-- toc --\u003e\n* [Setup](#setup)\n* [Usage](#usage)\n* [Commands](#commands)\n\u003c!-- tocstop --\u003e\n\n# Setup\n\nThe cli requires a personal access token (`notifications` scope is needed for the notifications command). The cli will create a new token on the first run and store it for future use. If you prefer you can use your own token and config the cli yourself (see [ghs config](#ghs-config))\n\n_See code: [src/hooks/init/auth.ts](https://github.com/feinoujc/gh-search-cli/blob/v2.1.0/src/hooks/init/auth.ts)_\n\n\n# Usage\n\u003c!-- usage --\u003e\n```sh-session\n$ npm install -g gh-search-cli\n$ ghs COMMAND\nrunning command...\n$ ghs (-v|--version|version)\ngh-search-cli/3.1.0 darwin-x64 node-v12.19.0\n$ ghs --help [COMMAND]\nUSAGE\n  $ ghs COMMAND\n...\n```\n\u003c!-- usagestop --\u003e\n# Commands\n\u003c!-- commands --\u003e\n* [`ghs code [QUERY]`](#ghs-code-query)\n* [`ghs commits [QUERY]`](#ghs-commits-query)\n* [`ghs config`](#ghs-config)\n* [`ghs help [COMMAND]`](#ghs-help-command)\n* [`ghs issues [QUERY]`](#ghs-issues-query)\n* [`ghs notifications`](#ghs-notifications)\n* [`ghs repositories [QUERY]`](#ghs-repositories-query)\n\n## `ghs code [QUERY]`\n\nsearch github code. https://developer.github.com/v3/search/#search-code\n\n```\nUSAGE\n  $ ghs code [QUERY]\n\nOPTIONS\n  -j, --json                   Return json. Can be piped to jq.\n  -l, --language=language      Searches code based on the language it's written in.\n  -o, --open                   Open the first result in your browser.\n  -o, --org=org                Limits searchs to a specific organization\n  -r, --repo=repo              Limits searches to a specific repository.\n\n  -s, --sort=(indexed)         The sort field. Can only be indexed, which indicates how recently a file has been indexed\n                               by the GitHub search infrastructure. Default: results are sorted by best match.\n\n  -t, --text                   Show full text match\n\n  -u, --user=user              Limits searches to a specific user. Use @me for your username\n\n  --api-base-url=api-base-url  The github api token. Defaults to configured GHE url or 'https://api.github.com'\n\n  --api-token=api-token        The github api token. Defaults to configured api token\n\n  --extension=extension        Matches files with a certain extension after a dot.\n\n  --filename=filename          Matches files by a substring of the filename.\n\n  --in=in                      Qualifies which fields are searched. With this qualifier you can restrict the search to\n                               the file contents (file), the file path (path), or both.\n\n  --order=(asc|desc)           The sort order if sort parameter is provided. Default: desc\n\n  --path=path                  Specifies the path prefix that the resulting file must be under.\n\n  --size=size                  Finds files that match a certain size (in bytes).\n\nEXAMPLE\n  $ ghs code --extension js \"import _ from 'lodash'\"\n```\n\n_See code: [src/commands/code.ts](https://github.com/feinoujc/gh-search-cli/blob/v3.1.0/src/commands/code.ts)_\n\n## `ghs commits [QUERY]`\n\nsearch github commits. https://developer.github.com/v3/search/#search-commits\n\n```\nUSAGE\n  $ ghs commits [QUERY]\n\nOPTIONS\n  -j, --json                               Return json. Can be piped to jq.\n  -o, --open                               Open the first result in your browser.\n\n  -s, --sort=(author-date|committer-date)  The sort field. Can be author-date or committer-date. Default: results are\n                                           sorted by best match.\n\n  --api-base-url=api-base-url              The github api token. Defaults to configured GHE url or\n                                           'https://api.github.com'\n\n  --api-token=api-token                    The github api token. Defaults to configured api token\n\n  --author=author                          Matches commits authored by a user (based on email settings).\n\n  --author-date=author-date                Matches commits by author date range.\n\n  --author-email=author-email              Matches commits by author email.\n\n  --author-name=author-name                Matches commits by author name.\n\n  --committer=committer                    Matches commits committed by a user (based on email settings).\n\n  --committer-date=committer-date          Matches commits by committer date range.\n\n  --committer-email=committer-email        Matches commits by committer email.\n\n  --committer-name=committer-name          Matches commits by committer name.\n\n  --hash=hash                              Matches commits by hash.\n\n  --is=(public|private)                    Matches public or private repositories.\n\n  --[no-]merge                             --merge filters to merge commits, --no-merge filters out merge commits.\n\n  --order=(asc|desc)                       The sort order if sort parameter is provided. Default: desc\n\n  --org=org                                Limits searches to a specific organization.\n\n  --parent=parent                          Matches commits that have a particular parent.\n\n  --repo=repo                              Limits searches to a specific repository.\n\n  --tree=tree                              Matches commits with the specified git tree hash.\n\n  --user=user                              Limits searches to a specific user. Use @me for your username.\n\nEXAMPLE\n  $ ghs commit --repo octocat/Spoon-Knife css\n```\n\n_See code: [src/commands/commits.ts](https://github.com/feinoujc/gh-search-cli/blob/v3.1.0/src/commands/commits.ts)_\n\n## `ghs config`\n\nConfigure ghs settings\n\n```\nUSAGE\n  $ ghs config\n\nOPTIONS\n  --base-url=base-url  sets the github base url for github enterprise instances (ex: https://github.company.com/api/v3).\n  --clear              clears the local config file including the auth token.\n  --token=token        sets the github token to use.\n\nEXAMPLE\n  $ ghs config --clear\n  config cleared\n```\n\n_See code: [src/commands/config.ts](https://github.com/feinoujc/gh-search-cli/blob/v3.1.0/src/commands/config.ts)_\n\n## `ghs help [COMMAND]`\n\ndisplay help for ghs\n\n```\nUSAGE\n  $ ghs help [COMMAND]\n\nARGUMENTS\n  COMMAND  command to show help for\n\nOPTIONS\n  --all  see all commands in CLI\n```\n\n_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.2.0/src/commands/help.ts)_\n\n## `ghs issues [QUERY]`\n\nsearch github issues. https://developer.github.com/v3/search/#search-issues\n\n```\nUSAGE\n  $ ghs issues [QUERY]\n\nOPTIONS\n  -c, --created=created                                Filters issues or pull requests based on date of creation,or when\n                                                       they were last updated.\n\n  -j, --json                                           Return json. Can be piped to jq.\n\n  -l, --language=language                              Searches for issues or pull requests within repositories that\n                                                       match a certain language.\n\n  -m, --merged=merged                                  Filters pull requests based on the date when they were merged.\n\n  -o, --open                                           Open the first result in your browser.\n\n  -r, --repo=repo                                      Limits searches to a specific repository.\n\n  -s, --sort=(comments|created|updated)                The sort field. Default: results are sorted by best match.\n\n  -s, --status=status                                  Filters pull requests based on the commit status.\n\n  -t, --type=(issue|pr)                                With this qualifier you can restrict the search to issues (issue)\n                                                       or pull request (pr) only.\n\n  -u, --updated=updated                                Filters issues or pull requests based on date of creation, or\n                                                       when they were last updated.\n\n  -u, --user=user                                      Limits searches to a specific user. Use @me for your username.\n\n  --SHA=SHA                                            If you know the specific SHA hash of a commit, you can use it to\n                                                       search for pull requests that contain that SHA. The SHA syntax\n                                                       must be at least seven characters.\n\n  --api-base-url=api-base-url                          The github api token. Defaults to configured GHE url or\n                                                       'https://api.github.com'\n\n  --api-token=api-token                                The github api token. Defaults to configured api token\n\n  --[no-]archived                                      Filters issues or pull requests based on whether they are in an\n                                                       archived repository.\n\n  --assignee=assignee                                  Finds issues or pull requeststhat are assigned to a certain user.\n                                                       Use @me for your username.\n\n  --author=author                                      Finds issues or pull requests created by a certain user. Use @me\n                                                       for your username.\n\n  --base=base                                          Filters pull requests based on the branch that they came from.\n\n  --closed=closed                                      Filters issues or pull requests based on the date when they were\n                                                       closed.\n\n  --commenter=commenter                                Finds issues or pull requests that a certain user commented on.\n                                                       Use @me for your username.\n\n  --comments=comments                                  Filters issues or pull requests based on the quantity of\n                                                       comments.\n\n  --head=head                                          Filters pull requests based on the branch that they are\n                                                       modifying.\n\n  --in=in                                              Qualifies which fields are searched. With this qualifier you can\n                                                       restrict the searchto just the title (title), body (body),\n                                                       comments (comments), or any combination of these.\n\n  --interactions=interactions                          You can filter issues and pull requests by the number of\n                                                       interactions with the interactions qualifier along with greater\n                                                       than, less than, and range qualifiers. The interactions count is\n                                                       the number of reactions and comments on an issue or pull request.\n\n  --involves=involves                                  Finds issues or pull requests that were either created by a\n                                                       certain user, assigned to that user, mention that user, or were\n                                                       commented on by that user. Use @me for your username.\n\n  --is=is                                              Searches for items within repositories that match a certain\n                                                       state, such as open, closed, or merged\n\n  --label=label                                        Filters issues or pull requests based on their labels.\n\n  --mentions=mentions                                  Finds issues or pull requests that mention a certain user. Use\n                                                       @me for your username.\n\n  --milestone=milestone                                Finds issues or pull requests that are a part of a milestone\n                                                       within a repository.\n\n  --no=no                                              Filters items missing certain metadata, such as label, milestone,\n                                                       or assignee\n\n  --order=(asc|desc)                                   The sort order if sort parameter is provided. Default: desc\n\n  --org=org                                            Limits searches to a specific org.\n\n  --project=project                                    Limits searches to a specific project board in a repository or\n                                                       organization.\n\n  --reactions=reactions                                You can filter issues and pull requests by the number of\n                                                       reactions using the reactions qualifier along with greater than,\n                                                       less than, and range qualifiers.\n\n  --review=(none|required|approved|changes_requested)  You can filter pull requests based on their review status\n\n  --review-requested=review-requested                  Filter pull requests by requested reviewer.\n\n  --reviewed-by=reviewed-by                            Filter pull requests by reviewer.\n\n  --state=(open|closed)                                Filter issues or pull requests based on whether they're open or\n                                                       closed.\n\n  --team=team                                          For organizations you're a member of, finds issues or pull\n                                                       requests that @mention a team within the organization.\n\n  --team-review-requested=team-review-requested        Filter pull requests by requested reviewer.\n\nEXAMPLE\n  $ ghs issues --is open --involves my-github-username\n```\n\n_See code: [src/commands/issues.ts](https://github.com/feinoujc/gh-search-cli/blob/v3.1.0/src/commands/issues.ts)_\n\n## `ghs notifications`\n\nList notifications\n\n```\nUSAGE\n  $ ghs notifications\n\nOPTIONS\n  -a, --all                    If true, show notifications marked as read. Default: false\n\n  -b, --before=before          Only show notifications updated before the given time. This is a timestamp in ISO 8601\n                               format: YYYY-MM-DDTHH:MM:SSZ.\n\n  -j, --json                   Return json. Can be piped to jq.\n\n  -o, --open                   Open the first result in your browser.\n\n  -p, --participating          If true, only shows notifications in which the user is directly participating or\n                               mentioned. Default: false\n\n  -s, --since=since            Only show notifications updated after the given time. This is a timestamp in ISO 8601\n                               format: YYYY-MM-DDTHH:MM:SSZ\n\n  --api-base-url=api-base-url  The github api token. Defaults to configured GHE url or 'https://api.github.com'\n\n  --api-token=api-token        The github api token. Defaults to configured api token\n\n  --owner=owner                Filter notifications to a owner, required with --repo flag\n\n  --repo=repo                  Filter notifications to a repository, required with --owner flag\n```\n\n_See code: [src/commands/notifications.ts](https://github.com/feinoujc/gh-search-cli/blob/v3.1.0/src/commands/notifications.ts)_\n\n## `ghs repositories [QUERY]`\n\nsearch github repositories. https://developer.github.com/v3/search/#search-repositories\n\n```\nUSAGE\n  $ ghs repositories [QUERY]\n\nOPTIONS\n  -c, --created=created                    Filters repositories based on date of creation, or when they were last\n                                           updated.\n\n  -f, --[no-]fork                          Filters whether forked repositories should be included (--fork) or not\n                                           (--no-fork).\n\n  -j, --json                               Return json. Can be piped to jq.\n\n  -l, --language=language                  Searches repositories based on the language they're written in.\n\n  -o, --open                               Open the first result in your browser.\n\n  -p, --pushed=pushed                      Filters repositories based on date of creation, or when they were last\n                                           updated.\n\n  -r, --repo=repo                          Limits searches to a specific repo.\n\n  -s, --sort=(stars|forks|updated)         The sort field. Default: results are sorted by best match.\n\n  -u, --user=user                          Limits searches to a specific user. Use @me for your username.\n\n  --api-base-url=api-base-url              The github api token. Defaults to configured GHE url or\n                                           'https://api.github.com'\n\n  --api-token=api-token                    The github api token. Defaults to configured api token\n\n  --[no-]archived                          Filters whether archived repositories should be included (--archived) or not\n                                           (--no-archived).\n\n  --followers=followers                    Searches repositories based on the number of followers.\n\n  --forks=forks                            Filters repositories based on the number of forks.\n\n  --good-first-issues=good-first-issues    Search for repositories that have a minimum number of issues labeled\n                                           help-wanted.\n\n  --help-wanted-issues=help-wanted-issues  Search for repositories that have a minimum number of issues labeled\n                                           good-first-issue.\n\n  --in=in                                  Qualifies which fields are searched. With this qualifier you can restrict the\n                                           search to just the repository name, description, readme, or any combination\n                                           of these.\n\n  --license=license                        Filters repositories by license or license family, using the license keyword.\n\n  --[no-]mirror                            Search repositories based on whether or not they're a mirror and are hosted\n                                           elsewhere.\n\n  --order=(asc|desc)                       The sort order if sort parameter is provided. Default: desc\n\n  --size=size                              Finds repositories that match a certain size (in kilobytes).\n\n  --stars=stars                            Searches repositories based on the number of stars.\n\n  --topic=topic                            Filters repositories based on the specified topic.\n\n  --topics=topics                          Search repositories by the number of topics that have been applied to them.\n\nALIASES\n  $ ghs repo\n  $ ghs repository\n\nEXAMPLE\n  $ ghs repo puppeteer\n     GoogleChrome/puppeteer (https://github.com/GoogleChrome/puppeteer)\n```\n\n_See code: [src/commands/repositories.ts](https://github.com/feinoujc/gh-search-cli/blob/v3.1.0/src/commands/repositories.ts)_\n\u003c!-- commandsstop --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeinoujc%2Fgh-search-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffeinoujc%2Fgh-search-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeinoujc%2Fgh-search-cli/lists"}