Start with a name.
Exact names, substrings, or an adjacent typo. Search live filenames, then refine by glob, type, size, age or Git status.
Available in source 0.4.0.
hay --find sesison .
Explore filename search
Meet hay, a ranked grep for coding agents. Ripgrep’s matching engine, with likely definitions first—and one result per file before a file’s second line.
Complete searches preserve the normalized ripgrep match set. Candidate caps or read errors return exit 2, so an incomplete answer stays explicit.
In this fixture, the declaration moves from fourth to first. The matches stay the same.
hay validateSession .Illustrative fixture · 6 matches · 4 filesrg --sort pathPath orderThe migration notes mention validateSession; the implementation lives in src/auth/session.ts.import { validateSession } from "./session";console.assert(validateSession("token"));export function validateSession(token: string): boolean {import { validateSession } from "../auth/session"; return validateSession(token);export function validateSession(token: string): boolean {import { validateSession } from "../auth/session";import { validateSession } from "./session";The migration notes mention validateSession; the implementation lives in src/auth/session.ts. return validateSession(token);console.assert(validateSession("token"));Real output from a small, synthetic fixture. This shows the mechanism, not general retrieval quality. Inspect the fixture and commands
Two deliberate additions to a focused tool. Neither changes ordinary content ranking.
Exact names, substrings, or an adjacent typo. Search live filenames, then refine by glob, type, size, age or Git status.
Available in source 0.4.0.
hay --find sesison .
Explore filename search
Use grep, find_files and
multi_grep through stdio MCP. You choose the Git repositories;
every query reads live files.
Available in source 0.4.0.
hay --mcp --root .
Set up MCP
The public test asks for a declaring file. That is hay’s home turf; it does not measure an agent completing a task.
Mean reciprocal rank: 1.0 means the declaring file is first on every query. Historical results from 2026-08-28, using hay 0.3.0.
| Corpus | hay | rg path order | Difference 95% interval |
|---|---|---|---|
| Linux kernel30 queries | 0.933 | 0.541 | +0.392[0.247, 0.544] |
| openclaw30 queries | 0.928 | 0.819 | +0.109[0.035, 0.200] |
| ripgrep23 queries | 0.877 | 0.419 | +0.458[0.304, 0.613] |
| Alamofire29 queries | 0.776 | 0.433 | +0.343[0.235, 0.459] |
The separate documentation track has no detected wins and four regressions. Read the complete report for methods, exclusions and both statistical tests.
Median-repository MRR 0.4328 / 0.50; answer in the top ten 77.21% / 80%. Historical corpus: 2026-09-23. These results were not rerun for this release, and the gate was not moved.
Read the research recordA silent overview of the search order, source-only filename and MCP modes, dated evidence and installation choices.
Same matches. Better order. hay is a ranked grep for coding agents. Likely definitions come first, then one result from each file. Complete searches preserve the normalized ripgrep match set; caps or read errors mean incomplete results.
The search order moves. The illustrative
hay validateSession . fixture has six matches in
four files. The declaration moves from fourth to first, with all six matches
retained. Four different files appear before any file’s second result.
Read both complete result lists above.
Source 0.4.0 features.
hay --find sesison . finds exact names, substrings
and an adjacent typo. hay --mcp --root . manually
starts stdio MCP with grep,
find_files and multi_grep.
Both use live files. MCP searches stay within explicit Git repository scopes;
there is no persistent index or search history.
Evidence and limits. The historical hay 0.3.0 definition-finding benchmark is dated 2026-08-28. The table above gives all four corpora, query counts, MRR values, absolute differences and 95% intervals shown in the film. Definition finding is hay’s home turf, not agent-task success. The documentation track has zero detected wins and four detected regressions. The private behavioral gate still fails and was not rerun for these source-only features.
Choose an installation.
brew install mneves75/tap/hay installs supported
binary 0.3.2. Filename discovery and MCP require source
0.4.0. Use the pinned
--locked source instructions below.
The film ends at mneves75.github.io/hay/ for the
methods and complete installation instructions.
Use the supported release, or build the pinned source for the new filename and MCP modes.
Supported binary 0.3.2.
macOS and Linux; prebuilt and attested.
brew install mneves75/tap/hay
Source 0.4.0.
Includes --find and --mcp.
Requires Rust 1.88 or later.
git clone https://github.com/mneves75/hay.git
cd hay
git checkout --detach 268e41834a0a66d922102edc70a97f5ca82aca8e
cargo install --locked --path hay
Make your first search, then keep the manual close. Flags, JSON, exit codes and MCP configuration are all there.