Purpose: cocoindex-code is an AST-based semantic code search tool, aimed at coding agents and developers, allowing relevant code to be located in a codebase using natural language descriptions, reducing the token consumption caused by agents reading irrelevant files. The official claim is that it instantly saves about 70% of tokens, completes installation in 1 minute, and requires zero configuration.
Main capabilities: semantic code search, suitable for finding code by description when grep is ineffective; based on a Rust indexing engine, it only reindexes changed files; supports languages such as Python, JavaScript/TypeScript, Rust, Go, Java, C/C++, C#, SQL, and Shell; runs embedded, with no database required; the embedding model can be either local SentenceTransformers (the [full] version, free and requiring no API key) or 100+ cloud providers via LiteLLM. There is also ccc grep structured search, which matches by syntax tree, runs entirely locally, and requires no index, daemon, or embeddings.
Usage: installation comes in two forms, cocoindex-code[full] includes local embedding dependencies, while cocoindex-code (slim) only uses LiteLLM and requires cloud embeddings and an API key. It can be integrated into compatible agents such as Claude Code and Grok via Skill, and can also run as an MCP server (ccc mcp), exposing the search tool and returning file paths, language, code content, line numbers, and similarity scores. Common CLI commands include ccc init, ccc index, ccc search, ccc status, and ccc reset --all; ccc search is limited to the current working directory by default and can be overridden with --path. Docker images and a docker compose method are also provided.
Applicable scenarios: finding implementations in an unfamiliar codebase by concept or vague description; providing on-demand semantic retrieval for coding agents; doing lightweight code search in a local environment where you do not want to configure a database.
Limitations: ccc grep depends on cocoindex's code_match feature, and before the official release a local build is required; the slim version must be configured with a cloud embedding provider and API key; in Docker, the [full] version on macOS performs local embedding with CPU inference only and cannot useMetal GPU; mounting $HOME brings broader file access permissions. Other detailed information is not yet provided.