Gives Claude structural code search across 166 languages using hybrid semantic + AST-aware indexing. Exposes find_code operations that return precise function and class definitions instead of whole-file dumps or noisy keyword matches. Built on dependency injection with automatic fallback from cloud embeddings (Voyage AI) to local FastEmbed when offline. You'd reach for this when you want agents to pull exact context from large codebases without burning tokens on irrelevant results. Includes a CLI daemon (cw start) for live file watching, Qdrant for vector storage, and reciprocal rank fusion to merge sparse and dense search results. Works completely airgapped if you initialize with the quickstart profile.
[!WARNING]
CodeWeaver is no longer maintained
We're really proud of CodeWeaver and think it's pretty awesome, but we can't maintain it anymore.
We're focused on something else.
CodeWeaver is (was?) a sophisticated, smart, code search tool with wide provider support. and it's still licensed under your choice of MIT or Apache-2.0.
So please, fork it and build something great!
CodeWeaver gives Claude and other AI agents precise context from your codebase. Not keyword grep. Not whole-file dumps. Actual structural understanding through hybrid semantic search.
CodeWeaver is Professional Context Infrastructure. With 100% Dependency Injection (DI) and a Pydantic-driven configuration system, it provides the reliability and extensibility required for industrial-grade AI deployments.
Example:
Without CodeWeaver:
Claude: "Let me search for 'auth'... here are 50 files mentioning authentication"
Result: Generic code, wrong context, wasted tokens
With CodeWeaver:
You: "Where do we validate OAuth tokens?"
Claude gets: The exact 3 functions across 2 files, with surrounding context
Result: Precise answers, focused context, 60-80% token reduction
CodeWeaver is no longer in alpha!
Early Release (0.x): CodeWeaver is in active development. APIs may change between minor versions. It's very well-tested but still in 'it works on my machine' territory. Use it, break it, help shape it.
| Feature | CodeWeaver | Legacy Search Tools |
|---|---|---|
| Search Type | Hybrid (Semantic + AST + Keyword) | Keyword Only |
| Context Quality | Exquisite / High-Precision | Noisy / Irrelevant |
| Extensibility | DI-Driven (Zero-Code Provider Swap) | Hardcoded |
| Reliability | Resilient (Automatic Local Fallback) | Fails on API Timeout |
| Token Usage | Optimized (60–80% Reduction) | Wasted on Noise |
# Add CodeWeaver to your project
uv add code-weaver
# Initialize with a profile (recommended uses Voyage AI)
cw init --profile recommended
# Verify setup
cw doctor
# Start the background daemon
cw start
📝 Note:
cw initsupports different Profiles:
recommended: High-precision search (Voyage AI + Qdrant)quickstart: 100% local, private, and free (FastEmbed + Local Qdrant)Want full offline? See the Local-Only Guide.
🐳 Prefer Docker? See Docker setup guide →
🔍 Exquisite Context
|
🛡️ Industrial Resilience
|
🧩 Universal Extensibility
|
🛠️ Developer Experience
|
AI agents face too much irrelevant context, causing token waste, missed patterns, and hallucinations. CodeWeaver addresses this with one focused capability: structural + semantic code understanding that you control.
📖 Read the detailed rationale →
CODEWEAVER_CONFIG_FILESpecify a custom config file path for CodeWeaver. Only needed if not using the default locations.
CODEWEAVER_DEBUGdefault: falseEnable debug mode for CodeWeaver.
CODEWEAVER_EMBEDDING_API_KEYsecretSpecify the API key for the embedding provider, if required. Note: {', '.join([p for p in _providers_for_kind('embedding') if p.])}
CODEWEAVER_EMBEDDING_MODELdefault: voyage-code-3Specify the embedding model to use.
CODEWEAVER_EMBEDDING_PROVIDERdefault: voyageSpecify the embedding provider to use.
CODEWEAVER_HOSTdefault: localhostSet the server host for CodeWeaver.
CODEWEAVER_LOG_LEVELdefault: WARNINGSet the log level for CodeWeaver (e.g., DEBUG, INFO, WARNING, ERROR).
CODEWEAVER_MCP_PORTdefault: 9328Set the MCP server port for CodeWeaver if using http transport for mcp. Not required if using the default port (9328), or stdio transport.
CODEWEAVER_PORTdefault: 9329Set the port for the codeweaver management server (information and management endpoints).
CODEWEAVER_PROFILEUse a premade provider settings profile for CodeWeaver.
CODEWEAVER_PROJECT_NAMESet the project name for CodeWeaver.
CODEWEAVER_PROJECT_PATHSet the project path for CodeWeaver.
CODEWEAVER_RERANKING_API_KEYsecretSpecify the API key for the reranking provider, if required.
CODEWEAVER_RERANKING_MODELdefault: rerank-2.5Specify the reranking model to use.
CODEWEAVER_RERANKING_PROVIDERdefault: voyageSpecify the reranking provider to use.
CODEWEAVER_SPARSE_EMBEDDING_MODELdefault: prithivida/Splade_pp_en_v1Specify the sparse embedding model to use.
CODEWEAVER_SPARSE_EMBEDDING_PROVIDERdefault: fastembedSpecify the sparse embedding provider to use.
CODEWEAVER_VECTOR_STORE_API_KEYsecretSpecify the API key for the vector store, if required.
CODEWEAVER_VECTOR_STORE_PORTdefault: 6333Specify the port for the vector store.
CODEWEAVER_VECTOR_STORE_PROVIDERdefault: qdrantSpecify the vector store provider to use.
CODEWEAVER_VECTOR_STORE_URLdefault: http://localhostSpecify the URL for the vector store.
CODEWEAVER__TELEMETRY__DISABLE_TELEMETRYdefault: falseDisable telemetry data collection.
CODEWEAVER__TELEMETRY__TOOLS_OVER_PRIVACYdefault: falseOpt-in to potentially identifying collection of query and search result data. This is invaluable for helping us improve CodeWeaver's search capabilities. If privacy is a higher priority, do not enable this setting.
HTTPS_PROXYHTTP proxy for requests (Used by: Azure, Azure, Voyage)
com.mcparmory/google-search
io.github.pipeworx-io/brave-search
marcopesani/mcp-server-serper
brave/brave-search-mcp-server
com.mcparmory/google-search-console
acamolese/google-search-console-mcp