← all repositories
cocoindex-io/cocoindex-code

Semantic search that breaks code at the joints

It gives coding agents structurally aware search so they stop drowning in bloated context windows.

cocoindex-code
Velocity · 7d
+46
★ / day
Trend
accelerating
star history

What it does

cocoindex-code is a semantic search layer for your codebase. It parses code into AST-aware chunks via Tree-sitter, indexes them, and answers natural-language queries from the CLI or directly inside coding agents like Claude Code and Codex. A background daemon keeps the embedding model warm, so searches are fast once the index is built.

The interesting bit

The project is essentially a Python CLI and agent-integration wrapper around CocoIndex, a Rust data-transformation engine. That pairing means the indexing pipeline stays fast while the user-facing surface stays flexible: you can run it locally with an offline embedding model, pipe it through LiteLLM to a cloud provider, or expose it to agents via MCP and skills.

Key highlights

  • Claims to cut agent token usage by 70% by sending structurally relevant chunks instead of whole files.
  • Agent-native integrations: ships both an MCP server and a skill for Claude Code, Codex, and Cursor, letting the agent decide when to search.
  • Two deployment personalities: a slim, cloud-embedding variant (~450 MB Docker image) and a full offline-ready variant (~5 GB) that bundles sentence-transformers and defaults to Snowflake’s Arctic Embed XS.
  • Search granularity respects syntax: filters by language and path globs, and returns line-numbered chunks with similarity scores.
  • Includes operational conveniences like ccc doctor for diagnostics, streaming index progress, and auto-initialization on first use.

Caveats

  • On macOS, the Docker full image cannot access Apple Metal GPUs, so local embedding inference falls back to CPU; the README recommends a native install if you need local speed.

Verdict

Worth a look if you want AST-aware code search to feed your coding agent without shipping entire files into the context window. Skip it if you already have a RAG pipeline you trust and don’t want another background daemon.

Frequently asked

What is cocoindex-io/cocoindex-code?
It gives coding agents structurally aware search so they stop drowning in bloated context windows.
Is cocoindex-code open source?
Yes — cocoindex-io/cocoindex-code is open source, released under the Apache-2.0 license.
What language is cocoindex-code written in?
cocoindex-io/cocoindex-code is primarily written in Python.
How popular is cocoindex-code?
cocoindex-io/cocoindex-code has 2.5k stars on GitHub and is currently accelerating.
Where can I find cocoindex-code?
cocoindex-io/cocoindex-code is on GitHub at https://github.com/cocoindex-io/cocoindex-code.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.