Installation β’ Features β’ How It Works β’ Documentation β’ Contributing
CodeWeaver gives both humans and AI a deep, structural understanding of your project β not just text search, but real context: symbols, blocks, relationships, intent. MCP is just the delivery mechanism; CodeWeaver is the capability.
If you want AI that actually knows your code instead of guessing, this is the foundation.
β οΈ Alpha Release: CodeWeaver is in active development. Use it, break it, shape it, help make it better.
| Problem | Impact |
|---|---|
| π΄ Poor Context = Poor Results | Agents are better at generating new code than understanding existing structure |
| πΈ Massive Inefficiency | Agents read the same huge files repeatedly (50%+ context waste is common) |
| π§ Wrong Abstraction | Tools built for humans, not for how agents actually work |
| π No Ownership | Existing solutions locked into specific IDEs or agent clients like Claude Code |
The result: Shallow, inconsistent, fragile context. And you don't control it.
β One focused capability: Structural + semantic code understanding β Hybrid search built for code, not text β Works offline, airgapped, or degraded β Deploy it however you want β One great tool instead of 30 mediocre ones
π Read the detailed rationale β
# Add CodeWeaver to your project
uv add --prerelease allow --dev code-weaver
# Initialize config and MCP setup
cw init
# Verify setup
cw doctor
# Start the server
cw serverπ Note:
cw initdefaults to CodeWeaver'srecommendedprofile, which requires:
- π Voyage AI API key (generous free tier)
- ποΈ Qdrant instance (cloud or local, generous free tier for cloud, free local)
π³ Prefer Docker? See Docker setup guide β
CodeWeaver uses stdio transport by default, which proxies to the HTTP backend daemon. First start the daemon with codeweaver start, then MCP clients can connect via stdio.
cw init will add CodeWeaver to your project's .mcp.json:
{
"mcpServers": {
"codeweaver": {
"type": "stdio",
"cmd": "uv",
"args": ["run", "codeweaver", "server"],
"env": {"SOME_API_KEY_FOR_PROVIDERS": "value"}
}
}
}{
"mcpServers": {
"codeweaver": {
"type": "http",
"url": "http://127.0.0.1:9328/mcp"
}
}
}
|
|
|
|
|
|
CodeWeaver combines AST-level understanding, semantic relationships, and hybrid embeddings (sparse + dense) to deliver both contextual and literal understanding of your codebase.
The goal: give AI the fragments it should see, not whatever it can grab.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Your Codebase β
ββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββ
β
βΌ
ββββββββββββββββββ
β Live Indexing β β AST parsing + semantic analysis
ββββββββββ¬ββββββββ
β
βΌ
ββββββββββββββββββββββββββ
β Hybrid Vector Store β β Sparse + Dense embeddings
ββββββββββ¬ββββββββββββββββ
β
βΌ
βββββββββββββββββββ
β Reranking Layer β β Relevance optimization (heuristic and reranking model)
ββββββββββ¬βββββββββ
β
βΌ
ββββββββββββββββββββ
β MCP Interface β β Simple "find_code" tool (`find_code("authentication api")`)
ββββββββββ¬ββββββββββ
β
βΌ
βββββββββββ
β AI β
βββββββββββ
cw start # Start daemon in background (or --foreground)
cw stop # Stop the daemon
cw server # Run the MCP server (stdio by default)
cw doctor # Full setup diagnostic
cw index # Run indexing without server
cw init # Set up MCP + config
cw list # List providers, models, capabilities
cw status # Live server status, health, index state
cw search # Test the search engine
cw config # View resolved configurationInstall CodeWeaver to start automatically on login:
cw init service # Install and enable (systemd/launchd)
cw init service --uninstall # Remove the serviceπ Full CLI Guide β
| Component | Status | Notes |
|---|---|---|
| π Live indexing & file watching | ββββ | Runs continuously; reliable |
| π³ AST-based chunking | ββββ | Full semantic/AST for 26 languages |
| π Context-aware chunking | ββββ | 166+ languages, heuristic AST-lite |
| π Provider integration | βββ | Voyage/FastEmbed reliable, others vary |
| π‘οΈ Automatic fallback | βββ | Seamless offline/degraded mode |
| π» CLI | ββββ | Core commands fully wired and tested |
| π³ Docker build | βββ | Skip local Qdrant setup entirely |
| π MCP interface | βββ | Core ops reliable, some edge cases |
| π HTTP endpoints | βββ | Health, metrics, state, versions stable |
Legend: ββββ = solid | βββ = works with quirks | ββ = experimental | β = chaos gremlin
The enhancement issues describe detailed plans. Short version:
- π Way better docs β comprehensive guides and tutorials
- π€ AI-powered context curation β agents identify purpose and intent
- π§ Data provider integration β Tavily, DuckDuckGo, Context7, and more
- π True DI system β replace existing registry
- πΈοΈ Advanced orchestration β integrate
pydantic-graph
One tool. We give AI agents one simple tool: find_code.
Agents just need to explain what they need. No complex schemas. No novella-length prompts.
- π³ Docker Setup Notes
- π Getting Started Guide
- ποΈ Overall Architecture
- π find_code API
- π find_code Architecture
- π Product Decisions β transparency matters
- π€ Why CodeWeaver? β detailed rationale
PRs, issues, weird edge cases, feature requests β all welcome!
This is still early, and the best time to help shape the direction.
- π΄ Fork the repository
- πΏ Create a feature branch
- β¨ Make your changes
- β Add tests if applicable
- π Update documentation
- π Submit a PR
You'll need to agree to our Contributor License Agreement.
π Report it here β include as much detail as possible!
- π¦ Repository: github.com/knitli/codeweaver
- π Issues: Report bugs & request features
- π Changelog: View release history
- π’ Knitli: knitli.com
- βοΈ Blog: blog.knitli.com
- π¦ X/Twitter: @knitli_inc
- πΌ LinkedIn: company/knitli
- π» GitHub: @knitli
We're a one-person company at the moment... and make no money... if you like CodeWeaver and want to keep it going, please consider sponsoring me π
- Python package:
code-weaverπβ note the hyphen - CLI commands:
cw/codeweaver - Python requirement: β₯3.12 (tested on 3.12, 3.13, 3.14)
- Entry point:
codeweaver.cli.app:main
Licensed under MIT OR Apache 2.0 β you choose! Some vendored code is Apache 2.0 only and some is MIT only. Everything is permissively licensed.
The project follows the REUSE specification. Every file has detailed licensing information, and we regularly generate a software bill of materials.
The default includes very anonymized telemetry to improve CodeWeaver. See the implementation or read the README.
Opt out: export CODEWEAVER__TELEMETRY__DISABLE_TELEMETRY=true
Opt in to detailed feedback (helps us improve): export CODEWEAVER__TELEMETRY__TOOLS_OVER_PRIVACY=true
Warning: The API will change. Our priority right now is giving you and your coding agent an awesome tool.
To deliver on that, we can't get locked into API contracts while we're in alpha. We also want you to be able to extend and build on CodeWeaver β once we get to stable releases.
Built with β€οΈ by Knitli