How chunkhound/chunkhound works
ChunkHound is a local-first codebase intelligence product: it indexes repositories, then provides semantic/regex search and cited research across code, Git history, and technical web sources. The main workflow is CLI invocation → indexing/parsing/embedding → database-backed retrieval → research synthesis and citations. Separate capabilities include real-time indexing, MCP/daemon access, code maps, and generated autodocs. Edges for documented capabilities rely on the README; source excerpts establish selected runtime links, while unsampled internals are not asserted.
Components 26
Indexing
- Language Parsers
chunkhound/parsers/parser_factory.py - Index Runner
chunkhound/services/rust_pipeline_runner.py - Rust Index Pipeline
src/pipeline/pipeline.rs - Python Pipeline Bridge
chunkhound/pipeline_bridge.py - Embedding Service
chunkhound/services/embedding_service.py - Embedding Providers
chunkhound/providers/embeddings/openai_provider.py - Code Index
chunkhound/providers/database/duckdb_provider.py - Live Indexing
chunkhound/services/realtime/pipeline.py
Search and Research
- Search Service
chunkhound/services/search_service.py - Deep Research
chunkhound/services/deep_research_service.py - Answer Synthesis
chunkhound/services/research/v1/synthesis_engine.py - LLM Providers
chunkhound/llm_manager.py
External Context
- Git History Research
chunkhound/core/git_diff/runner.py - Web Research
chunkhound/utils/websearch_core.py
Interfaces
- CLI
chunkhound/api/cli/main.py - Index Command
chunkhound/api/cli/commands/run.py - Research Command
chunkhound/api/cli/commands/research.py - Search Command
chunkhound/api/cli/commands/search.py - MCP Server
chunkhound/mcp_server/base.py - Daemon Service
chunkhound/daemon/server.py
Generated Artifacts
- Code Mapper
chunkhound/code_mapper/pipeline.py - Autodoc Generator
chunkhound/autodoc/generator.py
Other components
- Engineer or Agent
- Embedding API
- LLM Service
- Technical Web Sources
Connections 29
- Engineer or Agent → CLI: invokes
README.md - CLI → Index Command: dispatches
chunkhound/api/cli/main.py - CLI → Research Command: dispatches
chunkhound/api/cli/main.py - CLI → Search Command: dispatches
chunkhound/api/cli/main.py - Index Command → Index Runner: starts indexing
- Index Runner → Rust Index Pipeline: runs pipeline
chunkhound/services/rust_pipeline_runner.py - Rust Index Pipeline → Language Parsers: parses files
- Rust Index Pipeline → Python Pipeline Bridge: calls callbacks
chunkhound/pipeline_bridge.py - Rust Index Pipeline → Code Index: writes index
- Python Pipeline Bridge → Language Parsers: uses parsers
chunkhound/pipeline_bridge.py - Python Pipeline Bridge → Embedding Providers: creates providers
chunkhound/pipeline_bridge.py - Embedding Service → Code Index: reads and writes
chunkhound/services/embedding_service.py - Embedding Service → Embedding Providers: generates vectors
- Embedding Providers → Embedding API: requests embeddings
- Research Command → Deep Research: starts research
- Search Command → Search Service: runs search
- Search Service → Code Index: retrieves code
- Deep Research → Search Service: retrieves context
- Deep Research → Answer Synthesis: synthesizes findings
chunkhound/services/research/v1/synthesis_engine.py - Answer Synthesis → LLM Providers: completes prompts
chunkhound/services/research/v1/synthesis_engine.py - LLM Providers → LLM Service: dispatches requests
- Deep Research → Git History Research: includes history
- Deep Research → Web Research: includes web evidence
- Web Research → Technical Web Sources: queries sources
- Engineer or Agent → MCP Server: connects via MCP
README.md - Engineer or Agent → Daemon Service: uses daemon
- Live Indexing → Code Index: updates index
chunkhound/services/realtime/pipeline.py - Engineer or Agent → Code Mapper: requests code map
README.md - Engineer or Agent → Autodoc Generator: requests autodoc
README.md