Skip to content

CLI options

Use this page as a reference for all commands and flags when running the tool from your terminal or CI pipelines.

Commands

bash
github-code-search <query> --org <org> [options]   # default (backward-compatible)
github-code-search query <query> --org <org> [options]
github-code-search upgrade
CommandDescription
<query> / query <query>Search GitHub code (default command)
upgradeCheck for a new release and auto-upgrade the binary

Search options

OptionTypeRequiredDefaultDescription
--org <org>stringGitHub organization to search in. Automatically injected as org:<org> in the query.
--exclude-repositories <repos>string""Comma-separated list of repositories to exclude. Short form (repoA,repoB) or full form (org/repoA,org/repoB) both accepted.
--exclude-extracts <refs>string""Comma-separated extract refs to exclude. Format: repoName:path/to/file:index. Short form (without org prefix) accepted.
--no-interactiveboolean (flag)true (on)Disable interactive mode. Interactive mode is on by default; pass this flag to disable it. Also triggered by CI=true.
--format <format>markdown | jsonmarkdownOutput format. See Output formats.
--output-type <type>repo-and-matches | repo-onlyrepo-and-matchesControls output detail level. repo-only lists repository names only, without individual extracts.
--include-archivedboolean (flag)falseInclude archived repositories in results (excluded by default).
--group-by-team-prefix <prefixes>string""Comma-separated team-name prefixes for grouping result repos by GitHub team (e.g. squad-,chapter-). Requires read:org scope.
--no-cacheboolean (flag)true (on)Bypass the 24 h team-list cache and re-fetch teams from GitHub. Cache is on by default; pass this flag to disable it. Only applies with --group-by-team-prefix.

Global options

OptionDescription
-V, --versionOutput version, git commit SHA, OS and architecture
-h, --helpDisplay help

Notes

  • --no-interactive and CI=true are equivalent — either one disables the TUI.
  • The --exclude-repositories and --exclude-extracts options accept both the short form (without org prefix) and the full org/repo form.
  • --no-cache has no effect unless --group-by-team-prefix is also set.
  • The upgrade subcommand does not require --org or GITHUB_TOKEN (token is used only if already set, to avoid rate limiting).

Released under the MIT License.