Skip to content

Quick Start

This walkthrough takes you from zero to searching your codebase in under a minute.

From your project root:

Terminal window
rfx index

Reflex 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.8s

The index is incremental — subsequent runs only reprocess changed files using blake3 content hashing.

Terminal window
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 3ms

Add --symbols (or -s) to restrict results to symbol definitions — functions, classes, structs, types:

Terminal window
rfx query "handleRequest" --symbols
src/server/handler.rs:42 [Function] pub fn handleRequest(req: Request) -> Response {
1 result in 4ms

Use --kind to narrow further:

Terminal window
rfx query "Config" --symbols --kind struct
Terminal window
rfx query "import" --lang typescript

For scripts and AI pipelines, use --json:

Terminal window
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"
}
]
}

Launch the TUI for live, interactive search:

Terminal window
rfx query

Type 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.