dzhng/jevgrep
Find code by asking what it does. A CLI for coding agents that uses Jev to discover relevant files and source context.
jevgrep – AI‑powered code‑search for coding agents
What it does
jevgrepis a command‑line tool that lets a coding‑assistant (Claude Code, Codex, OpenCode, etc.) ask natural‑language questions about a code base and get back a concise list of the most relevant files, plus the exact source snippets and declaration locations that answer the query.- It works by sending the repository’s filtered source (respecting
.gitignore, hidden files, binaries, etc.) to a large‑language‑model endpoint – Vercel’s Jev model or any compatible TypeSafe‑style provider – which scores relevance across folders, files and code declarations. - The CLI returns a structured stdout output: a short summary, a compact file list, then the matching code excerpts with line numbers and call‑site information. The output is meant for the agent to consume, not to be shown directly to a human.
Why it matters
- In many AI‑driven development workflows the agent first needs to locate the right piece of code before it can generate a change. Traditional tools (
rg,git grep) require exact symbols or paths, which defeats the purpose when the agent only knows the behaviour it is looking for. - The README reports a benchmark (SWE‑bench) where using
jevgrepkept the same success rate (8/10 tasks) while cutting the total LLM‑inference cost by roughly 30 % compared with a baseline that performed no AI‑guided search.
How to get started
- Install globally with npm (requires Node 22+):
npm install -g @dzhng/jevgrep - Authenticate to a supported provider (Vercel AI Gateway, TypeSafe, OpenRouter, OpenCode Zen, or a custom compatible endpoint):
jg auth - Install the skill that teaches your coding agent to invoke the CLI:
jg skill # or: npx skills add dzhng/jevgrep --skill jevgrep - Run a natural‑language query against a repository:
The tool will output a list of candidate files and the matching code excerpts.jg "How are telemetry events recorded and sent?" ./my-project
Supported languages
- Full declaration parsing for Python, TypeScript/JavaScript, Go, and Rust.
- Other text files fall back to a simple content‑preview matcher.
Key commands
jg auth– store provider key.jg skill– install the agent‑side skill.jg <question> <path>– perform a relevance search.jg files <root>– list how many files would be scanned (no network call).jg doctor– verify authentication.jg --help– see cache and search‑override options.
Installation notes
- No external
ripgrepor Python runtime is needed; the tool is pure Node. - Works on macOS, Linux, and Windows.
- Updates are done via npm; the skill must be re‑installed separately.
Development
- The repo uses TypeScript, Bun workspaces, and Turborepo.
- Tests run in Docker to ensure the published npm package works without extra dependencies.
License – MIT.
jevgrep is a genuine AI‑enhanced code‑search utility aimed at reducing the inference cost of coding agents while keeping their problem‑solving ability intact.
Related
- Project
- Project
- Project
- Project
- Project