code-context-engine 0.4.15__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.
Files changed (92) hide show
  1. {code_context_engine-0.4.15/src/code_context_engine.egg-info → code_context_engine-0.4.17}/PKG-INFO +71 -50
  2. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/README.md +70 -49
  3. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/pyproject.toml +1 -1
  4. {code_context_engine-0.4.15 → code_context_engine-0.4.17/src/code_context_engine.egg-info}/PKG-INFO +71 -50
  5. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/code_context_engine.egg-info/SOURCES.txt +2 -0
  6. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/cli.py +103 -54
  7. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/config.py +18 -0
  8. code_context_engine-0.4.17/src/context_engine/editors.py +595 -0
  9. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/indexer/pipeline.py +274 -229
  10. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/integration/mcp_server.py +37 -9
  11. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/serve_http.py +6 -2
  12. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/services.py +44 -6
  13. code_context_engine-0.4.17/tests/test_cli_safe_cwd.py +64 -0
  14. code_context_engine-0.4.17/tests/test_config.py +90 -0
  15. code_context_engine-0.4.17/tests/test_editors_codex.py +438 -0
  16. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/tests/test_services.py +46 -0
  17. code_context_engine-0.4.15/src/context_engine/editors.py +0 -328
  18. code_context_engine-0.4.15/tests/test_config.py +0 -49
  19. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/LICENSE +0 -0
  20. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/setup.cfg +0 -0
  21. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/code_context_engine.egg-info/dependency_links.txt +0 -0
  22. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/code_context_engine.egg-info/entry_points.txt +0 -0
  23. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/code_context_engine.egg-info/requires.txt +0 -0
  24. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/code_context_engine.egg-info/top_level.txt +0 -0
  25. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/__init__.py +0 -0
  26. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/cli_style.py +0 -0
  27. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/compression/__init__.py +0 -0
  28. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/compression/compressor.py +0 -0
  29. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/compression/ollama_client.py +0 -0
  30. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/compression/output_rules.py +0 -0
  31. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/compression/prompts.py +0 -0
  32. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/compression/quality.py +0 -0
  33. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/dashboard/__init__.py +0 -0
  34. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/dashboard/_page.py +0 -0
  35. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/dashboard/server.py +0 -0
  36. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/event_bus.py +0 -0
  37. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/indexer/__init__.py +0 -0
  38. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/indexer/chunker.py +0 -0
  39. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/indexer/embedder.py +0 -0
  40. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/indexer/embedding_cache.py +0 -0
  41. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/indexer/git_hooks.py +0 -0
  42. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/indexer/git_indexer.py +0 -0
  43. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/indexer/ignorefile.py +0 -0
  44. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/indexer/manifest.py +0 -0
  45. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/indexer/secrets.py +0 -0
  46. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/indexer/watcher.py +0 -0
  47. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/integration/__init__.py +0 -0
  48. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/integration/bootstrap.py +0 -0
  49. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/integration/git_context.py +0 -0
  50. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/integration/session_capture.py +0 -0
  51. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/memory/__init__.py +0 -0
  52. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/memory/compressor.py +0 -0
  53. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/memory/db.py +0 -0
  54. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/memory/extractive.py +0 -0
  55. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/memory/grammar.py +0 -0
  56. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/memory/hook_installer.py +0 -0
  57. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/memory/hook_server.py +0 -0
  58. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/memory/hooks.py +0 -0
  59. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/memory/migrate.py +0 -0
  60. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/models.py +0 -0
  61. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/pricing.py +0 -0
  62. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/project_commands.py +0 -0
  63. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/retrieval/__init__.py +0 -0
  64. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/retrieval/confidence.py +0 -0
  65. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/retrieval/query_parser.py +0 -0
  66. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/retrieval/retriever.py +0 -0
  67. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/storage/__init__.py +0 -0
  68. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/storage/backend.py +0 -0
  69. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/storage/fts_store.py +0 -0
  70. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/storage/graph_store.py +0 -0
  71. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/storage/local_backend.py +0 -0
  72. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/storage/remote_backend.py +0 -0
  73. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/storage/vector_store.py +0 -0
  74. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/src/context_engine/utils.py +0 -0
  75. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/tests/test_cli_init_probe.py +0 -0
  76. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/tests/test_cli_mcp_config.py +0 -0
  77. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/tests/test_cli_savings.py +0 -0
  78. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/tests/test_cli_savings_buckets.py +0 -0
  79. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/tests/test_cli_savings_e2e.py +0 -0
  80. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/tests/test_cli_serve.py +0 -0
  81. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/tests/test_cli_sessions_export.py +0 -0
  82. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/tests/test_cli_sessions_status.py +0 -0
  83. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/tests/test_cli_smoke.py +0 -0
  84. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/tests/test_cli_uninstall.py +0 -0
  85. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/tests/test_e2e.py +0 -0
  86. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/tests/test_editors_opencode.py +0 -0
  87. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/tests/test_event_bus.py +0 -0
  88. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/tests/test_models.py +0 -0
  89. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/tests/test_project_commands.py +0 -0
  90. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/tests/test_real_life.py +0 -0
  91. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/tests/test_token_efficiency.py +0 -0
  92. {code_context_engine-0.4.15 → code_context_engine-0.4.17}/tests/test_token_packing.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: code-context-engine
3
- Version: 0.4.15
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="160">
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. 94% token savings, benchmarked.</strong>
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://github.com/elara-labs/code-context-engine/actions/workflows/ci.yml"><img src="https://github.com/elara-labs/code-context-engine/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
62
- <a href="https://pypi.org/project/code-context-engine/"><img src="https://img.shields.io/pypi/v/code-context-engine?color=blue&label=PyPI" alt="PyPI"></a>
63
- <a href="https://www.python.org/downloads/"><img src="https://img.shields.io/badge/python-3.11+-blue.svg" alt="Python 3.11+"></a>
64
- <img src="https://img.shields.io/badge/macOS-000000?logo=apple&logoColor=white" alt="macOS">
65
- <img src="https://img.shields.io/badge/Linux-FCC624?logo=linux&logoColor=black" alt="Linux">
66
- <img src="https://img.shields.io/badge/Windows-0078D6?logo=windows&logoColor=white" alt="Windows">
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
- <strong>Works with your editor</strong>
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-D4A27F?style=for-the-badge&logo=anthropic&logoColor=black" alt="Claude Code" height="36"></a>&nbsp;&nbsp;
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=visual-studio-code&logoColor=white" alt="VS Code" height="36"></a>&nbsp;&nbsp;
79
- <a href="#install-and-see-savings-in-60-seconds"><img src="https://img.shields.io/badge/Cursor-000000?style=for-the-badge&logo=cursor&logoColor=white" alt="Cursor" height="36"></a>&nbsp;&nbsp;
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" height="36"></a>&nbsp;&nbsp;
81
- <a href="#install-and-see-savings-in-60-seconds"><img src="https://img.shields.io/badge/Codex_CLI-412991?style=for-the-badge&logo=openai&logoColor=white" alt="Codex CLI" height="36"></a>&nbsp;&nbsp;
82
- <a href="#install-and-see-savings-in-60-seconds"><img src="https://img.shields.io/badge/OpenCode-22C55E?style=for-the-badge&logo=terminal&logoColor=white" alt="OpenCode" height="36"></a>
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>&nbsp;
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>&nbsp;
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>&nbsp;
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>&nbsp;
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>&nbsp;
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. Index your codebase. Your AI coding agent searches instead of reading entire files.<br>
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="800">
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 | `.codex/config.toml` | |
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.24
139
- With CCE 3.4k tokens $0.02
167
+ Without CCE 48.0k tokens $0.14
168
+ With CCE 3.4k tokens $0.01
140
169
  ──────────────────────────────────────────
141
- Saved 44.6k tokens $0.22
170
+ Saved 44.6k tokens $0.13
142
171
 
143
- Cost estimate based on Opus input pricing ($5/1M tokens)
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-independently-verified)).
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 (Opus, medium project) | ~$0.48/session | ~$0.14/session |
191
+ | Token cost (Sonnet, medium project) | ~$0.14/session | ~$0.04/session |
163
192
 
164
193
  ---
165
194
 
166
- ## Benchmark: FastAPI (independently verified)
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%** savings (83,681 → 4,927 tokens/query) |
175
- | **+ Compression** | **89%** additional (4,927 → 523 tokens/query) |
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 + 89% compression on FastAPI, [independently benchmarked](#benchmark-fastapi-independently-verified)). Input is 85-95% of your bill.
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: opus # opus | sonnet | haiku
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
- - [x] Semantic indexing + hybrid retrieval + graph expansion
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="160">
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. 94% token savings, benchmarked.</strong>
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://github.com/elara-labs/code-context-engine/actions/workflows/ci.yml"><img src="https://github.com/elara-labs/code-context-engine/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
13
- <a href="https://pypi.org/project/code-context-engine/"><img src="https://img.shields.io/pypi/v/code-context-engine?color=blue&label=PyPI" alt="PyPI"></a>
14
- <a href="https://www.python.org/downloads/"><img src="https://img.shields.io/badge/python-3.11+-blue.svg" alt="Python 3.11+"></a>
15
- <img src="https://img.shields.io/badge/macOS-000000?logo=apple&logoColor=white" alt="macOS">
16
- <img src="https://img.shields.io/badge/Linux-FCC624?logo=linux&logoColor=black" alt="Linux">
17
- <img src="https://img.shields.io/badge/Windows-0078D6?logo=windows&logoColor=white" alt="Windows">
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
- <strong>Works with your editor</strong>
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-D4A27F?style=for-the-badge&logo=anthropic&logoColor=black" alt="Claude Code" height="36"></a>&nbsp;&nbsp;
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=visual-studio-code&logoColor=white" alt="VS Code" height="36"></a>&nbsp;&nbsp;
30
- <a href="#install-and-see-savings-in-60-seconds"><img src="https://img.shields.io/badge/Cursor-000000?style=for-the-badge&logo=cursor&logoColor=white" alt="Cursor" height="36"></a>&nbsp;&nbsp;
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" height="36"></a>&nbsp;&nbsp;
32
- <a href="#install-and-see-savings-in-60-seconds"><img src="https://img.shields.io/badge/Codex_CLI-412991?style=for-the-badge&logo=openai&logoColor=white" alt="Codex CLI" height="36"></a>&nbsp;&nbsp;
33
- <a href="#install-and-see-savings-in-60-seconds"><img src="https://img.shields.io/badge/OpenCode-22C55E?style=for-the-badge&logo=terminal&logoColor=white" alt="OpenCode" height="36"></a>
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>&nbsp;
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>&nbsp;
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>&nbsp;
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>&nbsp;
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>&nbsp;
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. Index your codebase. Your AI coding agent searches instead of reading entire files.<br>
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="800">
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 | `.codex/config.toml` | |
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.24
90
- With CCE 3.4k tokens $0.02
118
+ Without CCE 48.0k tokens $0.14
119
+ With CCE 3.4k tokens $0.01
91
120
  ──────────────────────────────────────────
92
- Saved 44.6k tokens $0.22
121
+ Saved 44.6k tokens $0.13
93
122
 
94
- Cost estimate based on Opus input pricing ($5/1M tokens)
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-independently-verified)).
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 (Opus, medium project) | ~$0.48/session | ~$0.14/session |
142
+ | Token cost (Sonnet, medium project) | ~$0.14/session | ~$0.04/session |
114
143
 
115
144
  ---
116
145
 
117
- ## Benchmark: FastAPI (independently verified)
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%** savings (83,681 → 4,927 tokens/query) |
126
- | **+ Compression** | **89%** additional (4,927 → 523 tokens/query) |
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 + 89% compression on FastAPI, [independently benchmarked](#benchmark-fastapi-independently-verified)). Input is 85-95% of your bill.
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: opus # opus | sonnet | haiku
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
- - [x] Semantic indexing + hybrid retrieval + graph expansion
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.15"
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"