jevgrep: The Search Tool That Teaches Coding Agents What to Read Next
A semantic CLI for AI agents that filters noisy repositories into high-value code paths, symbol leads, and bounded context before the model burns through its budget.
- Jevgrep treats repository search as context budgeting, not string matching, so the first output is a reading plan rather than a pile of hits.
- Its pipeline combines filesystem inventory, semantic judging, and Tree-sitter symbol extraction to produce high-density leads for agents.
- The model is used like a judge, not a chatbot, which makes the tool feel more like an evaluation layer than an autocomplete toy.
- Its real competition is not grep alone, but every slower way an agent wastes tokens before it finds the right files.
The hidden cost of looking in the wrong place
Coding agents rarely fail because they cannot search. They fail because they search too broadly, then spend expensive context on the wrong files. Every unnecessary read is a tax on the model’s next decision, and in a large repo that tax compounds fast.
That is the problem jevgrep is built to attack. It is not a better grep. It is a pre-reading layer for agents, a way to answer, “What should I open next?” before the model wastes budget on blind exploration.
Coding agents spend part of every unfamiliar task finding the right files. Jevgrep uses Jev to find the relevant files. Just ask a repository question, and jg returns relevant files, reading leads, and verbatim source excerpts in one stdout response.
jevgrep is a pre-reader, not a finder
The key shift is mental. Traditional search tools help you locate a string. Jevgrep helps an agent decide which file deserves a read, which symbol matters, and which excerpt is worth context. That makes it less like a search box and more like a triage system.
| Tool | Best for | Index needed | Semantic understanding | Output target | Agent fit |
|---|---|---|---|---|---|
| ripgrep | Literal string lookup | No | No | Matches | Good for exact needles |
| ast-grep | Structural code patterns | No | Yes, syntax-level | Matches and rewrites | Good when you already know the shape |
| Vector search | Fuzzy topical recall | Usually yes | Approximate similarity | Ranked chunks | Good for broad recall |
| jevgrep | Agent triage and reading leads | No | Yes, decision-oriented | Relevant files, symbols, excerpts | Built for the next read |
How the retrieval pipeline prunes the repo
The implementation is hierarchical, not brute force. The core loop starts with filesystem inventory, then asks a model to judge relevance, then uses parsing to extract symbol-level leads, and finally renders output under a strict byte budget. That sequence matters because it keeps cheap local work ahead of expensive model calls.
// Conceptual flow inside jevgrep
const inventory = scanFilesystem({ respectGitignore: true })
const relevant = await judgeBranches(inventory, query)
const leads = parseSymbols(relevant.files)
const output = renderForAgent(leads, { maxOutputBytes })
// If output grows too large, truncate safely and close structure
if (output.bytes > maxOutputBytes) {
output = truncateWithValidMarkdown(output, maxOutputBytes)
}
That last step is easy to miss, but it is the difference between a helpful tool and a brittle one. The output is not just compact. It is valid, bounded, and designed so an agent can keep going without parsing garbage.
Why Tree-sitter matters more than a keyword match
Keyword search can tell you where a token appears. Tree-sitter can tell you what the token belongs to. In jevgrep, that matters because a function declaration, a class name, or a call site is much closer to a reading lead than a raw text hit.
This is where the tool starts to feel semantic rather than merely searchable. The repo is being reduced into evidence, not just matches. For an agent, that distinction saves turns.
The model is used like a judge, not a chatbot
Jevgrep’s model layer is disciplined. The evaluator does not free-associate. It scores relevance, uses structured output, and respects rate and cache constraints so the same content is not judged repeatedly. That makes the model behave more like a fast reviewer than a conversational partner.
dzhng/jevgrep checks the card catalog for your coding agent and pulls the right card, while Jev's coin meter charges for every drawer it opens. Verdict: adopt with care.
The trade-off is real. External judging can reduce wasted reading, but it also introduces a dependency on another model and another bill. Jevgrep is honest about that tension, and that honesty is part of the product story.
The output is optimized for agents, not humans
Most developer tools are designed to look good in a terminal. Jevgrep is designed to be consumed by another system. That is why its output emphasizes declaration locations, excerpts, and truncation safety over pretty formatting.
The practical effect is simple. An agent can take the result and make the next call without having to reinterpret it. That sounds small until you compare it with a tool that returns too much, too vaguely, or in a shape that breaks under pressure.
Why the skill model is quietly important
The `jg skill` command is a distribution choice, not a convenience feature. It teaches the agent environment how to use the tool, which means jevgrep is not only a binary. It is behavior injected into the workflow of another AI.
That is the subtle innovation here. The product is built for a world where the primary user is not a person sitting at the keyboard. It is a model that needs instructions, guardrails, and a cheap way to know where to look first.
David Zhang ships jevgrep, a Jev-powered context CLI that cut coding-agent cost 40% on SWE-bench but dropped one solve in ten.
What jevgrep is really competing with
The real comparison is not between one search command and another. It is between different ways of spending an agent’s attention. Ripgrep is better at exact retrieval. Ast-grep is better when you already know the structure. Embeddings are better at fuzzy recall. Hosted code intelligence platforms are better at large indexed environments.
| Approach | Strength | Weakness | When it wins |
|---|---|---|---|
| ripgrep | Fast literal lookup | No semantic judgment | When the exact string matters |
| ast-grep | Structural precision | Requires pattern knowledge | When the agent knows the syntax shape |
| Embeddings search | Topical fuzziness | Similarity is not intent | When recall matters more than precision |
| Hosted code intelligence | Broad platform power | Heavier and less local | When the repo lives inside a larger service |
| jevgrep | Agent-first triage | Depends on model judging | When the question is, what should I read next? |
That is the core thesis. Jevgrep does not try to win every search contest. It wins the job that matters to agents in unfamiliar code: narrowing the repo to the few files, symbols, and excerpts worth paying for.





