com.knitli/codeweaver
AI 与智能体by knitli
Semantic code search built for AI agents. Hybrid, AST-aware, context for 166 languages.
什么是 com.knitli/codeweaver?
Semantic code search built for AI agents. Hybrid, AST-aware, context for 166 languages.
README
<div align="center"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/knitli/codeweaver/refs/heads/main/docs-site/src/assets/codeweaver-reverse.svg"> <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/knitli/codeweaver/refs/heads/main/docs-site/src/assets/codeweaver-primary.svg"> <img alt="CodeWeaver logo" src="https://raw.githubusercontent.com/knitli/codeweaver/refs/heads/main/docs-site/src/assets/codeweaver-primary.svg" height="150px" width="150px"> </picture>[!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
Exquisite Context for Agents — Infrastructure that is Extensible, Predictable, and Resilient.
Documentation • Installation • Features • Comparison
</div>What It Does
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.
How CodeWeaver Stacks Up
Quick Reference Matrix
| 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 |
🚀 Getting Started
Quick Install
# 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 →
✨ Features
<table> <tr> <td width="50%">🔍 Exquisite Context
- Hybrid search (sparse + dense vectors)
- AST-level understanding (27 languages)
- Reciprocal Rank Fusion (RRF)
- Language-aware chunking (166+ languages)
🛡️ Industrial Resilience
- Automatic local fallback (FastEmbed)
- Circuit breaker pattern for APIs
- Works airgapped (no cloud required)
- Pydantic-driven validation at boot-time
🧩 Universal Extensibility
- 100% DI-driven architecture
- 17+ integrated providers
- Custom provider API
- Zero-code provider swapping
🛠️ Developer Experience
- Live indexing with file watching
- Diagnostic tool (
cw doctor) - Multiple CLI aliases (
cw/codeweaver) - Selectable profiles for easy setup
💭 Philosophy: Context is Oxygen
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.
- Curation over Collection: Give agents exactly what they need, nothing more.
- Privacy-First: Your code stays local if you want it to.
- Infrastructure over Tooling: Built to be the reliable foundation for your AI stack.
📖 Read the detailed rationale →
<div align="center">
Official Documentation: docs.knitli.com/codeweaver/
Built with ❤️ by Knitli
</div> <!-- Badges --> <!-- Other links -->常见问题
com.knitli/codeweaver 是什么?
Semantic code search built for AI agents. Hybrid, AST-aware, context for 166 languages.
相关 Skills
Claude接口
by anthropics
面向接入 Claude API、Anthropic SDK 或 Agent SDK 的开发场景,自动识别项目语言并给出对应示例与默认配置,快速搭建 LLM 应用。
✎ 想把Claude能力接进应用或智能体,用claude-api上手快、兼容Anthropic与Agent SDK,集成路径清晰又省心
RAG架构师
by alirezarezvani
聚焦生产级RAG系统设计与优化,覆盖文档切块、检索链路、索引构建、召回评估等关键环节,适合搭建可扩展、高准确率的知识库问答与检索增强应用。
✎ 面向RAG落地,把知识库、向量检索和生成链路系统串联起来,做架构设计时更清晰,也更少踩坑。
多智能体架构
by alirezarezvani
聚焦多智能体系统架构设计,梳理 Supervisor、Swarm、分层和 Pipeline 等模式,覆盖角色定义、通信协作与性能评估,适合规划稳健可扩展的 AI agent 编排方案。
✎ 帮你系统解决多智能体应用的架构设计与协同编排难题,适合构建复杂 AI 工作流,成熟度高、社区认可也很亮眼。
相关 MCP Server
知识图谱记忆
编辑精选by Anthropic
Memory 是一个基于本地知识图谱的持久化记忆系统,让 AI 记住长期上下文。
✎ 帮 AI 和智能体补上“记不住”的短板,用本地知识图谱沉淀长期上下文,连续对话更聪明,数据也更可控。
顺序思维
编辑精选by Anthropic
Sequential Thinking 是让 AI 通过动态思维链解决复杂问题的参考服务器。
✎ 这个服务器展示了如何让 Claude 像人类一样逐步推理,适合开发者学习 MCP 的思维链实现。但注意它只是个参考示例,别指望直接用在生产环境里。
by deusdata
持久化的代码库知识图谱,可跨会话保留上下文,在 session 重启或上下文压缩后仍能继续使用。
✎ 专治 AI 编程助手“会话失忆”,把代码库沉淀为持久知识图谱,重启或压缩上下文后也能无缝续上开发状态。