CocoSearch
Perform local-first hybrid semantic code search, combining vector similarity and keyword matching to find code by meaning, not just text.
CocoSearch is a local-first, privacy-focused hybrid semantic code search tool. It indexes codebases using Tree-sitter for syntax-aware chunking and symbol extraction, stores data in PostgreSQL with pgvector embeddings generated by Ollama, and retrieves results through Reciprocal Rank Fusion of cosine similarity and keyword matching. Supporting over 30 languages, it offers multiple interfaces including a CLI, WEB dashboard, interactive REPL, and an MCP server, ensuring all operations, including an optional AI chat feature, run entirely on your machine without external APIs.
주요 기능
010 GitHub stars
02Symbol filtering to narrow results by type (function, class) and name (glob patterns)
03Web AI Chat powered by Claude Agent SDK for interactive codebase questioning
04Context expansion using Tree-sitter AST traversal to retrieve complete code units (e.g., full functions or classes)
05Two-level LRU query caching for faster repeated searches and paraphrased queries
06Hybrid search combining semantic similarity and keyword matching via Reciprocal Rank Fusion
사용 사례
01Explore spec-driven development by semantically searching code
02Accelerate self-onboarding to new codebases by finding relevant code by meaning
03Assist AI models in understanding codebases more efficiently with structural and semantic search capabilities