grepai

Featured

Semantic code search and call-graph tracing. Use for intent questions ('where is authentication handled?'), exploring unfamiliar code, or tracing callers/callees — as a ranking layer on top of exact-match Grep, not a replacement for it.

AI & Automation 1,858 stars 155 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 93/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

## grepai: ranked semantic search (not a Grep replacement) `grepai search` answers a natural-language query with ~10 scored chunks in one call — a ranked starting point at a fraction of the tokens of dumping raw grep output (`--json --compact` alone saves ~80%). It is a **ranking layer, not an exhaustive one**: a vector top-10 can miss a relevant file that keyword grep finds trivially. The rules below save tokens without losing recall. ## Tool Choice | Query | Tool | |---|---| | Exact identifiers, imports, string literals | built-in Grep / `git grep` — fastest, exhaustive | | Intent with a canonical syntax anchor (`@main`, `func main(`, `class AppDelegate`) | Grep the anchor — many "intent" questions are exact-match queries in disguise | | Intent with no obvious anchor ("where are errors handled?") | recall-safe combo below | | Function relationships (callers/callees) | `grepai trace` — grep has no equivalent | | File patterns (`**/*.go`) | Glob | ## Recall-Safe Combo (cheap AND exhaustive) grep's token cost is in dumping content lines; its *recall* is nearly free when you ask for file names only. For an intent query, run both cheap layers: ```bash # 1. Ranking: ~10 scored chunks, one call grepai search "where errors are handled and logged" --json --compact # 2. Recall: exhaustive candidate checklist — file NAMES only, ~zero tokens git grep -ilE 'error|handl|logg' | head -50 ``` Read grepai's top hits first, then scan the checklist for relevant-looking files grepai di...

Details

Author
yoanbernabeu
Repository
yoanbernabeu/grepai
Created
8 months ago
Last Updated
yesterday
Language
C
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category