Locus

•
5
•

Provides lightning-fast, highly accurate semantic and lexical search capabilities for your codebase, understanding natural language queries.

Locus is a powerful, pure Rust-based command-line tool designed for developers and coding agents to swiftly find relevant code segments using natural language or symbols. It employs a sophisticated three-layer search approach, combining lexical BM25, local semantic embeddings, and an optional cross-encoder reranker to achieve exceptional recall and precision. The tool indexes codebases by parsing semantically meaningful chunks across numerous programming languages and ensures privacy by keeping all data local to your machine. It also offers an MCP server mode for seamless integration with coding agents, exposing precise codebase interaction tools.

主要功能

01Hybrid search combining lexical (BM25), local semantic embeddings, and a reranker for accuracy.
02Indexes and searches across 12+ programming languages, markdown, and configuration files.
03Provides an interactive terminal UI, JSON output, and an MCP server for agent integration.
04Supports natural language queries to find specific code logic or patterns.
05Operates entirely locally, ensuring data privacy and security.
064 GitHub stars

使用案例

01Efficiently explore and understand unfamiliar codebases by searching for high-level concepts.
02Quickly locate specific code logic or patterns within a codebase using fuzzy or natural language queries.
03Integrate advanced semantic codebase search into coding agents and automated development workflows.