ev-grep
A command-line search tool for finding code by behavior.
Install
curl -fsSL https://ev-grep.com/install.sh | bashmacOS and Linux · mise, versions, source →
Search
export OPENROUTER_API_KEY='your-key'
ev-grep 'Retries failed HTTP requests' src/query: "Retries failed HTTP requests"
┌─ example: src/retry.ts ───────────────┐
│ │
│ async function request(url) { │
│ try { return await fetch(url); } │
│ catch { return fetch(url); } │
│ } │
│ │
└───────────────────┬───────────────────┘
│
▼
Jev assessment
│
┌────────────────┘
│
│ ┌───────────────┐
│ │ │
├───▶│ match │───▶ show file
│ │ │
│ └───────────────┘
│
│ ┌───────────────┐
│ │ │
├───▶│ uncertain │───▶ show file
│ │ │
│ └───────────────┘
│
│ ┌───────────────┐
│ │ │
└───▶│ no_match │───▶ omit file
│ │
└───────────────┘Matching and uncertain locations appear in the terminal. Use --json for every result, or --dry-run to preview files without sending them.
Searches send file contents to Jev through your provider. Results can be wrong; use them to decide what to read. Concepts →
Search functions
ast-grep run --kind function_declaration --lang ts --json=stream src/ |
ev-grep 'Retries a failed request' --candidates - --jsonEach result keeps the selected text, source range, and model scores. Use --stdin to search a text stream.
Queries
- Error handling
'Catches a database failure and returns an empty result'- Authentication
'Checks permissions before deleting a resource'- Code review
'Writes to the database'
Benchmarks
1 file220 ms
4 files256 ms
16 files690 ms
1 KiB per file · Jev via OpenRouter · five measured runs · Apple M5 Pro.
View measurements →