
Reflex
Local-first Rust code search engine: sub-100ms trigram search across 10k+ files with an MCP server.
About
Reflex is a local-first, full-text code search engine written in Rust, designed as a fast deterministic replacement for Sourcegraph Code Search in AI coding workflows. It uses trigram-based indexing with memory-mapped I/O to answer full-text queries in under 100ms across 10k+ files, finding every occurrence of patterns (function calls, variable usage, comments), not just symbol definitions.
It pairs the trigram index with runtime Tree-sitter symbol parsing, incremental reindexing via blake3 content hashing, and JSON output built for agents. It ships a CLI (rfx), an interactive TUI, an rfx ask natural-language query mode (OpenAI, Anthropic, OpenRouter, Ollama, and other OpenAI-compatible endpoints), and an MCP/HTTP server mode so AI coding agents can search the whole codebase in a single tool call. It is MIT licensed and installable via cargo install reflex-search.
The honest picture: Reflex is deterministic by design (same query, same results), which is a feature for agents but means no semantic ranking out of the box. It is a smaller project than Sourcegraph or Zoekt-backed tooling, so long-term maintenance is a consideration. There are forks under the same name; the reflex-search org is the canonical home.
What it can do
- Sub-100ms trigram full-text search over large codebases
- Tree-sitter symbol extraction across 18 languages
- MCP server and JSON output for AI agents
- Natural-language search via rfx ask
Setup
cargo install reflex-search, then rfx index in the project directory.
Prerequisites
Rust toolchain (cargo) for installation; runs fully offline afterwards.
Use cases
Works with
Trust score — 7/10
Scored 7/10 (metrics tier, metrics-v1). Evidence: Verified via vendor site/docs/GitHub and reputable coverage, wave 114; Trending score 72/100 from researcher assessment.
Sources
Every fact above was checked against these sources. Where a claim comes from the provider and couldn't be independently verified, the text says so.