Skip to content

lci

Sub-millisecond semantic code search. Built for AI assistants.

Lightning Code Index (lci) is the C++ implementation of lci — sub-millisecond semantic code search over large corpora, with ~80% context reduction versus Grep. It parses 13 languages with tree-sitter and exposes the index through a CLI, an MCP server for AI assistants, and an HTTP server over a Unix domain socket.

Sub-millisecond search

Literal match, optional synonym expansion, and regex fallback — over an in-memory trigram index. Results carry the enclosing symbol’s metadata.

13 languages

Go, Python, JavaScript, TypeScript (incl. TSX), Rust, C, C++, Java, C#, PHP, Kotlin, Zig, and Ruby via vendored tree-sitter grammars.

MCP-native

lci mcp exposes 14 tools to AI assistants over stdio — search, symbol lookup, code insight, git analysis, and more.

Four surfaces

CLI for interactive use, lci server over a Unix socket / HTTP, and lci mcp for agent integration — one engine, four ways in.

Terminal window
lci search "myFunction"
lci def MasterIndex
lci tree run_search
lci git-analyze

| Surface | Use | |---------|-----| | lci search PATTERN | substring + symbol-aware ranked search across the corpus | | lci grep PATTERN | literal text search over the corpus, grep-style output | | lci tree SYMBOL | function call hierarchy with annotations | | lci def SYMBOL / lci refs SYMBOL | definition + reference lookup | | lci git-analyze | analyze working-set changes for duplicates, naming, complexity | | lci mcp | MCP server over stdio for AI assistants | | lci server | long-running HTTP server over a Unix socket; per-project daemon | | lci status | index health + runtime metrics (-v/--verbose for detail) |

Indexer pipeline

scanner → parser pool (tree-sitter) → trigram bucketer (256-way sharded) → merger → search engine.

Lock-free hot path

RCU-style atomic snapshot for reads; mutex only on the write/indexing path. Per-language parser pools, no global lock.

Full CLI reference: lci --help or lci <command> --help.