code-context-engine 0.4.16__tar.gz → 0.4.17__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {code_context_engine-0.4.16/src/code_context_engine.egg-info → code_context_engine-0.4.17}/PKG-INFO +71 -50
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/README.md +70 -49
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/pyproject.toml +1 -1
- {code_context_engine-0.4.16 → code_context_engine-0.4.17/src/code_context_engine.egg-info}/PKG-INFO +71 -50
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/code_context_engine.egg-info/SOURCES.txt +2 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/cli.py +90 -42
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/config.py +18 -0
- code_context_engine-0.4.17/src/context_engine/editors.py +595 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/indexer/pipeline.py +274 -229
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/serve_http.py +6 -2
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/services.py +44 -6
- code_context_engine-0.4.17/tests/test_cli_safe_cwd.py +64 -0
- code_context_engine-0.4.17/tests/test_config.py +90 -0
- code_context_engine-0.4.17/tests/test_editors_codex.py +438 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/tests/test_services.py +46 -0
- code_context_engine-0.4.16/src/context_engine/editors.py +0 -328
- code_context_engine-0.4.16/tests/test_config.py +0 -49
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/LICENSE +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/setup.cfg +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/code_context_engine.egg-info/dependency_links.txt +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/code_context_engine.egg-info/entry_points.txt +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/code_context_engine.egg-info/requires.txt +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/code_context_engine.egg-info/top_level.txt +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/__init__.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/cli_style.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/compression/__init__.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/compression/compressor.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/compression/ollama_client.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/compression/output_rules.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/compression/prompts.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/compression/quality.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/dashboard/__init__.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/dashboard/_page.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/dashboard/server.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/event_bus.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/indexer/__init__.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/indexer/chunker.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/indexer/embedder.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/indexer/embedding_cache.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/indexer/git_hooks.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/indexer/git_indexer.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/indexer/ignorefile.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/indexer/manifest.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/indexer/secrets.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/indexer/watcher.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/integration/__init__.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/integration/bootstrap.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/integration/git_context.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/integration/mcp_server.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/integration/session_capture.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/memory/__init__.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/memory/compressor.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/memory/db.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/memory/extractive.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/memory/grammar.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/memory/hook_installer.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/memory/hook_server.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/memory/hooks.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/memory/migrate.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/models.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/pricing.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/project_commands.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/retrieval/__init__.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/retrieval/confidence.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/retrieval/query_parser.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/retrieval/retriever.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/storage/__init__.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/storage/backend.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/storage/fts_store.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/storage/graph_store.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/storage/local_backend.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/storage/remote_backend.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/storage/vector_store.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/src/context_engine/utils.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/tests/test_cli_init_probe.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/tests/test_cli_mcp_config.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/tests/test_cli_savings.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/tests/test_cli_savings_buckets.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/tests/test_cli_savings_e2e.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/tests/test_cli_serve.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/tests/test_cli_sessions_export.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/tests/test_cli_sessions_status.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/tests/test_cli_smoke.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/tests/test_cli_uninstall.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/tests/test_e2e.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/tests/test_editors_opencode.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/tests/test_event_bus.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/tests/test_models.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/tests/test_project_commands.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/tests/test_real_life.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/tests/test_token_efficiency.py +0 -0
- {code_context_engine-0.4.16 → code_context_engine-0.4.17}/tests/test_token_packing.py +0 -0
{code_context_engine-0.4.16/src/code_context_engine.egg-info → code_context_engine-0.4.17}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: code-context-engine
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.17
|
|
4
4
|
Summary: Index your codebase. AI searches instead of re-reading files. 94% token savings, benchmarked on FastAPI. Works with Claude Code, Cursor, VS Code, Gemini CLI, Codex, and OpenCode.
|
|
5
5
|
Author-email: Fazle Elahee <felahee@gmail.com>, Raj <rajkumar.sakti@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -48,51 +48,78 @@ Provides-Extra: http
|
|
|
48
48
|
Dynamic: license-file
|
|
49
49
|
|
|
50
50
|
<p align="center">
|
|
51
|
-
<img src="https://raw.githubusercontent.com/elara-labs/code-context-engine/main/docs/logo.svg" alt="Code Context Engine" width="
|
|
51
|
+
<img src="https://raw.githubusercontent.com/elara-labs/code-context-engine/main/docs/logo.svg" alt="Code Context Engine" width="140">
|
|
52
52
|
</p>
|
|
53
53
|
|
|
54
54
|
<h1 align="center">Code Context Engine</h1>
|
|
55
55
|
|
|
56
56
|
<p align="center">
|
|
57
|
-
<strong>Index your codebase. AI searches instead of re-reading files
|
|
57
|
+
<strong>Index your codebase. AI searches instead of re-reading files.<br>94% token savings, reproducibly benchmarked.</strong>
|
|
58
58
|
</p>
|
|
59
59
|
|
|
60
|
+
<br>
|
|
61
|
+
|
|
60
62
|
<p align="center">
|
|
61
|
-
<a href="https://
|
|
62
|
-
<a href="https://
|
|
63
|
-
<a href="https://
|
|
64
|
-
<img src="https://img.shields.io/badge/
|
|
65
|
-
<img src="https://img.shields.io/badge/
|
|
66
|
-
<img src="https://img.shields.io/
|
|
67
|
-
<a href="https://modelcontextprotocol.io"><img src="https://img.shields.io/badge/MCP-compatible-green.svg" alt="MCP Compatible"></a>
|
|
68
|
-
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="MIT License"></a>
|
|
69
|
-
<a href="https://github.com/elara-labs/code-context-engine"><img src="https://img.shields.io/github/stars/elara-labs/code-context-engine?style=social" alt="Stars"></a>
|
|
63
|
+
<a href="https://pypi.org/project/code-context-engine/"><img src="https://img.shields.io/pypi/v/code-context-engine?style=flat-square&color=blue&label=PyPI" alt="PyPI"></a>
|
|
64
|
+
<a href="https://pepy.tech/project/code-context-engine"><img src="https://img.shields.io/pepy/dt/code-context-engine?style=flat-square&label=downloads&color=blue" alt="Downloads"></a>
|
|
65
|
+
<a href="https://github.com/elara-labs/code-context-engine/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/elara-labs/code-context-engine/ci.yml?style=flat-square&label=CI" alt="CI"></a>
|
|
66
|
+
<a href="https://registry.modelcontextprotocol.io/?q=code-context-engine"><img src="https://img.shields.io/badge/MCP_Registry-listed-brightgreen?style=flat-square" alt="MCP Registry"></a>
|
|
67
|
+
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/license-MIT-yellow?style=flat-square" alt="MIT License"></a>
|
|
68
|
+
<a href="https://github.com/elara-labs/code-context-engine"><img src="https://img.shields.io/github/stars/elara-labs/code-context-engine?style=flat-square&label=stars" alt="Stars"></a>
|
|
70
69
|
</p>
|
|
71
70
|
|
|
72
71
|
<p align="center">
|
|
73
|
-
<
|
|
72
|
+
<sub>Python 3.11+ · macOS · Linux · Windows</sub>
|
|
74
73
|
</p>
|
|
75
74
|
|
|
75
|
+
<br>
|
|
76
|
+
|
|
76
77
|
<p align="center">
|
|
77
|
-
<a href="#install-and-see-savings-in-60-seconds"><img src="https://img.shields.io/badge/Claude_Code-
|
|
78
|
-
<a href="#install-and-see-savings-in-60-seconds"><img src="https://img.shields.io/badge/VS_Code-007ACC?style=for-the-badge&logo=
|
|
79
|
-
<a href="#install-and-see-savings-in-60-seconds"><img src="https://img.shields.io/badge/Cursor-
|
|
80
|
-
<a href="#install-and-see-savings-in-60-seconds"><img src="https://img.shields.io/badge/Gemini_CLI-4285F4?style=for-the-badge&logo=google&logoColor=white" alt="Gemini CLI"
|
|
81
|
-
<a href="#install-and-see-savings-in-60-seconds"><img src="https://img.shields.io/badge/Codex_CLI-412991?style=for-the-badge
|
|
82
|
-
<a href="#install-and-see-savings-in-60-seconds"><img src="https://img.shields.io/badge/OpenCode-22C55E?style=for-the-badge&logo=
|
|
78
|
+
<a href="#install-and-see-savings-in-60-seconds"><img src="https://img.shields.io/badge/Claude_Code-352318?style=for-the-badge&logo=anthropic&logoColor=D4A27F" alt="Claude Code"></a>
|
|
79
|
+
<a href="#install-and-see-savings-in-60-seconds"><img src="https://img.shields.io/badge/VS_Code-007ACC?style=for-the-badge&logo=visualstudiocode&logoColor=white" alt="VS Code"></a>
|
|
80
|
+
<a href="#install-and-see-savings-in-60-seconds"><img src="https://img.shields.io/badge/Cursor-000?style=for-the-badge" alt="Cursor"></a>
|
|
81
|
+
<a href="#install-and-see-savings-in-60-seconds"><img src="https://img.shields.io/badge/Gemini_CLI-4285F4?style=for-the-badge&logo=google&logoColor=white" alt="Gemini CLI"></a>
|
|
82
|
+
<a href="#install-and-see-savings-in-60-seconds"><img src="https://img.shields.io/badge/Codex_CLI-412991?style=for-the-badge" alt="Codex CLI"></a>
|
|
83
|
+
<a href="#install-and-see-savings-in-60-seconds"><img src="https://img.shields.io/badge/OpenCode-22C55E?style=for-the-badge&logo=gnometerminal&logoColor=white" alt="OpenCode"></a>
|
|
83
84
|
</p>
|
|
84
85
|
|
|
85
86
|
<p align="center">
|
|
86
|
-
One command.
|
|
87
|
-
Zero-cloud, zero-config. <code>cce init</code> auto-detects your editor.
|
|
87
|
+
<sub>One command. Auto-detects your editor. Zero cloud, zero config.</sub>
|
|
88
88
|
</p>
|
|
89
89
|
|
|
90
|
+
<br>
|
|
91
|
+
|
|
90
92
|
<p align="center">
|
|
91
|
-
<img src="https://raw.githubusercontent.com/elara-labs/code-context-engine/main/docs/demo.gif" alt="CCE Demo" width="
|
|
93
|
+
<img src="https://raw.githubusercontent.com/elara-labs/code-context-engine/main/docs/demo.gif" alt="CCE Demo" width="720">
|
|
92
94
|
</p>
|
|
93
95
|
|
|
94
96
|
---
|
|
95
97
|
|
|
98
|
+
## Use cases
|
|
99
|
+
|
|
100
|
+
| | Use case | How CCE helps |
|
|
101
|
+
|---|---|---|
|
|
102
|
+
| **💰** | **Reduce Claude Code costs** | 94% fewer input tokens per session |
|
|
103
|
+
| **🔒** | **Keep code private** | Everything local, no cloud indexing |
|
|
104
|
+
| **🔄** | **Multi-editor teams** | One index across Claude Code, Cursor, VS Code, Gemini CLI |
|
|
105
|
+
| **🧠** | **Cross-session memory** | Decisions and context survive restarts |
|
|
106
|
+
| **⚡** | **Faster responses** | Less context = faster Claude replies |
|
|
107
|
+
| **📊** | **Track actual savings** | Dollar amounts, not estimates |
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Quick start (3 lines)
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
uv tool install code-context-engine
|
|
115
|
+
cd /path/to/your/project
|
|
116
|
+
cce init
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
That's it. Claude now searches your index instead of reading entire files. No config needed.
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
96
123
|
## System requirements
|
|
97
124
|
|
|
98
125
|
- Python 3.11+ (tested on 3.11, 3.12, 3.13)
|
|
@@ -125,29 +152,31 @@ Restart your editor. Done. Every question now hits the index instead of re-readi
|
|
|
125
152
|
| VS Code / Copilot | `.vscode/mcp.json` | |
|
|
126
153
|
| Cursor | `.cursor/mcp.json` | `.cursorrules` |
|
|
127
154
|
| Gemini CLI | `.gemini/settings.json` | `GEMINI.md` |
|
|
128
|
-
| OpenAI Codex |
|
|
155
|
+
| OpenAI Codex | `~/.codex/config.toml` (user-global, per-project section) | |
|
|
129
156
|
| OpenCode | `opencode.json` | |
|
|
130
157
|
|
|
131
158
|
Multiple editors in the same project? All get configured in one command.
|
|
132
159
|
|
|
160
|
+
**Codex note:** Codex CLI reads MCP servers from `~/.codex/config.toml` only — it has no per-project config. `cce init` adds one `[mcp_servers.cce-<project>-<hash>]` section per project so multiple projects coexist; `cce uninstall` removes only the section for the current project.
|
|
161
|
+
|
|
133
162
|
```
|
|
134
163
|
my-project · 38 queries
|
|
135
164
|
|
|
136
165
|
⛁ ⛁ ⛁ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ 94% tokens saved
|
|
137
166
|
|
|
138
|
-
Without CCE 48.0k tokens $0.
|
|
139
|
-
With CCE 3.4k tokens $0.
|
|
167
|
+
Without CCE 48.0k tokens $0.14
|
|
168
|
+
With CCE 3.4k tokens $0.01
|
|
140
169
|
──────────────────────────────────────────
|
|
141
|
-
Saved 44.6k tokens $0.
|
|
170
|
+
Saved 44.6k tokens $0.13
|
|
142
171
|
|
|
143
|
-
Cost estimate based on
|
|
172
|
+
Cost estimate based on Sonnet input pricing ($3/1M tokens)
|
|
144
173
|
```
|
|
145
174
|
|
|
146
175
|
---
|
|
147
176
|
|
|
148
177
|
## Why this matters
|
|
149
178
|
|
|
150
|
-
Input tokens are 85-95% of your Claude Code bill. CCE cuts them by 94% ([benchmarked on FastAPI](#benchmark-fastapi-
|
|
179
|
+
Input tokens are 85-95% of your Claude Code bill. CCE cuts them by 94% ([benchmarked on FastAPI](#benchmark-fastapi-reproducible)).
|
|
151
180
|
|
|
152
181
|
```
|
|
153
182
|
Without CCE: Claude reads payments.py + shipping.py = 45,000 tokens
|
|
@@ -159,11 +188,11 @@ With CCE: context_search "payment flow" = 800 tokens
|
|
|
159
188
|
| Session startup | Re-reads files every time | Queries the index |
|
|
160
189
|
| Finding a function | Read entire 800-line file | Get the 40-line function |
|
|
161
190
|
| Cross-session memory | None | Decisions + code areas persisted |
|
|
162
|
-
| Token cost (
|
|
191
|
+
| Token cost (Sonnet, medium project) | ~$0.14/session | ~$0.04/session |
|
|
163
192
|
|
|
164
193
|
---
|
|
165
194
|
|
|
166
|
-
## Benchmark: FastAPI (
|
|
195
|
+
## Benchmark: FastAPI (reproducible)
|
|
167
196
|
|
|
168
197
|
We benchmarked CCE against [FastAPI](https://github.com/fastapi/fastapi) (53 source files, 180K tokens) with 20 real coding questions. No cherry-picking, no synthetic queries.
|
|
169
198
|
|
|
@@ -171,9 +200,8 @@ We benchmarked CCE against [FastAPI](https://github.com/fastapi/fastapi) (53 sou
|
|
|
171
200
|
|
|
172
201
|
| Metric | Result |
|
|
173
202
|
|--------|--------|
|
|
174
|
-
| **Retrieval** | **94%**
|
|
175
|
-
|
|
|
176
|
-
| **Combined** | **99.4%** (83,681 → 523 tokens/query) |
|
|
203
|
+
| **Retrieval savings** | **94%** (83,681 → 4,927 tokens/query) |
|
|
204
|
+
| Compression (additional, on retrieved chunks) | 89% (4,927 → 523 tokens/query) |
|
|
177
205
|
| Recall@10 (found the right files) | 0.90 |
|
|
178
206
|
| Latency p50 | 0.4ms |
|
|
179
207
|
| Queries tested | 20 |
|
|
@@ -184,9 +212,10 @@ We benchmarked CCE against [FastAPI](https://github.com/fastapi/fastapi) (53 sou
|
|
|
184
212
|
|-------|-------------|---------|--------|
|
|
185
213
|
| **Retrieval** | Full files → relevant code chunks | 94% | measured |
|
|
186
214
|
| **Chunk Compression** | Raw chunks → signatures + docstrings | 89% | measured |
|
|
187
|
-
| **Output Compression** | Reduces Claude's reply length | 65% | estimated |
|
|
188
215
|
| **Grammar** | Drops articles/fillers from memory text | 13% | measured |
|
|
189
216
|
|
|
217
|
+
Output compression (reducing Claude's reply length) provides additional savings (~65% estimated) but is not included in the headline number above.
|
|
218
|
+
|
|
190
219
|
**Reproduce it yourself:**
|
|
191
220
|
|
|
192
221
|
```bash
|
|
@@ -256,7 +285,7 @@ Re-indexing after edits takes under 1 second (96% embedding cache hit rate). Git
|
|
|
256
285
|
|
|
257
286
|
Output compression tools (like Caveman) save 20-75% on output tokens. Output is 5-15% of your bill. Net savings: ~11%.
|
|
258
287
|
|
|
259
|
-
CCE saves on **input** tokens (94% retrieval
|
|
288
|
+
CCE saves on **input** tokens (94% retrieval savings on FastAPI, [reproducibly benchmarked](#benchmark-fastapi-reproducible)). Input is 85-95% of your bill.
|
|
260
289
|
|
|
261
290
|
### It actually understands your code
|
|
262
291
|
|
|
@@ -343,15 +372,18 @@ Zero-config by default. Override what you need in `~/.cce/config.yaml` or `.cont
|
|
|
343
372
|
compression:
|
|
344
373
|
level: standard # minimal | standard | full
|
|
345
374
|
output: standard # off | lite | standard | max
|
|
375
|
+
ollama_url: http://localhost:11434 # point at a remote Ollama if desired
|
|
346
376
|
|
|
347
377
|
retrieval:
|
|
348
378
|
top_k: 20
|
|
349
379
|
confidence_threshold: 0.5
|
|
350
380
|
|
|
351
381
|
pricing:
|
|
352
|
-
model:
|
|
382
|
+
model: sonnet # sonnet | opus | haiku
|
|
353
383
|
```
|
|
354
384
|
|
|
385
|
+
**Remote Ollama:** If you run Ollama on another machine in your network, set `compression.ollama_url` (e.g. `http://nas.local:11434`) or export `CCE_OLLAMA_URL` — the env var wins. CCE probes the endpoint and falls back to truncation-only compression when it's unreachable, so a flaky link won't break indexing.
|
|
386
|
+
|
|
355
387
|
---
|
|
356
388
|
|
|
357
389
|
## Output Compression
|
|
@@ -414,23 +446,12 @@ No GPU required. Embedding model runs on CPU via ONNX Runtime.
|
|
|
414
446
|
|
|
415
447
|
## Roadmap
|
|
416
448
|
|
|
417
|
-
- [
|
|
418
|
-
- [x] Cross-session memory (decisions, code areas, session recall)
|
|
419
|
-
- [x] Web dashboard with live charts
|
|
420
|
-
- [x] Token savings tracking with dollar estimates
|
|
421
|
-
- [x] Output compression (off / lite / standard / max)
|
|
422
|
-
- [x] Content-hash embedding cache (96% hit rate on re-index)
|
|
423
|
-
- [x] sqlite-vec migration (99% smaller install)
|
|
424
|
-
- [x] Dynamic pricing from Anthropic docs
|
|
425
|
-
- [x] 7-layer security (secrets, PII, path traversal, audit log)
|
|
426
|
-
- [x] Clean uninstall (removes all CCE artifacts)
|
|
427
|
-
- [x] AST-aware chunking for PHP, Go, Rust, Java (tree-sitter)
|
|
428
|
-
- [x] Multi-editor support (Cursor, VS Code/Copilot, Gemini CLI)
|
|
429
|
-
- [x] Reproducible benchmark suite (94% savings on FastAPI, per-layer breakdown)
|
|
430
|
-
- [x] Session savings visibility (shown at every session start)
|
|
449
|
+
- [ ] Multi-repo benchmarks (Django, Express, a Go project)
|
|
431
450
|
- [ ] Tree-sitter support for C, C++, Ruby, Swift, Kotlin
|
|
432
451
|
- [ ] Docker support for remote mode
|
|
433
452
|
|
|
453
|
+
See [CHANGELOG.md](CHANGELOG.md) for shipped features.
|
|
454
|
+
|
|
434
455
|
---
|
|
435
456
|
|
|
436
457
|
## Contributing
|
|
@@ -1,49 +1,76 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="https://raw.githubusercontent.com/elara-labs/code-context-engine/main/docs/logo.svg" alt="Code Context Engine" width="
|
|
2
|
+
<img src="https://raw.githubusercontent.com/elara-labs/code-context-engine/main/docs/logo.svg" alt="Code Context Engine" width="140">
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
<h1 align="center">Code Context Engine</h1>
|
|
6
6
|
|
|
7
7
|
<p align="center">
|
|
8
|
-
<strong>Index your codebase. AI searches instead of re-reading files
|
|
8
|
+
<strong>Index your codebase. AI searches instead of re-reading files.<br>94% token savings, reproducibly benchmarked.</strong>
|
|
9
9
|
</p>
|
|
10
10
|
|
|
11
|
+
<br>
|
|
12
|
+
|
|
11
13
|
<p align="center">
|
|
12
|
-
<a href="https://
|
|
13
|
-
<a href="https://
|
|
14
|
-
<a href="https://
|
|
15
|
-
<img src="https://img.shields.io/badge/
|
|
16
|
-
<img src="https://img.shields.io/badge/
|
|
17
|
-
<img src="https://img.shields.io/
|
|
18
|
-
<a href="https://modelcontextprotocol.io"><img src="https://img.shields.io/badge/MCP-compatible-green.svg" alt="MCP Compatible"></a>
|
|
19
|
-
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="MIT License"></a>
|
|
20
|
-
<a href="https://github.com/elara-labs/code-context-engine"><img src="https://img.shields.io/github/stars/elara-labs/code-context-engine?style=social" alt="Stars"></a>
|
|
14
|
+
<a href="https://pypi.org/project/code-context-engine/"><img src="https://img.shields.io/pypi/v/code-context-engine?style=flat-square&color=blue&label=PyPI" alt="PyPI"></a>
|
|
15
|
+
<a href="https://pepy.tech/project/code-context-engine"><img src="https://img.shields.io/pepy/dt/code-context-engine?style=flat-square&label=downloads&color=blue" alt="Downloads"></a>
|
|
16
|
+
<a href="https://github.com/elara-labs/code-context-engine/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/elara-labs/code-context-engine/ci.yml?style=flat-square&label=CI" alt="CI"></a>
|
|
17
|
+
<a href="https://registry.modelcontextprotocol.io/?q=code-context-engine"><img src="https://img.shields.io/badge/MCP_Registry-listed-brightgreen?style=flat-square" alt="MCP Registry"></a>
|
|
18
|
+
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/license-MIT-yellow?style=flat-square" alt="MIT License"></a>
|
|
19
|
+
<a href="https://github.com/elara-labs/code-context-engine"><img src="https://img.shields.io/github/stars/elara-labs/code-context-engine?style=flat-square&label=stars" alt="Stars"></a>
|
|
21
20
|
</p>
|
|
22
21
|
|
|
23
22
|
<p align="center">
|
|
24
|
-
<
|
|
23
|
+
<sub>Python 3.11+ · macOS · Linux · Windows</sub>
|
|
25
24
|
</p>
|
|
26
25
|
|
|
26
|
+
<br>
|
|
27
|
+
|
|
27
28
|
<p align="center">
|
|
28
|
-
<a href="#install-and-see-savings-in-60-seconds"><img src="https://img.shields.io/badge/Claude_Code-
|
|
29
|
-
<a href="#install-and-see-savings-in-60-seconds"><img src="https://img.shields.io/badge/VS_Code-007ACC?style=for-the-badge&logo=
|
|
30
|
-
<a href="#install-and-see-savings-in-60-seconds"><img src="https://img.shields.io/badge/Cursor-
|
|
31
|
-
<a href="#install-and-see-savings-in-60-seconds"><img src="https://img.shields.io/badge/Gemini_CLI-4285F4?style=for-the-badge&logo=google&logoColor=white" alt="Gemini CLI"
|
|
32
|
-
<a href="#install-and-see-savings-in-60-seconds"><img src="https://img.shields.io/badge/Codex_CLI-412991?style=for-the-badge
|
|
33
|
-
<a href="#install-and-see-savings-in-60-seconds"><img src="https://img.shields.io/badge/OpenCode-22C55E?style=for-the-badge&logo=
|
|
29
|
+
<a href="#install-and-see-savings-in-60-seconds"><img src="https://img.shields.io/badge/Claude_Code-352318?style=for-the-badge&logo=anthropic&logoColor=D4A27F" alt="Claude Code"></a>
|
|
30
|
+
<a href="#install-and-see-savings-in-60-seconds"><img src="https://img.shields.io/badge/VS_Code-007ACC?style=for-the-badge&logo=visualstudiocode&logoColor=white" alt="VS Code"></a>
|
|
31
|
+
<a href="#install-and-see-savings-in-60-seconds"><img src="https://img.shields.io/badge/Cursor-000?style=for-the-badge" alt="Cursor"></a>
|
|
32
|
+
<a href="#install-and-see-savings-in-60-seconds"><img src="https://img.shields.io/badge/Gemini_CLI-4285F4?style=for-the-badge&logo=google&logoColor=white" alt="Gemini CLI"></a>
|
|
33
|
+
<a href="#install-and-see-savings-in-60-seconds"><img src="https://img.shields.io/badge/Codex_CLI-412991?style=for-the-badge" alt="Codex CLI"></a>
|
|
34
|
+
<a href="#install-and-see-savings-in-60-seconds"><img src="https://img.shields.io/badge/OpenCode-22C55E?style=for-the-badge&logo=gnometerminal&logoColor=white" alt="OpenCode"></a>
|
|
34
35
|
</p>
|
|
35
36
|
|
|
36
37
|
<p align="center">
|
|
37
|
-
One command.
|
|
38
|
-
Zero-cloud, zero-config. <code>cce init</code> auto-detects your editor.
|
|
38
|
+
<sub>One command. Auto-detects your editor. Zero cloud, zero config.</sub>
|
|
39
39
|
</p>
|
|
40
40
|
|
|
41
|
+
<br>
|
|
42
|
+
|
|
41
43
|
<p align="center">
|
|
42
|
-
<img src="https://raw.githubusercontent.com/elara-labs/code-context-engine/main/docs/demo.gif" alt="CCE Demo" width="
|
|
44
|
+
<img src="https://raw.githubusercontent.com/elara-labs/code-context-engine/main/docs/demo.gif" alt="CCE Demo" width="720">
|
|
43
45
|
</p>
|
|
44
46
|
|
|
45
47
|
---
|
|
46
48
|
|
|
49
|
+
## Use cases
|
|
50
|
+
|
|
51
|
+
| | Use case | How CCE helps |
|
|
52
|
+
|---|---|---|
|
|
53
|
+
| **💰** | **Reduce Claude Code costs** | 94% fewer input tokens per session |
|
|
54
|
+
| **🔒** | **Keep code private** | Everything local, no cloud indexing |
|
|
55
|
+
| **🔄** | **Multi-editor teams** | One index across Claude Code, Cursor, VS Code, Gemini CLI |
|
|
56
|
+
| **🧠** | **Cross-session memory** | Decisions and context survive restarts |
|
|
57
|
+
| **⚡** | **Faster responses** | Less context = faster Claude replies |
|
|
58
|
+
| **📊** | **Track actual savings** | Dollar amounts, not estimates |
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Quick start (3 lines)
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
uv tool install code-context-engine
|
|
66
|
+
cd /path/to/your/project
|
|
67
|
+
cce init
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
That's it. Claude now searches your index instead of reading entire files. No config needed.
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
47
74
|
## System requirements
|
|
48
75
|
|
|
49
76
|
- Python 3.11+ (tested on 3.11, 3.12, 3.13)
|
|
@@ -76,29 +103,31 @@ Restart your editor. Done. Every question now hits the index instead of re-readi
|
|
|
76
103
|
| VS Code / Copilot | `.vscode/mcp.json` | |
|
|
77
104
|
| Cursor | `.cursor/mcp.json` | `.cursorrules` |
|
|
78
105
|
| Gemini CLI | `.gemini/settings.json` | `GEMINI.md` |
|
|
79
|
-
| OpenAI Codex |
|
|
106
|
+
| OpenAI Codex | `~/.codex/config.toml` (user-global, per-project section) | |
|
|
80
107
|
| OpenCode | `opencode.json` | |
|
|
81
108
|
|
|
82
109
|
Multiple editors in the same project? All get configured in one command.
|
|
83
110
|
|
|
111
|
+
**Codex note:** Codex CLI reads MCP servers from `~/.codex/config.toml` only — it has no per-project config. `cce init` adds one `[mcp_servers.cce-<project>-<hash>]` section per project so multiple projects coexist; `cce uninstall` removes only the section for the current project.
|
|
112
|
+
|
|
84
113
|
```
|
|
85
114
|
my-project · 38 queries
|
|
86
115
|
|
|
87
116
|
⛁ ⛁ ⛁ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ 94% tokens saved
|
|
88
117
|
|
|
89
|
-
Without CCE 48.0k tokens $0.
|
|
90
|
-
With CCE 3.4k tokens $0.
|
|
118
|
+
Without CCE 48.0k tokens $0.14
|
|
119
|
+
With CCE 3.4k tokens $0.01
|
|
91
120
|
──────────────────────────────────────────
|
|
92
|
-
Saved 44.6k tokens $0.
|
|
121
|
+
Saved 44.6k tokens $0.13
|
|
93
122
|
|
|
94
|
-
Cost estimate based on
|
|
123
|
+
Cost estimate based on Sonnet input pricing ($3/1M tokens)
|
|
95
124
|
```
|
|
96
125
|
|
|
97
126
|
---
|
|
98
127
|
|
|
99
128
|
## Why this matters
|
|
100
129
|
|
|
101
|
-
Input tokens are 85-95% of your Claude Code bill. CCE cuts them by 94% ([benchmarked on FastAPI](#benchmark-fastapi-
|
|
130
|
+
Input tokens are 85-95% of your Claude Code bill. CCE cuts them by 94% ([benchmarked on FastAPI](#benchmark-fastapi-reproducible)).
|
|
102
131
|
|
|
103
132
|
```
|
|
104
133
|
Without CCE: Claude reads payments.py + shipping.py = 45,000 tokens
|
|
@@ -110,11 +139,11 @@ With CCE: context_search "payment flow" = 800 tokens
|
|
|
110
139
|
| Session startup | Re-reads files every time | Queries the index |
|
|
111
140
|
| Finding a function | Read entire 800-line file | Get the 40-line function |
|
|
112
141
|
| Cross-session memory | None | Decisions + code areas persisted |
|
|
113
|
-
| Token cost (
|
|
142
|
+
| Token cost (Sonnet, medium project) | ~$0.14/session | ~$0.04/session |
|
|
114
143
|
|
|
115
144
|
---
|
|
116
145
|
|
|
117
|
-
## Benchmark: FastAPI (
|
|
146
|
+
## Benchmark: FastAPI (reproducible)
|
|
118
147
|
|
|
119
148
|
We benchmarked CCE against [FastAPI](https://github.com/fastapi/fastapi) (53 source files, 180K tokens) with 20 real coding questions. No cherry-picking, no synthetic queries.
|
|
120
149
|
|
|
@@ -122,9 +151,8 @@ We benchmarked CCE against [FastAPI](https://github.com/fastapi/fastapi) (53 sou
|
|
|
122
151
|
|
|
123
152
|
| Metric | Result |
|
|
124
153
|
|--------|--------|
|
|
125
|
-
| **Retrieval** | **94%**
|
|
126
|
-
|
|
|
127
|
-
| **Combined** | **99.4%** (83,681 → 523 tokens/query) |
|
|
154
|
+
| **Retrieval savings** | **94%** (83,681 → 4,927 tokens/query) |
|
|
155
|
+
| Compression (additional, on retrieved chunks) | 89% (4,927 → 523 tokens/query) |
|
|
128
156
|
| Recall@10 (found the right files) | 0.90 |
|
|
129
157
|
| Latency p50 | 0.4ms |
|
|
130
158
|
| Queries tested | 20 |
|
|
@@ -135,9 +163,10 @@ We benchmarked CCE against [FastAPI](https://github.com/fastapi/fastapi) (53 sou
|
|
|
135
163
|
|-------|-------------|---------|--------|
|
|
136
164
|
| **Retrieval** | Full files → relevant code chunks | 94% | measured |
|
|
137
165
|
| **Chunk Compression** | Raw chunks → signatures + docstrings | 89% | measured |
|
|
138
|
-
| **Output Compression** | Reduces Claude's reply length | 65% | estimated |
|
|
139
166
|
| **Grammar** | Drops articles/fillers from memory text | 13% | measured |
|
|
140
167
|
|
|
168
|
+
Output compression (reducing Claude's reply length) provides additional savings (~65% estimated) but is not included in the headline number above.
|
|
169
|
+
|
|
141
170
|
**Reproduce it yourself:**
|
|
142
171
|
|
|
143
172
|
```bash
|
|
@@ -207,7 +236,7 @@ Re-indexing after edits takes under 1 second (96% embedding cache hit rate). Git
|
|
|
207
236
|
|
|
208
237
|
Output compression tools (like Caveman) save 20-75% on output tokens. Output is 5-15% of your bill. Net savings: ~11%.
|
|
209
238
|
|
|
210
|
-
CCE saves on **input** tokens (94% retrieval
|
|
239
|
+
CCE saves on **input** tokens (94% retrieval savings on FastAPI, [reproducibly benchmarked](#benchmark-fastapi-reproducible)). Input is 85-95% of your bill.
|
|
211
240
|
|
|
212
241
|
### It actually understands your code
|
|
213
242
|
|
|
@@ -294,15 +323,18 @@ Zero-config by default. Override what you need in `~/.cce/config.yaml` or `.cont
|
|
|
294
323
|
compression:
|
|
295
324
|
level: standard # minimal | standard | full
|
|
296
325
|
output: standard # off | lite | standard | max
|
|
326
|
+
ollama_url: http://localhost:11434 # point at a remote Ollama if desired
|
|
297
327
|
|
|
298
328
|
retrieval:
|
|
299
329
|
top_k: 20
|
|
300
330
|
confidence_threshold: 0.5
|
|
301
331
|
|
|
302
332
|
pricing:
|
|
303
|
-
model:
|
|
333
|
+
model: sonnet # sonnet | opus | haiku
|
|
304
334
|
```
|
|
305
335
|
|
|
336
|
+
**Remote Ollama:** If you run Ollama on another machine in your network, set `compression.ollama_url` (e.g. `http://nas.local:11434`) or export `CCE_OLLAMA_URL` — the env var wins. CCE probes the endpoint and falls back to truncation-only compression when it's unreachable, so a flaky link won't break indexing.
|
|
337
|
+
|
|
306
338
|
---
|
|
307
339
|
|
|
308
340
|
## Output Compression
|
|
@@ -365,23 +397,12 @@ No GPU required. Embedding model runs on CPU via ONNX Runtime.
|
|
|
365
397
|
|
|
366
398
|
## Roadmap
|
|
367
399
|
|
|
368
|
-
- [
|
|
369
|
-
- [x] Cross-session memory (decisions, code areas, session recall)
|
|
370
|
-
- [x] Web dashboard with live charts
|
|
371
|
-
- [x] Token savings tracking with dollar estimates
|
|
372
|
-
- [x] Output compression (off / lite / standard / max)
|
|
373
|
-
- [x] Content-hash embedding cache (96% hit rate on re-index)
|
|
374
|
-
- [x] sqlite-vec migration (99% smaller install)
|
|
375
|
-
- [x] Dynamic pricing from Anthropic docs
|
|
376
|
-
- [x] 7-layer security (secrets, PII, path traversal, audit log)
|
|
377
|
-
- [x] Clean uninstall (removes all CCE artifacts)
|
|
378
|
-
- [x] AST-aware chunking for PHP, Go, Rust, Java (tree-sitter)
|
|
379
|
-
- [x] Multi-editor support (Cursor, VS Code/Copilot, Gemini CLI)
|
|
380
|
-
- [x] Reproducible benchmark suite (94% savings on FastAPI, per-layer breakdown)
|
|
381
|
-
- [x] Session savings visibility (shown at every session start)
|
|
400
|
+
- [ ] Multi-repo benchmarks (Django, Express, a Go project)
|
|
382
401
|
- [ ] Tree-sitter support for C, C++, Ruby, Swift, Kotlin
|
|
383
402
|
- [ ] Docker support for remote mode
|
|
384
403
|
|
|
404
|
+
See [CHANGELOG.md](CHANGELOG.md) for shipped features.
|
|
405
|
+
|
|
385
406
|
---
|
|
386
407
|
|
|
387
408
|
## Contributing
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "code-context-engine"
|
|
3
|
-
version = "0.4.
|
|
3
|
+
version = "0.4.17"
|
|
4
4
|
description = "Index your codebase. AI searches instead of re-reading files. 94% token savings, benchmarked on FastAPI. Works with Claude Code, Cursor, VS Code, Gemini CLI, Codex, and OpenCode."
|
|
5
5
|
readme = {file = "README.md", content-type = "text/markdown"}
|
|
6
6
|
license = "MIT"
|