CocoIndex Code
Embedded AST-based semantic and structural search for code agents.
- Source repo
- cocoindex-io/cocoindex-code
- Stars
- ★ 2.7k
- Last updated
- 1d ago
- License
- Apache-2.0
- Primary language
- Python
- FA score
- 52/100 · Major gaps
At a glance
- Works with
- Universal · cross-platformCodex · Claude Code · OpenAI API
- You'll need
- Typical use
- A developer joining an unfamiliar Python, TypeScript, or Rust repository who needs to find session handling from a natural-language description.
- Main limitation
- The full native install adds roughly 1 GB of torch and transformers dependencies, while the full Docker image is approximately 5 GB.
- Source review
- 52/100 · Major gaps
What does this agent do, and when should you use it?
CocoIndex Code is an embedded semantic code-search CLI built on CocoIndex’s Rust indexing engine. Its ccc commands initialize a project, build or incrementally update an index, and return matching chunks with paths, languages, source, line numbers, and similarity scores. It can also run as the ccc mcp stdio server for Codex, Claude Code, OpenCode, and Kilo Code, while the installable ccc skill guides compatible coding agents to use the CLI. Project settings and index databases live by default under .cocoindex_code, and a background daemon starts on first use to keep the embedding model loaded. It supports native Python-based installation or a persistent Docker deployment.
ccc init creates global and project YAML settings and adds .cocoindex_code/ to .gitignore. ccc index builds or updates the semantic index; the documented behavior is to re-index changed files only. ccc search <query> performs similarity search with --lang, --path, --offset, --limit, and --refresh options. ccc grep <pattern> performs syntax-structure matching through CocoIndex code_match without an index, daemon, or embedding model. ccc mcp exposes search(query, limit, offset, refresh_index, languages, paths), returning matching code chunks and their metadata. Embeddings can come from local SentenceTransformers or cloud providers accessed through LiteLLM.
- A developer joining an unfamiliar Python, TypeScript, or Rust repository who needs to find session handling from a natural-language description.
- A Codex or Claude Code user who wants an MCP search tool to retrieve relevant code chunks during an agent session.
- A maintainer who does not know an implementation’s exact identifier and needs conceptual retrieval beyond text grep.
- A developer looking for function definitions, calls, or class shapes who can express the target as a ccc grep structural pattern.
- A team that wants a reproducible environment can run the persistent Docker container so its daemon and model cache remain warm.
How do you install or deploy this agent?
For local embeddings without an API key:
pipx install 'cocoindex-code[full]'Or:
uv tool install --upgrade 'cocoindex-code[full]'From the target repository, run:
ccc init
ccc index
ccc search "authentication logic"The [full] extra defaults to local Snowflake/snowflake-arctic-embed-xs. The slim cocoindex-code installation requires a cloud embedding provider and its API key.
How do you use this agent?
Search directly with ccc search "database schema". Filter languages with ccc search --lang python --lang markdown schema, or refresh first with ccc search --refresh "query handler". For structural search, use ccc grep 'def \NAME(\(ARGS*\)):'. Register the MCP server in Codex with codex mcp add cocoindex-code -- ccc mcp. The MCP search tool accepts query, limit, offset, refresh_index, languages, and paths. To install the agent skill, run npx skills add cocoindex-io/cocoindex-code.
What are this agent's strengths and limitations?
- Combines semantic retrieval with ccc grep AST structural search, which does not require an index or embeddings.
- Provides a documented stdio MCP server with a defined search tool for direct Codex and Claude Code integration.
- Supports local SentenceTransformers as well as multiple LiteLLM-backed cloud providers; the default local model needs no API key.
- Keeps indexes in the project and uses a background daemon to hold the model warm; the Docker option keeps that daemon alive across sessions.
- The full native install adds roughly 1 GB of torch and transformers dependencies, while the full Docker image is approximately 5 GB.
- The slim installation requires a cloud embedding provider and API key, adding network and provider-configuration dependencies.
- Changing embedding models requires ccc reset && ccc index because vector dimensions can differ.
- ccc grep depends on CocoIndex code_match; the documentation says a local CocoIndex build is needed until that feature is released.
How does this agent compare with similar options?
Key facts side by side with the most closely related agents.
| Agent | Source review | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|
| CocoIndex Code This agent | 52 · Major gaps | ★ 2.7k | 1d ago | Python | Codex · Claude Code · OpenAI API |
| Claude Context — Semantic Code Search MCP for AI Coding Agents | 49 · Major gaps | ★ 13k | 2mo ago | TypeScript | Codex · Claude Code · OpenAI API |
| Arbor Research Optimizer | 55 · Major gaps | ★ 1.1k | 16d ago | Python | Codex · Claude Code · OpenAI API · Claude API |
| ACE Context Learning Engine | 51 · Major gaps | ★ 2.6k | 2d ago | Python | Claude Code · OpenAI API · Claude API |
How does FollowAgents rate this agent?
Why each dimension lost points
Evidence: SECURITY.md provides contact and scope; install via pipx/uv with no special permissions; Docker mount of $HOME has security note; reset command exists; dependencies have version ranges. Deductions: no explicit data flow transparency (e.g., where index data is stored, whether uploaded), no user confirmation mechanism, no rollback mechanism, publisher identity unverified.
Evidence: README and pyproject.toml consistent; CLI commands and config clear; dependencies have version ranges; CI tests present. Deductions: no specific failure message examples, dependency availability not verified (static review).
Evidence: clear target audience (coding agents), multiple integration methods (CLI, MCP, Docker), multi-language support, environment variable config. Deductions: capability boundaries (e.g., codebase size limits) not specified, trigger conditions for automatic search not detailed.
Evidence: README well-structured with install, CLI reference, config guide; LICENSE (Apache-2.0) present; version number in pyproject.toml. Deductions: no CHANGELOG, known limitations not explicitly listed, maintenance responsibility unclear (publisher unverified).
Evidence: claims 70% token saving, provides search, grep, Docker image, multiple install methods. Deductions: no performance benchmarks or user feedback, cost-benefit not quantified.
Evidence: README describes features, tests exist (tests/), CI config present. Deductions: no reproducible benchmarks, claims (e.g., 70% token saving) lack data support, facts vs. inferences not clearly separated.
- Publisher identity is unverified; assess risk before installation.
- Docker mounting $HOME may expose sensitive data; consider narrower mounts.
- Static review cannot verify runtime behavior; conduct actual testing.