Org-wide code search
Search across all repositories in a GitHub organisation in a single command. Results are paginated automatically β up to 1,000 items.
Search up to 1,000 results across every repo. Group by team. Triage interactively. Export to Markdown or JSON.
One command. Auto-detects your OS and architecture.
Works on macOS, Linux, and Windows (Git Bash / MSYS2).
$ curl -fsSL https://raw.githubusercontent.com/fulll/github-code-search/main/install.sh | bashrepo scope (read-only). Generate one β$ export GITHUB_TOKEN=ghp_your_token_here$ github-code-search query "TODO" --org my-orgFrom query to structured output in three steps.
Run a single command. GitHub Code Search API is called automatically and results are paginated β up to 1 000 results across all repositories in your organisation.
A keyboard-driven TUI opens. Navigate repos, expand extracts, filter by file path. Select exactly what matters β deselect noise. Works without leaving the terminal.
Press Enter. Get clean Markdown with GitHub links, or machine-readable JSON. A replay command is printed β paste it into CI to reproduce the exact selection non-interactively.
Which repos still import lodash?
See every repository still importing a given library. Select the ones to migrate and get a Markdown checklist to paste directly into your migration issue.
$ github-code-search query "from 'lodash'" --org my-orggh search code? The official gh CLI supports ghΒ searchΒ code, but returns a flat paginated list β one result per line, no grouping, no interactive selection, no structured output. github-code-search is purpose-built for org-wide code audits and interactive triage.
Trusted by engineering teams who live in the terminal.
We use it weekly to track down deprecated patterns spread across 200+ repos. What used to take hours of grepping now takes minutes β and the replay command is gold for CI.
The per-repo grouping is exactly what was missing from gh search code. I can instantly see which teams own the code I'm looking at without context-switching to GitHub.
We pipe the JSON output into our internal tooling to generate automated refactoring tickets. The non-interactive mode with --output-type json is a hidden gem.