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!
Cocoindex Code is a lightweight AST-based semantic code search plugin for AI coding agents that enables natural language querying across codebases. Built on a Rust-based indexing engine, it reduces token usage by 70% by helping agents locate relevant code without reading entire files. The plugin works with Claude Code, Grok, and other agents through multiple integration modes: a skill that teaches the agent to search automatically, hooks for auto-indexing, and an MCP server for real-time search tools. It supports 28+ languages, offers both local and cloud embedding models, and requires minimal setup with zero configuration needed to get started.
Key Features
Use Cases
- 01Finding authentication logic or session management code by description without knowing exact file locations
- 02Exploring unfamiliar codebases by asking natural language questions about functionality
- 03Reducing context window usage by retrieving only relevant code chunks for agent operations
- 04Locating implementations of specific features across large multi-language repositories
- 05Performing structural searches to find all function definitions or API calls matching a pattern
- 06Sharing semantic code indexes across development teams in enterprise environments
Related Plugins
View moreandrej-karpathy-skills
A single CLAUDE.md file to improve Claude Code behavior, derived from Andrej Karpathy's observations on LLM coding pitfalls.
claude-mem
Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Understand-Anything
Graphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
rtk
CLI proxy that reduces LLM token consumption by 60-90% on common dev commands. Single Rust binary, zero dependencies
cocoindex-code — FAQ
What is cocoindex-code?+
Cocoindex-code is an AST-based semantic code search plugin for AI coding agents that enables natural language querying of codebases. It integrates with Claude Code, Grok, and other agents via skills, hooks, or MCP server to reduce token usage by retrieving only relevant code chunks.
How do I install cocoindex-code for Claude Code?+
Install via the plugin marketplace with: /plugin marketplace add cocoindex-io/cocoindex-code then /plugin install cocoindex-code@cocoindex-code. Alternatively, install the skill directly with: npx skills add cocoindex-io/cocoindex-code. The CLI tool requires pipx install 'cocoindex-code[full]' or uv tool install --upgrade 'cocoindex-code[full]'.
Which AI coding agents does it work with?+
Cocoindex-code works with Claude Code, Grok, Oh My Pi, Codex, OpenCode, and Kilo Code. It supports integration via skills (Claude Code, Grok, Oh My Pi), MCP servers (all listed clients), and command-line usage with any agent.
Do I need an API key or embedding provider?+
No API key is required with the [full] installation, which includes local SentenceTransformers embeddings using Snowflake/snowflake-arctic-embed-xs by default. The slim variant supports 100+ cloud embedding providers (OpenAI, Voyage, Cohere, Gemini, Ollama, etc.) via LiteLLM, which do require API keys.
Is cocoindex-code free to use?+
Yes, cocoindex-code is open source under the Apache-2.0 license and free to use. Local embeddings are completely free; cloud embedding providers charge for API usage separately.
What languages and file types are supported?+
Supports 28+ languages including Python, JavaScript/TypeScript, Rust, Go, Java, C/C++, C#, SQL, PHP, Ruby, Kotlin, Swift, Solidity, and more. Custom chunkers can be configured for additional file types via YAML settings.
How do I install cocoindex-code?+
Open the source repository on GitHub and follow its README. cocoindex-code is a plugin — MCP Agents Market links you directly to the official repo.
Is cocoindex-code free?+
cocoindex-code is an open-source project hosted on GitHub. Check the repository for its license and any usage requirements.