# Code search helper Wraps `gh search code` with local filtering, sorting, summaries, and file output. ```text node scripts/gh_code_search.mjs "TODO" --language javascript --exclude-forks node scripts/gh_code_search.mjs "error handling" --repo owner/repo --output json node scripts/gh_code_search.mjs "class Component" --owner org --sort-by matches --output summary ``` Options beyond native GitHub search: - `--exclude-forks`, `--exclude-private` - `--min-matches N` - `-o, --output pretty|summary|json` - `--sort-by matches|repo|path` - `--output-file PATH` - `--timeout SECONDS` Use `gh search code --help` for native filters such as language, filename, extension, repository, owner, match target, and size.