Skip to content

github-code-searchSearch GitHub code across your org

Search up to 1,000 results across every repo. Group by team. Triage interactively. Export to Markdown or JSON.

Get up and running in 30 seconds

One command. Auto-detects your OS and architecture.
Works on macOS, Linux, and Windows (Git Bash / MSYS2).

Works with
zshbashfishmacOSLinuxWindows GitHub Actions

Step 1: Install the binary

$ curl -fsSL https://raw.githubusercontent.com/fulll/github-code-search/main/install.sh | bash

Step 2: Export your GitHub token

Requires a GitHub token with repo scope (read-only). Generate one β†—
$ export GITHUB_TOKEN=ghp_your_token_here

Step 3: Run your first search

$ github-code-search query "TODO" --org my-org

How it works

From query to structured output in three steps.

Step 1

Search across the org

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.

Step 2

Triage interactively

A keyboard-driven TUI opens. Navigate repos, expand extracts, filter by file path. Select exactly what matters β€” deselect noise. Works without leaving the terminal.

Step 3

Export & replay

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.

Use cases

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.

bash
$ github-code-search query "from 'lodash'" --org my-org

Used in production?

Using github-code-search at your organisation? Share your experience, use cases or feedback β€” your input shapes the roadmap.

Share your story

What people say

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.

Platform EngineerSeries B tech company Β· 40+ repos

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.

Staff EngineerEngineering org Β· 120+ repos

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.

DevOps LeadInfrastructure team Β· 30+ repos

Using github-code-search in your org?
We'd love to hear your experience.

Released under the MIT License.