Code search for agents that cites its sources
Coding agents burn a chunk of every unfamiliar task just finding the right files; `jg` answers repository questions with verbatim source and line numbers.

What it does
jg takes a plain-English question about a codebase — “where is authentication checked before a request reaches a handler?” — and returns one stdout response: a summary, a compact file list, verbatim source excerpts with line references, and declaration and call locations. Under the hood it walks the repository hierarchy and uses Jev, a relevance-judging model reached through Vercel AI Gateway, TypeSafe, OpenRouter, or OpenCode Zen, to score folders, files, and declarations. The intended consumer is a coding agent — Claude Code, Codex, OpenCode — which treats the output as evidence, then implements and tests the change itself.
The interesting bit The output is deliberately evidence, not an answer: excerpts and locations the agent can verify, not generated prose. When it can’t confidently pick an excerpt, it still reports the qualifying file locations instead of forcing a fixed top-two list — a small refusal to fake confidence. Rarer still, the README publishes per-task benchmark costs and volunteers that its newest release’s combined cost ran slightly higher than the previous one.
Key highlights
- One layered response: summary and file list first, then source with line references, then declaration and call locations.
- Declaration parsing for Python and TypeScript/JavaScript; a fallback covers other text.
- On ten SWE-bench tasks it matched the baseline’s 8/10 solves while total solve cost fell from $7.62 to $5.44 — 28.6%, excluding Jev’s own cost; a rerun including Jev measured 25.8% lower total.
- Self-contained: Node 22+ only, no Python, Bun, or ripgrep required; answers cached locally; writes to stdout and creates no report files.
- Default filtering respects ignore files and skips hidden, dependency, build, binary, and obvious credential files.
Caveats
- Searches send source content to your chosen provider, and the filtering is best-effort, “not a guarantee” — point it only at trees you’re willing to send.
- The headline ~30% is agent-side cost from a single ten-task run; the newest evaluation’s combined cost was 2–3% higher than the prior release, and the authors state these runs establish no statistical equivalence.
- The CLI alone doesn’t teach your agent to use it — the skill is a separate install that doesn’t update with the package — and everything needs a provider key and network access. macOS or Linux only.
Verdict
If you run coding agents over unfamiliar repos and want to trim the file-hunting tax, it’s worth wiring in. If you already know the symbol, or need to stay offline, a direct read or rg still wins.
Frequently asked
- What is dzhng/jevgrep?
- Coding agents burn a chunk of every unfamiliar task just finding the right files; `jg` answers repository questions with verbatim source and line numbers.
- Is jevgrep open source?
- Yes — dzhng/jevgrep is open source, released under the MIT license.
- What language is jevgrep written in?
- dzhng/jevgrep is primarily written in TypeScript.
- How popular is jevgrep?
- dzhng/jevgrep has 3.2k stars on GitHub and is currently accelerating.
- Where can I find jevgrep?
- dzhng/jevgrep is on GitHub at https://github.com/dzhng/jevgrep.