cocoindex-io/cocoindex-code
A super light-weight embedded code search engine CLI (AST based) that just works - improves speed and efficiency for coding agent 🌟 Star if you like it!
What it solves
CocoIndex Code provides a lightweight, AST-based semantic code search tool that allows developers and AI coding agents to find relevant code snippets based on conceptual meaning rather than just keyword matching. It solves the problem of high token consumption in AI agents by reducing token usage by up to 70% through efficient indexing and retrieval.
How it works
Built on the Rust-based CocoIndex data transformation engine, the tool parses code into Abstract Syntax Trees (ASTs) to understand structure. It supports both local embeddings (via sentence-transformers) and cloud-based embeddings (via LiteLLM). The system can be run as a CLI tool, a background daemon, or an MCP (Model Context Protocol) server, allowing it to integrate directly into coding agents like Claude Code, Grok, and Cursor.
Who it’s for
Software engineers and developers using AI coding agents who want to accelerate codebase exploration and reduce LLM context window costs. It is particularly useful for those working in large, unfamiliar codebases where traditional grep is insufficient.
Highlights
- AST-Based Search: Uses structural understanding of code to provide more accurate semantic matches.
- Agent Integration: Native support for MCP and specific plugins for Claude Code, Grok, and Oh My Pi.
- Flexible Embeddings: Offers a "full" version for local, offline embeddings and a "slim" version for cloud providers.
- Structural Grep: Includes
ccc grep, which allows searching by code structure (by-example patterns) without needing an index. - Fast Setup: Zero-config installation with a 1-minute setup process.
Related
- Project
- Project
- Project
- Project
- Project