Context Engine for Code Intelligence

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.

terminal
$ ctxe index .
Indexing 2,847 files across 6 languages...
Done. 12,483 semantic chunks indexed.
$ ctxe query "authentication middleware"
Found 8 relevant results (semantic + keyword)
1. src/middleware/auth.rs:42 — verify_token()
2. src/routes/api.rs:15 — auth_guard()
3. src/models/session.rs:8 — Session struct
$ ctxe ask "How does auth work in this project?"
Authentication uses JWT tokens verified in middleware...

Code Search Shouldn't Be This Hard

grep

Dumb text matching. Misses semantic relationships between code elements.

IDE Search

Limited to single projects. No cross-repository understanding.

AI Assistants

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.

Capabilities

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.

3 Steps

How It Works

1

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.

2

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.

3

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.

Integrations

Multiple Surfaces

CLI

Full-featured command-line interface. Index, query, ask, and manage from your terminal.

ctxe

MCP Server

Model Context Protocol server for AI assistant integration. Stdio transport.

ctxe-mcp

HTTP API

Local HTTP server for programmatic access. REST API powered by Axum.

ctxe serve

Daemon

Background service that watches files and auto re-indexes on changes.

ctxe daemon
Architecture

Built With

Rust
Performance & safety
Tree-sitter
AST parsing
Voyage AI
Code embeddings
SQLite
FTS5 + sqlite-vec
Anthropic Claude
LLM queries
Axum
HTTP server
MCP
AI integration
notify
File watching

Ready to Understand Your Codebase?

CtxE is open source. Get started with the installation guide on GitHub.