jevgrep README

The project's README from github.com/dzhng/jevgrep. As one markdown file: README.md.

jevgrep — Same intelligence. About 30% lower cost.

jevgrep

npm MIT license Node.js 22+ Release

Same intelligence. ~30% lower cost.

Find code by asking what it does. In our ten-task SWE-bench comparison, Jevgrep successfully completed the same 8 of 10 tasks as the baseline, at lower cost.

Coding agents spend part of every unfamiliar task finding the right files. Jevgrep gives them a place to start: ask a repository question, and jg returns relevant files, reading leads, and verbatim source excerpts in one stdout response. It uses Jev to judge relevance across folders, files, and declarations. Your coding agent then implements and tests the change.

npm install -g @dzhng/jevgrep
jg auth
jg skill
jg "How are telemetry events recorded and sent?" ./my-project

Requires Node.js 22+, macOS or Linux, and a key for Vercel AI Gateway, TypeSafe, OpenRouter, or OpenCode Zen. No separate Python, Bun, or ripgrep installation is required to use jg.

Provider selection requires 0.3.0 or newer. Upgrade an older installation with npm install --global @dzhng/jevgrep@latest.

Install the agent skill — required for agent setup

Installing the CLI alone does not teach your coding agent to use it. Install the skill as well, from the project where your agent works:

jg skill

The installer detects your coding agents (Claude Code, Codex, OpenCode and others) and asks where to install. Add --global for a user-wide install, or --yes for unattended installation. The skill explains installation, invocation and the meaning of returned context. It leaves research and implementation decisions to the calling agent. The current repository skill checks for jg and installs the CLI if it is missing; authentication still needs your selected provider’s key. The skill installer itself does not configure credentials.

jg skill delegates to the skills CLI and needs npm/npx plus network access. You can also run that installer directly, without the CLI installed:

npx skills add dzhng/jevgrep --skill jevgrep

In 0.1.0, jg skill only prints the bundled skill; use npx skills with that version.

Upgrade

There is currently no jg upgrade command. Upgrade the CLI with npm:

npm install -g @dzhng/jevgrep@latest
jg --version

Update the installed skill separately by rerunning jg skill. Updating the npm package does not overwrite skill files in your projects. See the package guide for authentication details.

Start with a question, leave with source

Use jg when you know the behavior you need to understand but not where it lives:

jg "Where is authentication checked before a request reaches a handler?" .
jg "How are database connections created, pooled, and closed?" ./src
jg "Which tests cover retry behavior when a request times out?" .

Jevgrep explores the repository hierarchy and follows qualifying branches. It selects files using content previews, then identifies useful source units and surrounding context. It keeps qualifying file locations even when it cannot confidently return an excerpt; it does not force every search into a fixed top-two list.

The summary and compact file list come first, followed by selected source with line references, then detailed declaration and call locations. Python and TypeScript/JavaScript support declaration parsing; other text uses a fallback. The output is evidence for the agent to use, not a generated answer or a guarantee that every relevant file was found. See a recorded output example.

When you already know an exact symbol or path, a direct read or rg search may be all you need. Jevgrep is most useful for questions that span unfamiliar files.

What we measured

Same intelligence, ~30% lower coding-agent cost. Both Jevgrep and the no-Jev baseline solved 8/10 tasks. Full Sol cost fell from $7.62 to $5.44—a measured 28.6% reduction, rounded to ~30%—including failed attempts and excluding Jev cost.

Jevgrep workflow: about 30% lower coding-agent cost, with 8 of 10 tasks solved both with and without Jevgrep.

This comparison uses ten tuned Python SWE-bench tasks, one frozen installed package and the exact public skill in this repository. It measures task success and cost, not a speed improvement or guaranteed savings on every repository. See the results and methodology for per-task costs, artifact identities and limitations.

Source, credentials, and local state

Searches send eligible source content to Jev through the provider selected during auth. Default filesystem filtering respects ignore files and excludes hidden, dependency/build, binary, and obvious credential files. These filters are not a guarantee that all sensitive information has been removed; choose a search root you intend to send.

jg auth asks for your provider, then saves its key in an owner-only config file. Re-running auth replaces that setup; searches always use the saved provider. jg doctor checks it with synthetic input. Existing saved keys without a provider remain Vercel keys. Environment-based credentials and endpoint overrides are not used; run jg auth if you previously relied on them. Evaluation answers are cached locally by default. The CLI writes its output to stdout and does not create report files. Use jg --help for cache controls, search overrides, and incomplete-result behavior.

Development

The repository uses TypeScript, Bun workspaces, and Turborepo. From a checkout:

bun install --frozen-lockfile
bun run dev --help
bun run verify

Verification includes Docker tests of the installed Node-only package. For the reasoning behind retrieval, parsing, caching, and failure handling, start with the architecture and implementation record. Release guidance covers tag-triggered npm publication and verification of the exact public package.

MIT. Artwork and generation prompts.

jevgrep (dzhng/jevgrep)

Searching Database…

2.8K ·GitHub
这是什么?jevgrep(即 jg 命令行工具)让编程智能体通过用一个问题描述代码的功能来找到相关代码,而不是搜索确切的文本或路径。它使用名为 Jev 的引擎来判断文件夹、文件和声明的相关性,并把阅读线索和逐字源码摘录输出到 stdout。
如何把它加进我的编程智能体的工作流?用 npm install --global @dzhng/jevgrep 全局安装命令行工具,然后在你的项目中安装智能体技能,让智能体真正知道如何调用它。技能安装器会自动检测 Claude Code、Codex、OpenCode 等,并提供 --global 或 --yes 标志实现无人值守安装。
运行它之前需要准备什么?macOS 或 Linux 上的 Node.js 22+,以及 Vercel AI Gateway、TypeSafe、OpenRouter 或 OpenCode Zen 中任意一家的 API 密钥。无需单独安装 Python、Bun 或 ripgrep。
升级或语言覆盖方面有什么坑吗?目前还没有 jg upgrade 命令——你需要通过 npm 升级命令行工具,而且必须单独重新运行 jg skill,因为更新 npm 包不会刷新已安装到项目中的技能文件。另外,只有 Python 和 TypeScript/JavaScript 有真正的声明解析,其他语言会退回到纯文本匹配。
Jev 是什么?Jev 是 jevgrep 调用的相关性引擎,根据你用自然语言提出的关于代码库的问题,对文件夹、文件和声明进行评分和排序。
它实际能节省多少成本?在一项十任务的 SWE-bench 对比中,jevgrep 达到了与基线相同的 8/10 任务成功率,同时把智能体总成本从 $7.62 降到 $5.44——约降低 28.6%(约 30%)。
这个命令行工具实际输出什么?jg 先输出摘要和紧凑的文件列表,然后是带行号引用的精选源码摘录,最后是详细的声明和调用位置——全部输出到 stdout,不会生成报告文件。
什么时候应该直接用 ripgrep 就好?如果你已经知道确切的符号或文件路径,直接读取或用 rg 搜索更快;jevgrep 适合的是那些跨越你尚不了解的文件的问题。
Creator
dzhng
Size
11.5 MB
Stars
2.8K
Age
22d
Commits · 90 Days