Skip to content

CodexLens Code Indexing

One-Liner

CodexLens is a semantic code search engine — Based on vector databases and LSP integration, it enables AI to understand code semantics rather than just keyword matching.


Pain Points Solved

Pain PointCurrent StateCodexLens Solution
Imprecise searchKeywords can't find semantically related codeSemantic vector search
No contextSearch results lack call chain contextLSP integration provides reference chains
No understandingAI doesn't understand code relationshipsStatic analysis + semantic indexing
Slow navigationManual file traversalInstant semantic navigation

vs Traditional Methods

DimensionText SearchIDE SearchCodexLens
Search typeKeywordKeyword + symbolSemantic vector
ContextNoneFile-levelCall chain + imports
AI-readyNoNoDirect AI consumption
Multi-filePoorGoodExcellent

Core Concepts

ConceptDescriptionLocation
IndexVector representation of code.codex-lens/index/
ChunkCode segment for embeddingConfigurable size
RetrievalHybrid search (vector + keyword)HybridSearch engine
LSPLanguage Server Protocol integrationBuilt-in LSP client

Usage

typescript
// ACE semantic search
mcp__ace-tool__search_context({
  project_root_path: "/path/to/project",
  query: "authentication logic"
})

Note: The CLI commands ccw index and ccw search are deprecated. Use MCP tools directly for semantic search.

typescript
// ACE semantic search
mcp__ace-tool__search_context({
  project_root_path: "/path/to/project",
  query: "authentication logic"
})

Configuration

json
// ~/.codexlens/settings.json
{
  "embedding": {
    "backend": "litellm",
    "model": "Qwen/Qwen3-Embedding-8B",
    "use_gpu": false
  },
  "indexing": {
    "static_graph_enabled": true,
    "chunk_size": 512
  }
}

Architecture

┌─────────────────────────────────────────┐
│              CodexLens                   │
├─────────────────────────────────────────┤
│  ┌──────────┐  ┌──────────┐  ┌────────┐ │
│  │  Parsers │  │ Chunker  │  │  LSP   │ │
│  │(TS/Py/..)│  │          │  │ Client │ │
│  └────┬─────┘  └────┬─────┘  └───┬────┘ │
│       │             │            │       │
│       └─────────────┼────────────┘       │
│                     │                    │
│              ┌──────┴──────┐             │
│              │   Hybrid    │             │
│              │   Search    │             │
│              └─────────────┘             │
└─────────────────────────────────────────┘

Released under the MIT License.