Quick Start
This walkthrough takes you from zero to searching your codebase in under a minute.
1. Index your project
Section titled “1. Index your project”From your project root:
rfx indexReflex walks your source tree, extracts trigrams for every file, and builds a memory-mapped index. On a typical project (1,000–5,000 files), this takes 1–3 seconds.
Indexed 1,247 files (8 languages) in 1.8sThe index is incremental — subsequent runs only reprocess changed files using blake3 content hashing.
2. Search for text
Section titled “2. Search for text”rfx query "handleRequest"This performs a full-text search across every indexed file. Results include file path, line number, and a snippet of matching context:
src/server/handler.rs:42 pub fn handleRequest(req: Request) -> Response {src/tests/server_test.rs:18 let response = handleRequest(mock_request());2 results in 3ms3. Filter by symbols
Section titled “3. Filter by symbols”Add --symbols (or -s) to restrict results to symbol definitions — functions, classes, structs, types:
rfx query "handleRequest" --symbolssrc/server/handler.rs:42 [Function] pub fn handleRequest(req: Request) -> Response {1 result in 4msUse --kind to narrow further:
rfx query "Config" --symbols --kind struct4. Filter by language
Section titled “4. Filter by language”rfx query "import" --lang typescript5. Get JSON output
Section titled “5. Get JSON output”For scripts and AI pipelines, use --json:
rfx query "authenticate" --symbols --json{ "metadata": { "status": "fresh", "total_results": 1, "query_time_ms": 3 }, "results": [ { "file": "src/auth/mod.rs", "line": 42, "column": 8, "match": "pub fn authenticate(credentials: &Credentials) -> Result<Session>", "symbol": "authenticate", "kind": "Function", "language": "rust" } ]}6. Interactive mode
Section titled “6. Interactive mode”Launch the TUI for live, interactive search:
rfx queryType to search, use arrow keys to navigate results, and press Enter to open a file in your editor. See the Interactive Mode guide for keybindings and editor integration.
Next steps
Section titled “Next steps”- Configuration — customize index settings, file limits, and performance tuning
- Full-Text Search — understand trigram search in depth
- Symbol Search — filter by functions, classes, and more
- AI Integration — connect Reflex to AI coding assistants via MCP