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.
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/searchandhttps://raw.githubusercontent.com. - Public repositories only. Private code cannot be reached.
What it sets up
- Registers the
grep_app_searchtool for searching grep.app. - Registers the
grep_app_fetchtool for fetching a public GitHub file byowner/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
- Tool call arguments
grep_app({ ... })
All behavior is controlled by each tool call.
Settings
| Key / path | Type, default, and values | Description |
|---|---|---|
query | string Default: — | grep.app search query. |
filter | string Default: — | Optional filter, e.g. language or repository. |
fetchUrl | string Default: — | URL of a result to fetch. |
startLine / endLine | number Default: — | Optional line range for fetched source. |
Command, tool, and shortcut controls
| Key / path | Description |
|---|---|
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
pageparameter.
Commands, tools, and shortcuts
grep_app_search
Returns one page of up to 10 files with matched snippets.
| Parameter | Type | Description |
|---|---|---|
query | string | Code or pattern to search for. |
page | integer | Result page, default 1. |
caseSensitive | boolean | Match case. |
useRegex | boolean | Treat query as a regular expression. |
wholeWords | boolean | Match whole words; cannot be combined with useRegex. |
repo | string | Repository filter, e.g. facebook/react. |
path | string | File path filter, e.g. src/components/. |
language | string | Language filter, e.g. TypeScript. |
grep_app_fetch
Fetches a public GitHub file and returns selected lines.
| Parameter | Type | Description |
|---|---|---|
repo | string | owner/repository. |
path | string | Path inside the repository. |
ref | string | Branch, tag, or commit; defaults to HEAD. |
startLine | integer | First line, default 1. |
endLine | integer | Last 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.