codelens-engine
Core code intelligence engine for CodeLens MCP.
Pure Rust library providing tree-sitter-based symbol extraction, import graph analysis, and optional embedding-based semantic search across 25 programming languages.
Features
- Symbol extraction — AST-based parsing for functions, classes, types, variables
- Import graph — cross-file dependency tracking with cycle detection
- Scope analysis — block-level scope resolution for rename safety
- Call graph — static call relationship extraction
- Type hierarchy — inheritance/implementation chain analysis
- LSP integration — optional Language Server Protocol bridge
- Semantic search — embedding-based code search (feature-gated:
semantic)
Language Support
Rust, TypeScript, JavaScript, Python, Go, Java, Kotlin, C, C++, PHP, Swift, Scala, Ruby, C#, Dart, Lua, Zig, Elixir, Haskell, OCaml, Erlang, R, Bash, Julia, Clojure
Usage
[]
= "1.7"
# With semantic search:
= { = "1.7", = ["semantic"] }
use ;
let project = discover.unwrap;
let index = build.unwrap;
let symbols = index.symbols_in_file;
Feature Flags
| Feature | Default | Description |
|---|---|---|
semantic |
yes | Embedding-based search via fastembed + sqlite-vec |
License
Apache-2.0