CtxE
Semantic code search powered by AST analysis, embeddings, and knowledge graphs.
Index your codebase. Search with meaning. Ask questions and get answers with source references.
Code Search Shouldn't Be This Hard
Dumb text matching. Misses semantic relationships between code elements.
Limited to single projects. No cross-repository understanding.
Lack persistent context. Can't remember your codebase between sessions.
CtxE understands your code semantically. It parses ASTs, builds knowledge graphs, and uses embeddings to find exactly what you need.
Key Features
Semantic Chunking
Tree-sitter AST parsing splits code into meaningful semantic chunks — functions, structs, traits — not arbitrary lines.
Hybrid Search
Vector embeddings + FTS5 full-text + reranking. Combines semantic understanding with keyword precision.
Knowledge Graph
Symbol relationships, call hierarchies, and cross-file connections mapped as a traversable graph.
LLM-Powered Queries
Ask questions in natural language. Get answers with source references and citations from your codebase.
Multi-Language
Rust, Go, Python, JavaScript, TypeScript, and Java. Tree-sitter grammars for accurate parsing across languages.
Local-First
SQLite-based single-file index. Search works without cloud dependencies. Your code stays on your machine.
How It Works
Index your codebase
ctxe index . Parses files with Tree-sitter, extracts semantic chunks, generates Voyage AI embeddings, and stores everything in a portable SQLite database.
Search with meaning
ctxe query "auth middleware" Hybrid search combines vector similarity, full-text matching, and reranking to find the most relevant code — even when you don't know the exact function name.
Ask questions, get answers
ctxe ask "How does auth work?" LLM-powered query planning retrieves relevant context, then generates answers with source citations. Powered by Anthropic Claude.
Multiple Surfaces
CLI
Full-featured command-line interface. Index, query, ask, and manage from your terminal.
ctxeMCP Server
Model Context Protocol server for AI assistant integration. Stdio transport.
ctxe-mcpHTTP API
Local HTTP server for programmatic access. REST API powered by Axum.
ctxe serveDaemon
Background service that watches files and auto re-indexes on changes.
ctxe daemonBuilt With
Ready to Understand Your Codebase?
CtxE is open source. Get started with the installation guide on GitHub.