cocoindex-code 0.2.25__tar.gz → 0.2.27__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 (22) hide show
  1. {cocoindex_code-0.2.25 → cocoindex_code-0.2.27}/PKG-INFO +29 -10
  2. {cocoindex_code-0.2.25 → cocoindex_code-0.2.27}/README.md +26 -7
  3. {cocoindex_code-0.2.25 → cocoindex_code-0.2.27}/pyproject.toml +11 -1
  4. {cocoindex_code-0.2.25 → cocoindex_code-0.2.27}/src/cocoindex_code/_version.py +2 -2
  5. {cocoindex_code-0.2.25 → cocoindex_code-0.2.27}/src/cocoindex_code/cli.py +1 -1
  6. {cocoindex_code-0.2.25 → cocoindex_code-0.2.27}/.gitignore +0 -0
  7. {cocoindex_code-0.2.25 → cocoindex_code-0.2.27}/LICENSE +0 -0
  8. {cocoindex_code-0.2.25 → cocoindex_code-0.2.27}/src/cocoindex_code/__init__.py +0 -0
  9. {cocoindex_code-0.2.25 → cocoindex_code-0.2.27}/src/cocoindex_code/__main__.py +0 -0
  10. {cocoindex_code-0.2.25 → cocoindex_code-0.2.27}/src/cocoindex_code/_daemon_paths.py +0 -0
  11. {cocoindex_code-0.2.25 → cocoindex_code-0.2.27}/src/cocoindex_code/chunking.py +0 -0
  12. {cocoindex_code-0.2.25 → cocoindex_code-0.2.27}/src/cocoindex_code/client.py +0 -0
  13. {cocoindex_code-0.2.25 → cocoindex_code-0.2.27}/src/cocoindex_code/daemon.py +0 -0
  14. {cocoindex_code-0.2.25 → cocoindex_code-0.2.27}/src/cocoindex_code/indexer.py +0 -0
  15. {cocoindex_code-0.2.25 → cocoindex_code-0.2.27}/src/cocoindex_code/litellm_embedder.py +0 -0
  16. {cocoindex_code-0.2.25 → cocoindex_code-0.2.27}/src/cocoindex_code/project.py +0 -0
  17. {cocoindex_code-0.2.25 → cocoindex_code-0.2.27}/src/cocoindex_code/protocol.py +0 -0
  18. {cocoindex_code-0.2.25 → cocoindex_code-0.2.27}/src/cocoindex_code/query.py +0 -0
  19. {cocoindex_code-0.2.25 → cocoindex_code-0.2.27}/src/cocoindex_code/schema.py +0 -0
  20. {cocoindex_code-0.2.25 → cocoindex_code-0.2.27}/src/cocoindex_code/server.py +0 -0
  21. {cocoindex_code-0.2.25 → cocoindex_code-0.2.27}/src/cocoindex_code/settings.py +0 -0
  22. {cocoindex_code-0.2.25 → cocoindex_code-0.2.27}/src/cocoindex_code/shared.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cocoindex-code
3
- Version: 0.2.25
3
+ Version: 0.2.27
4
4
  Summary: MCP server for indexing and querying codebases using CocoIndex
5
5
  Project-URL: Homepage, https://github.com/cocoindex-io/cocoindex-code
6
6
  Project-URL: Repository, https://github.com/cocoindex-io/cocoindex-code
@@ -28,8 +28,6 @@ Requires-Dist: pyyaml>=6.0
28
28
  Requires-Dist: questionary>=2.0.0
29
29
  Requires-Dist: sqlite-vec>=0.1.0
30
30
  Requires-Dist: typer>=0.9.0
31
- Provides-Extra: default
32
- Requires-Dist: cocoindex[sentence-transformers]==1.0.0a43; extra == 'default'
33
31
  Provides-Extra: dev
34
32
  Requires-Dist: cocoindex[sentence-transformers]==1.0.0a43; extra == 'dev'
35
33
  Requires-Dist: mypy>=1.0.0; extra == 'dev'
@@ -40,6 +38,8 @@ Requires-Dist: pytest>=7.0.0; extra == 'dev'
40
38
  Requires-Dist: ruff>=0.1.0; extra == 'dev'
41
39
  Provides-Extra: embeddings-local
42
40
  Requires-Dist: cocoindex[sentence-transformers]==1.0.0a43; extra == 'embeddings-local'
41
+ Provides-Extra: full
42
+ Requires-Dist: cocoindex[sentence-transformers]==1.0.0a43; extra == 'full'
43
43
  Description-Content-Type: text/markdown
44
44
 
45
45
  <p align="center">
@@ -90,18 +90,18 @@ A lightweight, effective **(AST-based)** semantic code search tool for your code
90
90
 
91
91
  Using [pipx](https://pipx.pypa.io/stable/installation/):
92
92
  ```bash
93
- pipx install 'cocoindex-code[default]' # batteries included (local embeddings)
93
+ pipx install 'cocoindex-code[full]' # batteries included (local embeddings)
94
94
  pipx upgrade cocoindex-code # upgrade
95
95
  ```
96
96
 
97
97
  Using [uv](https://docs.astral.sh/uv/getting-started/installation/):
98
98
  ```bash
99
- uv tool install --upgrade 'cocoindex-code[default]' --prerelease explicit --with "cocoindex>=1.0.0a24"
99
+ uv tool install --upgrade 'cocoindex-code[full]' --prerelease explicit --with "cocoindex>=1.0.0a24"
100
100
  ```
101
101
 
102
- Two install styles:
103
- - `cocoindex-code[default]` — batteries-included. Pulls in `sentence-transformers` so local embeddings (no API key required) work out of the box. The `ccc init` interactive prompt defaults to [Snowflake/snowflake-arctic-embed-xs](https://huggingface.co/Snowflake/snowflake-arctic-embed-xs).
104
- - `cocoindex-code` — slim. LiteLLM-only; requires a cloud embedding provider and API key. Use when you don't want the local-embedding deps (~1 GB of torch + transformers).
102
+ Two install styles — they mirror the Docker image variants of the same names:
103
+ - `cocoindex-code[full]` — batteries-included. Pulls in `sentence-transformers` so local embeddings (no API key required) work out of the box. The `ccc init` interactive prompt defaults to [Snowflake/snowflake-arctic-embed-xs](https://huggingface.co/Snowflake/snowflake-arctic-embed-xs).
104
+ - `cocoindex-code` (slim) — LiteLLM-only; requires a cloud embedding provider and API key. Use when you don't want the local-embedding deps (~1 GB of torch + transformers).
105
105
 
106
106
  Next, set up your [coding agent integration](#coding-agent-integration) — or jump to [Manual CLI Usage](#manual-cli-usage) if you prefer direct control.
107
107
 
@@ -242,6 +242,25 @@ The recommended approach is a **persistent container**: start it once, and use
242
242
  `docker exec` to run CLI commands or connect MCP sessions to it. The daemon
243
243
  inside stays warm across sessions, so the embedding model is loaded only once.
244
244
 
245
+ ### Choosing an image
246
+
247
+ Two variants are published from each release:
248
+
249
+ | Tag | Size | Embedding backends | When to pick |
250
+ |---|---|---|---|
251
+ | `cocoindex/cocoindex-code:latest` (slim, default) | ~450 MB | LiteLLM (cloud: OpenAI, Voyage, Gemini, Ollama, …) | Most users. Cloud-backed embeddings, smaller image, fast pulls. |
252
+ | `cocoindex/cocoindex-code:full` | ~5 GB | sentence-transformers (local) + LiteLLM | When you want local embeddings without an API key, or an offline-ready container. Heavier because of torch + transformers. |
253
+
254
+ The rest of this section uses `:latest` — substitute `:full` in the `image:` /
255
+ `docker run` commands if you want the full variant.
256
+
257
+ > **Mac users running the `:full` variant:** local embedding inference is
258
+ > CPU-only inside Docker, because Docker on macOS can't access Apple's Metal
259
+ > (MPS) GPU. If you want local embeddings and fast inference, install
260
+ > natively instead: `pipx install 'cocoindex-code[full]'`. The `:latest`
261
+ > (slim) variant is unaffected — LiteLLM runs the model on the provider's
262
+ > side, so Docker vs. native makes no difference.
263
+
245
264
  ### Quick start — `docker compose up -d`
246
265
 
247
266
  Grab [`docker/docker-compose.yml`](./docker/docker-compose.yml) from this repo and run:
@@ -396,7 +415,7 @@ docker build -t cocoindex-code:local -f docker/Dockerfile .
396
415
  - **Ultra Performant**: ⚡ Built on top of ultra performant [Rust indexing engine](https://github.com/cocoindex-io/cocoindex). Only re-indexes changed files for fast updates.
397
416
  - **Multi-Language Support**: Python, JavaScript/TypeScript, Rust, Go, Java, C/C++, C#, SQL, Shell, and more.
398
417
  - **Embedded**: Portable and just works, no database setup required!
399
- - **Flexible Embeddings**: Local SentenceTransformers via the `[default]` extra (free, no API key!) or 100+ cloud providers via LiteLLM.
418
+ - **Flexible Embeddings**: Local SentenceTransformers via the `[full]` extra (free, no API key!) or 100+ cloud providers via LiteLLM.
400
419
 
401
420
  ## Configuration
402
421
 
@@ -483,7 +502,7 @@ See [`src/cocoindex_code/chunking.py`](./src/cocoindex_code/chunking.py) for the
483
502
 
484
503
  ## Embedding Models
485
504
 
486
- With the `[default]` extra installed, `ccc init` defaults to a local SentenceTransformers model ([Snowflake/snowflake-arctic-embed-xs](https://huggingface.co/Snowflake/snowflake-arctic-embed-xs)) — no API key required. To use a different model, edit `~/.cocoindex_code/global_settings.yml`.
505
+ With the `[full]` extra installed, `ccc init` defaults to a local SentenceTransformers model ([Snowflake/snowflake-arctic-embed-xs](https://huggingface.co/Snowflake/snowflake-arctic-embed-xs)) — no API key required. To use a different model, edit `~/.cocoindex_code/global_settings.yml`.
487
506
 
488
507
  > The `envs` entries below are only needed if the key isn't already in your shell environment — the daemon inherits your environment automatically.
489
508
 
@@ -46,18 +46,18 @@ A lightweight, effective **(AST-based)** semantic code search tool for your code
46
46
 
47
47
  Using [pipx](https://pipx.pypa.io/stable/installation/):
48
48
  ```bash
49
- pipx install 'cocoindex-code[default]' # batteries included (local embeddings)
49
+ pipx install 'cocoindex-code[full]' # batteries included (local embeddings)
50
50
  pipx upgrade cocoindex-code # upgrade
51
51
  ```
52
52
 
53
53
  Using [uv](https://docs.astral.sh/uv/getting-started/installation/):
54
54
  ```bash
55
- uv tool install --upgrade 'cocoindex-code[default]' --prerelease explicit --with "cocoindex>=1.0.0a24"
55
+ uv tool install --upgrade 'cocoindex-code[full]' --prerelease explicit --with "cocoindex>=1.0.0a24"
56
56
  ```
57
57
 
58
- Two install styles:
59
- - `cocoindex-code[default]` — batteries-included. Pulls in `sentence-transformers` so local embeddings (no API key required) work out of the box. The `ccc init` interactive prompt defaults to [Snowflake/snowflake-arctic-embed-xs](https://huggingface.co/Snowflake/snowflake-arctic-embed-xs).
60
- - `cocoindex-code` — slim. LiteLLM-only; requires a cloud embedding provider and API key. Use when you don't want the local-embedding deps (~1 GB of torch + transformers).
58
+ Two install styles — they mirror the Docker image variants of the same names:
59
+ - `cocoindex-code[full]` — batteries-included. Pulls in `sentence-transformers` so local embeddings (no API key required) work out of the box. The `ccc init` interactive prompt defaults to [Snowflake/snowflake-arctic-embed-xs](https://huggingface.co/Snowflake/snowflake-arctic-embed-xs).
60
+ - `cocoindex-code` (slim) — LiteLLM-only; requires a cloud embedding provider and API key. Use when you don't want the local-embedding deps (~1 GB of torch + transformers).
61
61
 
62
62
  Next, set up your [coding agent integration](#coding-agent-integration) — or jump to [Manual CLI Usage](#manual-cli-usage) if you prefer direct control.
63
63
 
@@ -198,6 +198,25 @@ The recommended approach is a **persistent container**: start it once, and use
198
198
  `docker exec` to run CLI commands or connect MCP sessions to it. The daemon
199
199
  inside stays warm across sessions, so the embedding model is loaded only once.
200
200
 
201
+ ### Choosing an image
202
+
203
+ Two variants are published from each release:
204
+
205
+ | Tag | Size | Embedding backends | When to pick |
206
+ |---|---|---|---|
207
+ | `cocoindex/cocoindex-code:latest` (slim, default) | ~450 MB | LiteLLM (cloud: OpenAI, Voyage, Gemini, Ollama, …) | Most users. Cloud-backed embeddings, smaller image, fast pulls. |
208
+ | `cocoindex/cocoindex-code:full` | ~5 GB | sentence-transformers (local) + LiteLLM | When you want local embeddings without an API key, or an offline-ready container. Heavier because of torch + transformers. |
209
+
210
+ The rest of this section uses `:latest` — substitute `:full` in the `image:` /
211
+ `docker run` commands if you want the full variant.
212
+
213
+ > **Mac users running the `:full` variant:** local embedding inference is
214
+ > CPU-only inside Docker, because Docker on macOS can't access Apple's Metal
215
+ > (MPS) GPU. If you want local embeddings and fast inference, install
216
+ > natively instead: `pipx install 'cocoindex-code[full]'`. The `:latest`
217
+ > (slim) variant is unaffected — LiteLLM runs the model on the provider's
218
+ > side, so Docker vs. native makes no difference.
219
+
201
220
  ### Quick start — `docker compose up -d`
202
221
 
203
222
  Grab [`docker/docker-compose.yml`](./docker/docker-compose.yml) from this repo and run:
@@ -352,7 +371,7 @@ docker build -t cocoindex-code:local -f docker/Dockerfile .
352
371
  - **Ultra Performant**: ⚡ Built on top of ultra performant [Rust indexing engine](https://github.com/cocoindex-io/cocoindex). Only re-indexes changed files for fast updates.
353
372
  - **Multi-Language Support**: Python, JavaScript/TypeScript, Rust, Go, Java, C/C++, C#, SQL, Shell, and more.
354
373
  - **Embedded**: Portable and just works, no database setup required!
355
- - **Flexible Embeddings**: Local SentenceTransformers via the `[default]` extra (free, no API key!) or 100+ cloud providers via LiteLLM.
374
+ - **Flexible Embeddings**: Local SentenceTransformers via the `[full]` extra (free, no API key!) or 100+ cloud providers via LiteLLM.
356
375
 
357
376
  ## Configuration
358
377
 
@@ -439,7 +458,7 @@ See [`src/cocoindex_code/chunking.py`](./src/cocoindex_code/chunking.py) for the
439
458
 
440
459
  ## Embedding Models
441
460
 
442
- With the `[default]` extra installed, `ccc init` defaults to a local SentenceTransformers model ([Snowflake/snowflake-arctic-embed-xs](https://huggingface.co/Snowflake/snowflake-arctic-embed-xs)) — no API key required. To use a different model, edit `~/.cocoindex_code/global_settings.yml`.
461
+ With the `[full]` extra installed, `ccc init` defaults to a local SentenceTransformers model ([Snowflake/snowflake-arctic-embed-xs](https://huggingface.co/Snowflake/snowflake-arctic-embed-xs)) — no API key required. To use a different model, edit `~/.cocoindex_code/global_settings.yml`.
443
462
 
444
463
  > The `envs` entries below are only needed if the key isn't already in your shell environment — the daemon inherits your environment automatically.
445
464
 
@@ -36,10 +36,20 @@ dependencies = [
36
36
  ]
37
37
 
38
38
  [project.optional-dependencies]
39
+ # `embeddings-local` is the primary feature extra: it pulls in
40
+ # `sentence-transformers` (via cocoindex) so local embeddings work without
41
+ # an API key.
39
42
  embeddings-local = [
40
43
  "cocoindex[sentence-transformers]==1.0.0a43",
41
44
  ]
42
- default = [
45
+ # `full` is the umbrella "batteries-included" alias. Today it's just
46
+ # `embeddings-local`, but we expect to bundle more optional niceties under
47
+ # it over time — users who want everything can keep using `[full]` and pick
48
+ # up the additions automatically. The name also matches the Docker
49
+ # `:full` image variant for consistency across install paths. Contents are
50
+ # inlined rather than self-referencing `cocoindex-code[embeddings-local]`
51
+ # to avoid resolver edge cases with older pip.
52
+ full = [
43
53
  "cocoindex[sentence-transformers]==1.0.0a43",
44
54
  ]
45
55
  dev = [
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
18
18
  commit_id: str | None
19
19
  __commit_id__: str | None
20
20
 
21
- __version__ = version = '0.2.25'
22
- __version_tuple__ = version_tuple = (0, 2, 25)
21
+ __version__ = version = '0.2.27'
22
+ __version_tuple__ = version_tuple = (0, 2, 27)
23
23
 
24
24
  __commit_id__ = commit_id = None
@@ -327,7 +327,7 @@ def _resolve_embedding_choice(
327
327
  return EmbeddingSettings(provider="sentence-transformers", model=DEFAULT_ST_MODEL)
328
328
  _typer.echo(
329
329
  "Error: sentence-transformers is not installed and stdin is not a TTY.\n"
330
- "Either install the extra (`pip install cocoindex-code[embeddings-local]`)\n"
330
+ "Either install the extra (`pip install 'cocoindex-code[embeddings-local]'`)\n"
331
331
  "or pass `--litellm-model MODEL` to select a LiteLLM model.",
332
332
  err=True,
333
333
  )
File without changes