cocoindex-io

cocoindex-io/cocoindex-code

Python Apache-2.0 Dev Tools

A super light-weight embedded code search engine CLI (AST based) that just works - saves 70% token and improves speed for coding agent 🌟 Star if you like it!

2.5k stars
197 forks
recent
GitHub +128 / week

2.5k

Stars

197

Forks

26

Open issues

17

Contributors

v0.2.37 23 Jun 2026

AI Analysis

CocoIndex Code is an AST-based semantic code search CLI tool designed to reduce token usage by 70% and improve performance for coding agents and LLM-assisted development workflows. It serves developers and AI agents working with large codebases who need efficient context retrieval without configuration. This is a specialized tool optimized for AI-agent integration (Claude, Cursor, Codex) and context-window optimization—not a general-purpose code search engine for typical IDE usage.

Dev Tools Developer Tool Discovery value: 6/10
Documentation 8/10
Activity 9/10
Community 8/10
Code quality 7/10

Inferred from signals mentioned in the README (tests, CI, type safety) — not a review of the actual code.

Overall score 8/10

AI's overall editorial judgment — not an average of the bars above, can weigh other factors too.

code-search ast-parsing context-optimization coding-agents mcp-integration
Actively maintained Well documented Niche/specialized use case Beginner friendly Production ready
Deep Analysis · Based on README and public signals
3w ago

AST-based embedded code search CLI that plugs into AI coding agents to reduce token usage

cocoindex-code is a lightweight CLI tool that indexes a local codebase using AST-aware semantic search, then exposes results to coding agents (Claude Code, Codex, Cursor) via a Skill or MCP server interface. Its primary value proposition is reducing the tokens an AI agent must consume to locate relevant code — claimed at 70% reduction — by returning precise, structurally-aware search results instead of feeding entire files. Built on top of CocoIndex, a Rust-based data transformation engine, it supports both local embeddings (no API key) and cloud providers via LiteLLM. Target users are developers using AI-assisted coding workflows who want faster, cheaper agent interactions on large codebases.

Origin

Created in February 2026, cocoindex-code is a very young project (~4.5 months old as of evaluation date), launched to capitalize on the rapid growth of AI coding agent tooling and the MCP ecosystem.

Growth

The project reached 2,180 stars in roughly 4.5 months, suggesting an initial burst driven by the AI developer tooling trend and cross-promotion from the parent CocoIndex project. The 46 stars in the last 7 days indicates continued but slowing organic interest rather than a viral spike. The fork count (174) is moderate and suggests some developers are actively experimenting with or extending the tool.

In production

No independent case studies, blog posts, or third-party production usage reports are cited in the README. The PyPI monthly download badge is present but the count is obscured (commented out in the README source). Discord community presence and the Claude Code plugin marketplace listing suggest real users exist, but quantified production usage at scale is not verified.

Code analysis
Architecture

Appears to be a Python CLI application (pipx/uv installable) layered on top of the CocoIndex Rust engine for performance-critical indexing. Likely uses tree-sitter or a similar AST parsing library to extract code structure. Embedding is handled either locally via sentence-transformers (Snowflake arctic-embed-xs by default) or remotely via LiteLLM. The MCP server mode and Skill integration suggest a thin adapter layer exposing the same search functionality over a protocol compatible with Claude Code and similar agents. Architecture appears modular: slim vs full install variants manage dependency footprint.

Tests

Not documented in README. CI badge is present and linked to a GitHub Actions workflow, which indicates some automated testing exists, but coverage level and scope are unknown.

Maintenance

Last push was 2026-06-19, one day before evaluation date — the project is actively maintained. CI and release workflows are both badged and appear active. Active Discord community is linked, suggesting ongoing developer engagement. Given the project's age (~4.5 months), the cadence appears healthy.

Honest verdict

ADOPT IF: you are using Claude Code, Codex, or another MCP/Skill-compatible agent on a medium-to-large codebase and context window costs or latency are a real concern — setup is genuinely minimal. AVOID IF: you need production-grade reliability guarantees, enterprise support, or auditable search quality on mission-critical codebases; the project is too young for that confidence level. MONITOR IF: you are building tooling or workflows around AI coding agents and want to see whether the MCP ecosystem standardizes around solutions like this before committing.

Independent dimensions

Mainstream potential

5/10

Technical importance

6/10

Adoption evidence

3/10

Risks
  • Project is only ~4.5 months old; API surface, configuration format, and index schema may change in breaking ways without a mature stability guarantee.
  • The 70% token reduction claim is not independently verified in the README and may vary significantly depending on codebase size, language, and query type.
  • Dependency on the parent CocoIndex Rust engine means issues or breaking changes there propagate downstream; the coupling is opaque from the README alone.
  • The AI coding agent integration landscape (MCP, Skills, Cursor plugins) is evolving rapidly — tight coupling to current agent APIs creates a risk of compatibility rot if agent vendors change protocols.
  • Local embedding quality (Snowflake arctic-embed-xs) for code search is a known tradeoff — small models may underperform on complex or domain-specific code, and this is not acknowledged in the README.
Prediction

Likely to grow steadily as the MCP ecosystem matures and AI coding agent usage expands, but may face consolidation pressure if major agent platforms build native codebase indexing. A niche but durable tool if maintained consistently.

0 found this helpful

Newsletter

Get analyses like this every Monday

Free weekly digest of the most interesting open-source discoveries.

Languages

Python
98.3%
Dockerfile
1.2%
Shell
0.4%
TypeScript
0.1%

Information

Language
Python
License
Apache-2.0
Last updated
1w ago
Created
5mo ago
Analyzed with
anthropic/claude-haiku-4-5

Stars over time

Loading…

Contributors over time

Top 100 contributors only — repos with more will plateau at 100.

Loading…

Similar repos

cocoindex-io

cocoindex-io/cocoindex

CocoIndex is an incremental indexing engine for AI agents that continuously...

10.7k Rust AI & ML
giancarloerra

giancarloerra/SocratiCode

SocratiCode is an open-source codebase intelligence engine that provides...

3.1k TypeScript Dev Tools
openai

openai/codex

Codex CLI is an OpenAI-developed terminal-based coding agent that runs locally...

96.9k Rust AI & ML
colbymchenry

colbymchenry/codegraph

CodeGraph is a CLI tool and MCP server that builds a pre-indexed semantic...

59k TypeScript AI & ML
zilliztech

zilliztech/claude-context

Claude Context is an MCP plugin that integrates semantic code search into...

12.1k TypeScript AI & ML
vs. alternatives
sourcegraph/zoekt (grep/trigram search)

Zoekt is a mature, battle-tested trigram-based code search engine used at scale in production. cocoindex-code targets semantic/conceptual search via embeddings and AST rather than exact-match or regex, and is positioned as an embedded CLI rather than a hosted service. Different use cases with some overlap.

aider (AI coding assistant)

Aider has its own repo-map feature for summarizing codebase structure to reduce LLM context. cocoindex-code focuses specifically on semantic search as a pluggable component rather than being a full coding assistant, making it potentially complementary rather than directly competing.

continue.dev (IDE extension with codebase indexing)

Continue offers codebase indexing and context retrieval within an IDE extension. cocoindex-code is agent/CLI-first and integrates via MCP or Skill protocol, so it can work across multiple agent surfaces rather than being tied to a specific IDE.

greptile.com (cloud code search API)

Greptile is a hosted cloud service for semantic code search targeted at teams. cocoindex-code is fully local/embedded with no data leaving the machine by default, which is a meaningful differentiator for privacy-sensitive or offline scenarios.

tree-sitter-based grep tools (ast-grep, semgrep)

Tools like ast-grep and semgrep use AST patterns for structural search but require writing explicit patterns. cocoindex-code uses embeddings for fuzzy/semantic queries without requiring the user to know exact syntax or patterns, lowering the usage barrier for exploratory search.