Skip to content

Public code search

The grep-app extension searches public GitHub code through grep.app and fetches matching source files directly into the agent conversation.

Bundled with Selesai

Loaded automatically with Selesai; no per-extension npm install is required.

Manifest entry
./grep-app
Runtime surface
Agent tool

Setup and prerequisites

  • This extension is bundled with Selesai. It is loaded automatically; you do not need to install it separately.
  • Requires network access and the ability to fetch https://grep.app/api/search and https://raw.githubusercontent.com.
  • Public repositories only. Private code cannot be reached.

What it sets up

  • Registers the grep_app_search tool for searching grep.app.
  • Registers the grep_app_fetch tool for fetching a public GitHub file by owner/repo, path, ref, and optional line range.
  • Uses Cheerio to parse code snippets from grep.app HTML result pages.

What you can configure

Public code search uses per-call filter and fetch options. There are no persistent user settings.

Configuration locations and precedence

  1. Tool call arguments
    grep_app({ ... })
    All behavior is controlled by each tool call.

Settings

Key / pathType, default, and valuesDescription
querystring
Default: —
grep.app search query.
filterstring
Default: —
Optional filter, e.g. language or repository.
fetchUrlstring
Default: —
URL of a result to fetch.
startLine / endLinenumber
Default: —
Optional line range for fetched source.

Command, tool, and shortcut controls

Key / pathDescription
grep_app({ ... })Search tool and fetch tool.

Source evidence

  • src/extensions/grep-app/index.ts

What you can do

  • Search for real usage examples or implementations across GitHub.
  • Fetch the full source of a file found in the search results.
  • Continue paging through results by increasing the page parameter.

Commands, tools, and shortcuts

Returns one page of up to 10 files with matched snippets.

ParameterTypeDescription
querystringCode or pattern to search for.
pageintegerResult page, default 1.
caseSensitivebooleanMatch case.
useRegexbooleanTreat query as a regular expression.
wholeWordsbooleanMatch whole words; cannot be combined with useRegex.
repostringRepository filter, e.g. facebook/react.
pathstringFile path filter, e.g. src/components/.
languagestringLanguage filter, e.g. TypeScript.

grep_app_fetch

Fetches a public GitHub file and returns selected lines.

ParameterTypeDescription
repostringowner/repository.
pathstringPath inside the repository.
refstringBranch, tag, or commit; defaults to HEAD.
startLineintegerFirst line, default 1.
endLineintegerLast line; defaults to end of file.

Limits and safety

  • Only public GitHub code is searchable.
  • Search results are subject to grep.app rate limits. A 429 response automatically falls back to a headless browser fetch.
  • Output is truncated to 50 KB or 2,000 lines; the full result is saved to a temporary file and referenced in the returned text.
  • Snippet line numbers come from grep.app HTML parsing and may occasionally be approximate.
  • Do not rely on fetched code for security-sensitive decisions without reviewing the actual repository state.

Source evidence

Selesai version: 0.10.0