展示 HN:ChunkHound,一个本地优先的工具,用于理解大型代码库。
Show HN: ChunkHound, a local-first tool for understanding large codebases

原始链接: https://github.com/chunkhound/chunkhound

## ChunkHound:深度代码库智能 ChunkHound 是一款优先本地运行的工具,它超越了简单的代码搜索,能够深入理解代码库的架构、模式和机构知识——即使在巨大规模下也能实现。与仅仅*搜索*代码的 AI 助手不同,ChunkHound 使用基于研究的 cAST 算法进行语义分块和多跳语义搜索,从而*研究*代码。 它通过结构化解析(Tree-sitter)和基于文本的解析支持 30 多种语言,并通过 MCP 与流行的 IDE(VS Code、Cursor 等)无缝集成。你可以使用自然语言(“查找身份验证代码”)或正则表达式进行查询。 主要优势包括:仅本地运行以确保安全、实时索引以及混合语义/正则表达式方法,从而提供强大而准确的结果。ChunkHound 在大型复杂项目、多语言环境以及需要离线访问的情况下表现出色。 了解更多信息并开始使用,请访问 [chunkhound.github.io](https://chunkhound.github.io)。

Hacker News 新闻 | 过去 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 展示 HN: ChunkHound,一款本地优先的工具,用于理解大型代码库 (github.com/chunkhound) 6 分,作者 NadavBenItzhak 1 小时前 | 隐藏 | 过去 | 收藏 | 讨论 ChunkHound 的目标很简单:本地优先的代码库智能,帮助你按需提取深入的核心开发者级别洞察,生成始终最新的文档,并从小型仓库扩展到企业级 monorepo ——同时保持免费 + 开源以及提供商无关性 (VoyageAI / OpenAI / Qwen3, Anthropic / OpenAI / Gemini / Grok 等)。 我很期待你的反馈 —— 如果你有,感谢你参与这段旅程! 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系方式 搜索:
相关文章

原文

ChunkHound

Local first codebase intelligence

Tests License: MIT 100% AI Generated Discord

Your AI assistant searches code but doesn't understand it. ChunkHound researches your codebase—extracting architecture, patterns, and institutional knowledge at any scale. Integrates via MCP.

  • cAST Algorithm - Research-backed semantic code chunking
  • Multi-Hop Semantic Search - Discovers interconnected code relationships beyond direct matches
  • Semantic search - Natural language queries like "find authentication code"
  • Regex search - Pattern matching without API keys
  • Local-first - Your code stays on your machine
  • 30 languages with structured parsing
    • Programming (via Tree-sitter): Python, JavaScript, TypeScript, JSX, TSX, Java, Kotlin, Groovy, C, C++, C#, Go, Rust, Haskell, Swift, Bash, MATLAB, Makefile, Objective-C, PHP, Vue, Svelte, Zig
    • Configuration: JSON, YAML, TOML, HCL, Markdown
    • Text-based (custom parsers): Text files, PDF
  • MCP integration - Works with Claude, VS Code, Cursor, Windsurf, Zed, etc
  • Real-time indexing - Automatic file watching, smart diffs, seamless branch switching

Visit chunkhound.github.io for complete guides:

# Install uv if needed
curl -LsSf https://astral.sh/uv/install.sh | sh

# Install ChunkHound
uv tool install chunkhound
  1. Create .chunkhound.json in project root
{
  "embedding": {
    "provider": "voyageai",
    "api_key": "your-voyageai-key"
  },
  "llm": {
    "provider": "claude-code-cli"
  }
}

Note: Use "codex-cli" instead if you prefer Codex. Both work equally well and require no API key.

  1. Index your codebase

For configuration, IDE setup, and advanced usage, see the documentation.

Approach Capability Scale Maintenance
Keyword Search Exact matching Fast None
Traditional RAG Semantic search Scales Re-index files
Knowledge Graphs Relationship queries Expensive Continuous sync
ChunkHound Semantic + Regex + Code Research Automatic Incremental + realtime

Ideal for:

  • Large monorepos with cross-team dependencies
  • Security-sensitive codebases (local-only, no cloud)
  • Multi-language projects needing consistent search
  • Offline/air-gapped development environments

Stop recreating code. Start with deep understanding.

MIT

联系我们 contact @ memedata.com