code-context-engine  by elara-labs

AI coding token savings via intelligent codebase indexing

Created 2 months ago
265 stars

Top 96.1% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

The Code Context Engine (CCE) drastically cuts AI coding token costs and enhances developer workflow by enabling AI agents to search an indexed codebase locally. It offers up to 94% token savings, zero-cloud privacy, faster responses, and cross-session memory for tools like Claude Code, Copilot, and Gemini CLI.

How It Works

CCE indexes code semantically using Tree-sitter, storing local vector embeddings. AI agents query a local MCP server via hybrid vector/BM25 search augmented by code graph traversal. Retrieved code chunks are compressed to signatures/docstrings, with optional output compression further reducing token usage. Decisions and code focus persist across sessions, preventing repetitive explanations. This approach targets expensive input tokens, improving efficiency and cost-effectiveness.

Quick Start & Requirements

  • Primary install/run command: uvx --from "code-context-engine[local]" cce init installs, indexes, and configures in ~30 seconds.
  • Non-default prerequisites: Python 3.11+, C compiler. OS-specific build tools (e.g., build-essential on Linux, Xcode on macOS, VS Build Tools on Windows). Ollama recommended.
  • Links: Documentation, benchmarks, and examples are referenced but not directly linked in the provided text.

Highlighted Details

  • Token Savings: Up to 94% input token savings (benchmarked).
  • Privacy: Fully local, zero-cloud indexing; automatically avoids secrets and scrubs PII.
  • Multi-Agent Support: Integrates with Claude Code, Copilot, Cursor, Gemini CLI, etc., auto-configuring editors.
  • Persistent Memory: Recalls past decisions and code focus across sessions.
  • Technology: Tree-sitter parsing, sqlite-vec embeddings, hybrid search.

Maintenance & Community

No specific details on maintainers, contributors, sponsorships, or community channels were found in the provided README text.

Licensing & Compatibility

  • License Type: MIT License.
  • Compatibility: Permissive for commercial use and integration into closed-source projects.

Limitations & Caveats

Headline savings are against naive full-file reads; real-world savings may be lower. Recall metrics vary by language/project structure. Tree-sitter support for some languages is pending.

Health Check
Last Commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
18
Issues (30d)
7
Star History
120 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.