Skip to main content

GitHub Searcher

ghsearcher is a utility for searching GitHub from the command line.

Usage

  1. Install with pip pip install ghsearcher
  2. (Optional) you can either export an environment variable named "GH_TOKEN" or include it in a local .env file to ensure you can make the most requests. See "Creating a personal access token" for more information on how to do so.
usage: ghsearcher [-h] [-v] [--debug]
                  [-e {users,code,issues,commits,labels,repos,topics}] [-o OUTPUT_FILE]
                  -q QUERY [QUERY ...]

Search for things in GitHub

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  --debug               Set this if you would like to see verbose logging.
  -e {users,code,issues,commits,labels,repos,topics}, --endpoint {users,code,issues,commits,labels,repos,topics}
                        Endpoint you would like to search
  -o OUTPUT_FILE, --output-file OUTPUT_FILE
                        File name for where you want the JSON output to go. eg:
                        output/test will output a file in the output dir with the file
                        name test-2022-01-01.json
  -q QUERY [QUERY ...], --query QUERY [QUERY ...]
                        Query you would like to use to search

To learn about building queries you can check the following documentaiton for GitHubs search queries:

https://docs.github.com/en/rest/reference/search#constructing-a-search-query

Here is a simple example. The Kafka project is trying to better track if users are having issues with implementing their kafka into thier project so the create a data pipeline with the following to find issues in other repos featuring Kafka.

This example finds all issues including "Kafka" created on or after 2022-01-18 and outputting it to kafka_output_file-(todays date).json

# The source is a repo and it is running against the gh_dorks_test.txt file
ghsearcher -e issues -q "Kafka created:>2022-01-18" -o kafka_output_file

Metadata

Release files for ghsearcher 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ghsearcher 0.0.4
File Size Uploaded
ghsearcher-0.0.4.tar.gz 10.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ghsearcher 0.0.4
File Interpreter ABI Platform
ghsearcher-0.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 21.1 kB

Release files / ghsearcher-0.0.4.tar.gz

Download URL ghsearcher-0.0.4.tar.gz
Size 10.3 kB
Tags Source
SHA-256 checksum
How to use checksums
292de3cabcd8c9ead182f36945d1445231bb93c46dbdc231be136f34f71574ba
BLAKE2b-256 checksum
How to use checksums
db5bf3c41444b018ac5cd96c171abf7973039c7425b1301beb914613d520820d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.10

Release files / ghsearcher-0.0.4-py3-none-any.whl

Download URL ghsearcher-0.0.4-py3-none-any.whl
Size 10.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2edc2e32f86080ec400eded3f15677c299661695052cfcb1241648f72dfeb9e4
BLAKE2b-256 checksum
How to use checksums
347a8e470b0cdf713f9cd735768b0f7cc93caf880ddd3ba6cd8bc41f90e6a562
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.10

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page