grep finds what you typed. ivygrep finds what you meant.
Ask your code a question in plain words. Get ranked files, line numbers, and the code itself. Indexing and search run on your machine, for you and for your coding agents.
brew install bvolpato/tap/ivygrep
curl -fsSL https://raw.githubusercontent.com/bvolpato/ivygrep/main/install.sh | sh
irm https://raw.githubusercontent.com/bvolpato/ivygrep/main/install.ps1 | iex
Free and MIT licensed. No account and no telemetry. All install options
We asked ripgrep’s own source code:
$ ig "which thread count does it pick by default
"
crates/core/flags/hiargs.rstop result
1362}1363Ok(builder.build()?)1364}13651366/// Use "heuristics" to determine the default thread count.1367fn default_thread_count() -> usize {1368std::thread::available_parallelism().map_or(1, |n| n.get()).min(12)1369}1370
- then crates/core/flags/defs.rs:7104
- then crates/printer/src/summary.rs:42
rg -i thread in the same tree: 201 lines in 20 files
$ ig "ignore rules from the global git config
"
crates/ignore/src/gitignore.rstop result
119120/// Creates a new gitignore matcher from the global ignore file, if one121/// exists.122///123/// The global config file path is specified by git's `core.excludesFile`124/// config option.125///126/// # Behavior127///
- then crates/ignore/src/dir.rs:1008
- then crates/ignore/src/walk.rs:927
rg -i ignore in the same tree: 3,911 lines in 78 files
$ ig "how does it know a file is binary
"
crates/searcher/src/searcher/mod.rstop result
53/// few KB of the data are searched for binary data.54#[derive(Clone, Debug, Default, Eq, PartialEq)]55pub struct BinaryDetection(line_buffer::BinaryDetection);5657impl BinaryDetection {58/// No binary detection is performed. Data reported by the searcher may59/// contain arbitrary bytes.60///61/// This is the default.
- then crates/core/flags/defs.rs:433
- then crates/core/flags/hiargs.rs:1315
rg -i binary in the same tree: 837 lines in 62 files
$ ig "what happens on a broken pipe
"
crates/core/main.rstop result
43fn main() -> ExitCode {44match run(flags::parse()) {45Ok(code) => code,46Err(err) => {47// Look for a broken pipe error. In this case, we generally want48// to exit "gracefully" with a success exit code. This matches49// existing Unix convention. We need to handle this explicitly50// since the Rust runtime doesn't ask for PIPE signals, and thus51// we get an I/O error instead. Traditional C Unix applications
- then crates/ignore/src/walk.rs:2985
- then crates/core/messages.rs:52
rg -i pipe in the same tree: 67 lines in 18 files
$ ig "parse human readable sizes like 10M
"
crates/cli/src/human.rstop result
67std::io::Error::new(std::io::ErrorKind::Other, size_err)68}69}7071/// Parse a human readable size like `2M` into a corresponding number of bytes.72///73/// Supported size suffixes are `K` (for kilobyte), `M` (for megabyte) and `G`74/// (for gigabyte). If a size suffix is missing, then the size is interpreted75/// as bytes. If the size is too big to fit into a `u64`, then this returns an
- then crates/core/flags/parse.rs:158
- then crates/cli/src/lib.rs:118
rg -i size in the same tree: 664 lines in 63 files
$ ig "walk directories in parallel with work stealing
"
crates/ignore/src/walk.rstop result
1464skip: Option<Arc<Handle>>,1465filter: Option<Filter>,1466}14671468impl WalkParallel {1469/// Execute the parallel recursive directory iterator. `mkf` is called1470/// for each thread used for iteration. The function produced by `mkf`1471/// is then in turn called for each visited file path.1472pub fn run<'s, F>(self, mkf: F)
- then crates/core/main.rs:307
- then crates/ignore/src/overrides.rs:271
rg -i parallel in the same tree: 119 lines in 20 files
Recorded results from ig 1.3.6 on BurntSushi/ripgrep 16.0.0. The keyword line is what ripgrep finds for the word you would probably try first. Use each tool for what it is good at.
Ask when you don’t know the name. Be exact when you do.
The first query indexes the repository. After that, a local daemon watches for changes and keeps the same index ready for every kind of search.
| Code by intent | ig "where is authentication handled?" | Files ranked by meaning, keywords, symbols, and paths |
|---|---|---|
| An exact string | ig --literal "handleAuth" | Files ranked by matching lines |
| A definition | ig --symbol calculate_tax | Where the symbol is defined |
| Every use | ig --refs calculate_tax | References and calls |
| Who calls it | ig --callers calculate_tax | The functions that contain the calls |
| This, but not that | ig "settings NOT render" | Boolean AND, OR, and NOT |
| One part of the tree | ig "database migrations" src/api/ | Add --type, --include, or --exclude to narrow further |
| Every project | ig --all "retry policy" | All workspaces that you indexed |
| Your notes | ig "what did we decide about cache invalidation?" ~/notes | Markdown, text, JSON, and other documents |
| With a screen | ig --interactive or ig --web | A terminal UI, or a local Web UI that requires a session token |
45 language and file types. Tree-sitter splits 24 of them into functions and classes: Rust, Python, Go, JavaScript, TypeScript, Java, C, C++, C#, Kotlin, Scala, PHP, Ruby, Swift, Elixir, Zig, Bash, Haskell, OCaml, Lua, Dart, Objective-C, Perl, and Starlark. The other 21 use heuristic or text chunks: Nim, Groovy, Erlang, Clojure, R, Julia, PowerShell, SQL, Protobuf, Thrift, GraphQL, Terraform, Dockerfile, Makefile, Markdown, HTML, CSS, XML, JSON, configuration files, and plain text.
Give your agent the code behind the task.
ig context starts from your task and follows the code: definitions, callers, references, dependencies, dependents, tests, configuration, and docs. It stops at the token budget you set, and every item says why it is there.
ig context "expand a tilde in the global core.excludesFile path" --budget 2000480 of 500 estimated tokens. 2 items from 1 file.
- crates/ignore/src/gitignore.rs:986-999primary, testrank 1 for primary retrieval180 tokens
- crates/ignore/src/gitignore.rs:718-727dependencycrates/ignore/src/walk.rs depends on crates/ignore/src/gitignore.rs175 tokens
980 of 1,000 estimated tokens. 3 items from 2 files.
- crates/ignore/src/gitignore.rs:986-1014primary, testrank 1 for primary retrieval300 tokens
- crates/ignore/src/gitignore.rs:718-736dependencycrates/ignore/src/walk.rs depends on crates/ignore/src/gitignore.rs296 tokens
- crates/ignore/src/walk.rs:920-935primary, dependentcrates/ignore/src/walk.rs depends on crates/ignore/src/gitignore.rs258 tokens
1,970 of 2,000 estimated tokens. 7 items from 5 files.
- crates/ignore/src/gitignore.rs:986-1014primary, testrank 1 for primary retrieval300 tokens
- crates/ignore/src/gitignore.rs:718-743dependencycrates/ignore/src/walk.rs depends on crates/ignore/src/gitignore.rs388 tokens
- crates/ignore/src/walk.rs:913-941primary, dependentcrates/ignore/src/walk.rs depends on crates/ignore/src/gitignore.rs369 tokens
- crates/ignore/tests/gitignore_matched_path_or_any_parents_tests.rs:15-22dependent, testcrates/ignore/tests/gitignore_matched_path_or_any_parents_tests.rs depends on crates/ignore/src/gitignore.rs171 tokens
- crates/core/flags/defs.rs:4906-4934primaryrank 2 for primary retrieval272 tokens
- crates/core/flags/defs.rs:4831-4847testrank 1 for anchor test retrieval195 tokens
- crates/ignore/src/lib.rs:21-29dependencycrates/ignore/src/gitignore.rs depends on crates/ignore/src/lib.rs152 tokens
3,974 of 4,000 estimated tokens. 13 items from 11 files.
- crates/ignore/src/gitignore.rs:986-1014primary, testrank 1 for primary retrieval300 tokens
- crates/ignore/src/gitignore.rs:718-743dependencycrates/ignore/src/walk.rs depends on crates/ignore/src/gitignore.rs388 tokens
- crates/ignore/src/walk.rs:913-941primary, dependentcrates/ignore/src/walk.rs depends on crates/ignore/src/gitignore.rs369 tokens
- crates/ignore/tests/gitignore_matched_path_or_any_parents_tests.rs:15-22dependent, testcrates/ignore/tests/gitignore_matched_path_or_any_parents_tests.rs depends on crates/ignore/src/gitignore.rs171 tokens
- crates/core/flags/defs.rs:4906-4934primaryrank 2 for primary retrieval272 tokens
- crates/core/flags/defs.rs:4831-4847testrank 1 for anchor test retrieval195 tokens
- crates/ignore/src/lib.rs:21-29dependencycrates/ignore/src/gitignore.rs depends on crates/ignore/src/lib.rs152 tokens
- crates/ignore/src/dir.rs:69-99dependentcrates/ignore/src/dir.rs depends on crates/ignore/src/gitignore.rs411 tokens
- crates/ignore/src/overrides.rs:15-28dependentcrates/ignore/src/overrides.rs depends on crates/ignore/src/gitignore.rs229 tokens
- crates/ignore/src/pathutil.rs:5-39dependencycrates/ignore/src/gitignore.rs depends on crates/ignore/src/pathutil.rs318 tokens
- crates/core/flags/mod.rs:52-73dependencycrates/core/flags/defs.rs depends on crates/core/flags/mod.rs434 tokens
- crates/core/flags/parse.rs:56-82dependencycrates/core/flags/defs.rs depends on crates/core/flags/parse.rs446 tokens
- crates/ignore/benches/workloads.rs:89-100dependentcrates/ignore/benches/workloads.rs depends on crates/ignore/src/gitignore.rs169 tokens
4,711 of 8,000 estimated tokens. 14 items from 12 files.
- crates/ignore/src/gitignore.rs:986-1014primary, testrank 1 for primary retrieval300 tokens
- crates/ignore/src/gitignore.rs:718-743dependencycrates/ignore/src/walk.rs depends on crates/ignore/src/gitignore.rs388 tokens
- crates/ignore/src/walk.rs:913-941primary, dependentcrates/ignore/src/walk.rs depends on crates/ignore/src/gitignore.rs369 tokens
- crates/ignore/tests/gitignore_matched_path_or_any_parents_tests.rs:15-22dependent, testcrates/ignore/tests/gitignore_matched_path_or_any_parents_tests.rs depends on crates/ignore/src/gitignore.rs171 tokens
- crates/core/flags/defs.rs:4906-4934primaryrank 2 for primary retrieval272 tokens
- crates/core/flags/defs.rs:4831-4847testrank 1 for anchor test retrieval195 tokens
- crates/ignore/src/lib.rs:21-29dependencycrates/ignore/src/gitignore.rs depends on crates/ignore/src/lib.rs152 tokens
- crates/ignore/src/dir.rs:69-99dependentcrates/ignore/src/dir.rs depends on crates/ignore/src/gitignore.rs411 tokens
- crates/ignore/src/overrides.rs:15-28dependentcrates/ignore/src/overrides.rs depends on crates/ignore/src/gitignore.rs229 tokens
- crates/ignore/src/pathutil.rs:5-39dependencycrates/ignore/src/gitignore.rs depends on crates/ignore/src/pathutil.rs318 tokens
- crates/core/flags/mod.rs:52-73dependencycrates/core/flags/defs.rs depends on crates/core/flags/mod.rs434 tokens
- crates/core/flags/parse.rs:56-82dependencycrates/core/flags/defs.rs depends on crates/core/flags/parse.rs446 tokens
- crates/ignore/benches/workloads.rs:58-100dependentcrates/ignore/benches/workloads.rs depends on crates/ignore/src/gitignore.rs452 tokens
- crates/ignore/src/incremental.rs:14-37dependencycrates/ignore/src/walk.rs depends on crates/ignore/src/incremental.rs454 tokens
Recorded with ig 1.3.6 on the same ripgrep source. Rose marks primary evidence. Green marks code reached through a relationship. The budget covers the rendered pack, so headings count too.
Start from your branch
ig context "fix refresh-token races" --since main --budget 8000
The pack covers commits since the merge base with main, plus staged, unstaged, and untracked files.
Start from an error
pytest 2>&1 | ig context -
Paths in a pasted trace or issue become starting points. The output is evidence to read: it does not generate an answer or edit files.
Connect the agent you already use.
One command adds ivygrep to the client, keeps your existing configuration, checks the MCP handshake, and runs a search.
One command
ig agent install claude
Or the plugin, with a task-context skill
claude plugin marketplace add bvolpato/ivygrep claude plugin install ivygrep@ivygrep
Manual MCP setup
claude mcp add -s user ig -- ig --mcp
One command
ig agent install codex
Or the plugin, with a task-context skill
codex plugin marketplace add bvolpato/ivygrep codex plugin add ivygrep@ivygrep
Manual MCP setup
codex mcp add ig -- ig --mcp
One command
ig agent install cursor
Manual MCP setup, in .cursor/mcp.json
{"mcpServers":{"ig":{"type": "stdio", "command": "ig", "args": ["--mcp"]}}}Manual MCP setup, in opencode.json
{"mcp":{"ig":{"type": "local", "command": ["ig", "--mcp"], "enabled": true}}}What the agent asks for
ig_search query: "fix refresh-token races" path: "/absolute/repository/path" output=context_pack since=main budget_tokens=8000
What to put in your agent instructions
Use ivygrep before broad filesystem scans. Pass the absolute active worktree path. Use natural-language queries for concepts and literal=true for identifiers. For implementation, request output=context_pack with budget_tokens=8000.
After setup, restart an open client. ig agent doctor checks the connection.
Index once. It keeps up.
Search starts before indexing finishes
Keyword and exact search come first. Background workers then add hash vectors and neural vectors.
Edits arrive on their own
The daemon watches your files and updates only what changed. A file confirmed as missing leaves the results at once.
Worktrees share one index
Worktrees reuse one base index and store only divergent chunks and tombstones. Ten worktrees do not need ten complete indexes.
Your code stays where it is.
This is everything that leaves your machine:
| Source, notes, queries, results | Nothing | Indexing and search run locally. There is no hosted inference. |
|---|---|---|
| Embeddings and indexes | Nothing | They live in ~/.local/share/ivygrep. ig --rm deletes one. |
| Telemetry | None | There is no account and no usage reporting. |
| The default model | One download | 33.5 MB of pinned potion-code-16m-v2 assets on first use. It runs on CPU. --hash avoids the download. |
| The Web UI | Only if you bind it | Loopback by default, with a session token in every case. Non-loopback serving is plain HTTP: use a trusted network or a tunnel. |
Measured in public, misses included.
Every number names its version and links to its method and raw data. Performance depends on your hardware, your repository, and load.
| Issue text to fixed file | 70% | of 30 real issues from 10 open source projects had a file that the fix touched in the top five results. It was first for 47%. Default routing, v1.3.5. Rust scored lowest, at 40%. Method and losses |
|---|---|---|
| Context pack coverage | 77% | of packs for the same 30 issues contained a file that the fix touched, at 4,172 tokens on average, v1.3.5. Method |
| Notes and memory | 74.9% | recall@20 on MemoryQuest at 87.63 ms warm p95, v1.2.7. It measures retrieval, not answer accuracy or the current model. Report |
| A million chunks | 6.19 ms | warm CLI p95, with 150,576 chunks/s indexing and a 0.42 GiB index. Median of three sequential v1.2.7 trials on deterministic synthetic data, hash-only. Scale and footprint, not semantic quality or agent outcomes. Data and method |
All benchmark reports, including the cost of the current model under concurrent load.
Install
Homebrew
brew install bvolpato/tap/ivygrep
macOS and Linux. Metal build on Apple Silicon, portable build elsewhere.
Shell installer
curl -fsSL https://raw.githubusercontent.com/bvolpato/ivygrep/main/install.sh | sh
macOS and Linux. Picks a compatible build and checks its SHA-256. CUDA is used only on Linux x86_64 with a supported GPU and runtime.
WinGet
winget install --id BrunoVolpato.ivygrep --exact
Windows. WinGet updates can lag GitHub releases.
PowerShell installer
irm https://raw.githubusercontent.com/bvolpato/ivygrep/main/install.ps1 | iex
Windows. Installs the latest published version, or the one that IVYGREP_VERSION names.
CUDA and Metal only speed up optional transformer models. ig hardware shows your build and the matching install command.
- Open a repository and ask.
ig "where is refresh token rotated?"
- Build context for a task.
ig context "fix token races"
- Connect your agent.
ig agent install claude