Registry / devops / gh-search

gh-search

JSON →
library0.9.2pypypi✓ verified 81d ago

A command-line tool for searching GitHub repositories, code, issues, and more. Current version 0.9.2, requires Python >=3.12. Released sporadically; latest updates focus on maintenance and bug fixes.

pip install gh-search
INSTALL
IMPORT
SIG · GH-SEARCH
G
gh-search
devopspythonv0.9.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

main
from ghsearch import main
from gh_search import main

Run a GitHub code search via the CLI using subprocess. For direct Python usage, invoke the module with sys.argv.

import os import subprocess # Ensure GITHUB_TOKEN env var is set (optional for unauthenticated) os.environ.setdefault('GITHUB_TOKEN', '') # Example: search for code containing 'def foo' in Python repos result = subprocess.run(["gh-search", "code", "def foo", "--language", "python"], capture_output=True, text=True) print(result.stdout)
gh-search --version
Debug
Known issues
breakingPython 3.12+ only. Installing on older Python versions will fail.
fix
Upgrade Python to >=3.12 or use gh-search <0.9.0 (which supports Python 3.7–3.11).
affects: 0.9.0+
gotchaThe tool requires a valid GitHub Personal Access Token for all operations except public searches (rate-limited). Environment variable GITHUB_TOKEN must be set.
fix
Set environment variable GITHUB_TOKEN to a token with appropriate scopes, or use the --token option.
affects: all
deprecatedThe --content-filter and --regex-content-filter options are deprecated as of 0.9.0.
fix
Use --query or --AND instead. See documentation for new search syntax.
affects: 0.9.0+
Upgrade
Version history
0.9.2latest on PyPI · released May 8, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
gh-search — pip install gh-search · libregistry