Open source · Local-first · MCP-native

Give coding agents the right context, not more context.

FireLens is the open-source local code search engine for AI coding agents — lexical, semantic, and graph retrieval fused with RRF, native MCP tools, and Mojo-accelerated hot paths. Your code never leaves your machine.

firelens / search_code

localhost
where are indexes persisted?
Hybrid RRF · lexical + semantic Auto-selected
default_database_path

app/storage/database.py:46–82

bounded

BM25 lexical hits and semantic hits fused by reciprocal-rank fusion.

rrf k=60 · rank 1 of 5
Local-firstYour code never leaves your machine.
Hybrid retrievalLexical + semantic, fused with RRF.
Graph searchQuery the repo dependency graph.
Mojo accelerationMeasured speed where it wins.

From repository to useful context.

FireLens turns a checked-out codebase into a local search engine your agent can query — lexical, fuzzy, semantic, hybrid, and graph — without moving source code through another service.

Acceleration where it earns its place.

These numbers show how much faster is the Mojo acceleration than Python for the same query, on the same machine. Timings measure complete calls, including Python-to-native buffer preparation.

Read the benchmark method
Fuzzy search · Mojo vs Python · 512 candidates4.04× faster

The same fuzzy query drops from an 11.257 ms Python median to 2.788 ms with Mojo.

Python p95 11.388 ms · Mojo p95 2.850 ms · 30 iterations
Semantic search · Mojo vs Python · 50k × 7681.19× faster

Ranking 50,000 vectors takes 6.490 ms with Mojo against 7.696 ms in Python and NumPy.

Python p95 8.039 ms · Mojo p95 7.456 ms · 30 iterations

Auto routes Mojo fuzzy at ≥4 candidates and semantic ranking at ≥30,000 rows.

Apple M4 Max · 16 logical CPUs · 30 measured iterations

The local engine in a hosted world.

Sourcebot and Sourcegraph made code search a product you host and browse. FireLens gives your agents deeper retrieval, zero infrastructure, and code that never leaves the machine it lives on.

Capability FireLensSourcebotSourcegraph
Runs where your code livesLocal CLI and MCP — no server, no DockerSelf-hosted web serverCloud or enterprise install
Lexical searchSQLite FTS5 · BM25 rankingRegex and symbolsRegex and symbols
Semantic searchLocal 768-d vector embeddings
Hybrid rankingRRF fusion of lexical + semantic
Graph searchDependency-graph traversal
Accelerated hot pathsExperimental Mojo · up to 4.04×
Built for coding agentsMCP-native from day oneBrowser-first experienceBrowser-first experience
Where your code livesNever leaves your diskIndexed on a serverIndexed on a server

Based on publicly documented features. Sourcebot and Sourcegraph are trademarks of their respective owners.

Less setup. More signal.

Install FireLens, index a local repository, and ask for the code your agent needs next.

Read the docs

terminal

# install
$ git clone https://github.com/aslanbayli/firelens.git
$ cd firelens && uv sync

# retrieve
$ uv run firelens index /path/to/repo
$ uv run firelens search /path/to/repo "where are indexes persisted?" --mode auto

Designed for complex codebases.

Does FireLens send my source code anywhere?+

No. FireLens indexes local repository paths and persists indexes in SQLite on your disk. Its retrieval surfaces are a local CLI, Streamlit, and STDIO MCP tools — there is no cloud component.

What makes the search hybrid?+

Lexical hits come from SQLite FTS5 with BM25 ranking; semantic hits come from local vector embeddings. Reciprocal-rank fusion (RRF) merges the two lists, so exact keywords and natural-language intent reinforce each other instead of competing.

What is graph search?+

FireLens represents your repository as a dependency graph of imports, symbols, and call relationships, then searches over it. That answers structural questions keyword search can't — like who calls a symbol or what a module depends on.

Which repositories are supported today?+

The current parser is Python-first. The architecture keeps the parser boundary explicit so additional languages can be added without changing retrieval contracts.

Is Mojo required?+

No. Python and NumPy provide the reference path. Mojo is optional and used only for fuzzy and semantic workloads where the benchmark supports it.

How do coding agents connect?+

FireLens exposes local STDIO MCP tools for index status, indexing, and bounded code search.

Your context window is valuable.

Give your agent better context.

Explore FireLens