cocoindex-code 0.2.35__tar.gz → 0.2.36__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 (24) hide show
  1. {cocoindex_code-0.2.35 → cocoindex_code-0.2.36}/PKG-INFO +66 -5
  2. {cocoindex_code-0.2.35 → cocoindex_code-0.2.36}/README.md +65 -4
  3. {cocoindex_code-0.2.35 → cocoindex_code-0.2.36}/src/cocoindex_code/__init__.py +0 -3
  4. {cocoindex_code-0.2.35 → cocoindex_code-0.2.36}/src/cocoindex_code/_version.py +2 -2
  5. {cocoindex_code-0.2.35 → cocoindex_code-0.2.36}/.gitignore +0 -0
  6. {cocoindex_code-0.2.35 → cocoindex_code-0.2.36}/LICENSE +0 -0
  7. {cocoindex_code-0.2.35 → cocoindex_code-0.2.36}/pyproject.toml +0 -0
  8. {cocoindex_code-0.2.35 → cocoindex_code-0.2.36}/src/cocoindex_code/__main__.py +0 -0
  9. {cocoindex_code-0.2.35 → cocoindex_code-0.2.36}/src/cocoindex_code/_daemon_paths.py +0 -0
  10. {cocoindex_code-0.2.35 → cocoindex_code-0.2.36}/src/cocoindex_code/chunking.py +0 -0
  11. {cocoindex_code-0.2.35 → cocoindex_code-0.2.36}/src/cocoindex_code/cli.py +0 -0
  12. {cocoindex_code-0.2.35 → cocoindex_code-0.2.36}/src/cocoindex_code/client.py +0 -0
  13. {cocoindex_code-0.2.35 → cocoindex_code-0.2.36}/src/cocoindex_code/daemon.py +0 -0
  14. {cocoindex_code-0.2.35 → cocoindex_code-0.2.36}/src/cocoindex_code/embedder_defaults.py +0 -0
  15. {cocoindex_code-0.2.35 → cocoindex_code-0.2.36}/src/cocoindex_code/embedder_params.py +0 -0
  16. {cocoindex_code-0.2.35 → cocoindex_code-0.2.36}/src/cocoindex_code/indexer.py +0 -0
  17. {cocoindex_code-0.2.35 → cocoindex_code-0.2.36}/src/cocoindex_code/litellm_embedder.py +0 -0
  18. {cocoindex_code-0.2.35 → cocoindex_code-0.2.36}/src/cocoindex_code/project.py +0 -0
  19. {cocoindex_code-0.2.35 → cocoindex_code-0.2.36}/src/cocoindex_code/protocol.py +0 -0
  20. {cocoindex_code-0.2.35 → cocoindex_code-0.2.36}/src/cocoindex_code/query.py +0 -0
  21. {cocoindex_code-0.2.35 → cocoindex_code-0.2.36}/src/cocoindex_code/schema.py +0 -0
  22. {cocoindex_code-0.2.35 → cocoindex_code-0.2.36}/src/cocoindex_code/server.py +0 -0
  23. {cocoindex_code-0.2.35 → cocoindex_code-0.2.36}/src/cocoindex_code/settings.py +0 -0
  24. {cocoindex_code-0.2.35 → cocoindex_code-0.2.36}/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.35
3
+ Version: 0.2.36
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
@@ -121,6 +121,17 @@ The agent uses semantic search automatically when it would be helpful. You can a
121
121
 
122
122
  Works with [Claude Code](https://docs.anthropic.com/en/docs/claude-code) and other skill-compatible agents.
123
123
 
124
+ #### Claude Code plugin marketplace
125
+
126
+ For Claude Code users, this repository is also a [plugin marketplace](https://code.claude.com/docs/en/plugin-marketplaces). Install the skill from inside Claude Code with:
127
+
128
+ ```text
129
+ /plugin marketplace add Roxabi/cocoindex-code
130
+ /plugin install cocoindex-code@cocoindex-code
131
+ ```
132
+
133
+ This bundles the same `ccc` skill, with version pinning and `/plugin marketplace update` for updates.
134
+
124
135
  ### MCP Server
125
136
 
126
137
  Alternatively, use `ccc mcp` to run as an MCP server:
@@ -424,6 +435,8 @@ docker build -t cocoindex-code:local -f docker/Dockerfile .
424
435
 
425
436
  ## Configuration
426
437
 
438
+ For a detailed guide on choosing and configuring embedding models, see [EMBEDDINGS.md](EMBEDDINGS.md).
439
+
427
440
  Configuration lives in two YAML files, both created automatically by `ccc init`.
428
441
 
429
442
  ### User Settings (`~/.cocoindex_code/global_settings.yml`)
@@ -781,6 +794,33 @@ Using uv (install or upgrade):
781
794
  uv tool install --upgrade cocoindex-code
782
795
  ```
783
796
 
797
+ ### `MDB_MAP_FULL: Environment mapsize limit reached`
798
+
799
+ The index is stored in an LMDB database whose maximum size is fixed when the daemon starts. The default ceiling is **4 GiB**, which is plenty for most projects but can be exhausted by very large codebases (tens of thousands of files), especially with high-dimensional embedding models like `nomic-ai/CodeRankEmbed`.
800
+
801
+ Raise the ceiling with the `COCOINDEX_LMDB_MAP_SIZE` environment variable (value in **bytes**). LMDB only grows the file as data is written, so a high limit doesn't pre-allocate disk — it's safe to set it generously:
802
+
803
+ ```yaml
804
+ # ~/.cocoindex_code/global_settings.yml
805
+ envs:
806
+ COCOINDEX_LMDB_MAP_SIZE: "34359738368" # 32 GiB (= 32 * 1024^3)
807
+ ```
808
+
809
+ Or, if you prefer to set it in your shell environment (the daemon inherits it):
810
+
811
+ ```bash
812
+ export COCOINDEX_LMDB_MAP_SIZE=$((32 * 1024 * 1024 * 1024)) # 32 GiB
813
+ ```
814
+
815
+ The map size is read when the daemon starts, so restart it to pick up the change, then re-index:
816
+
817
+ ```bash
818
+ ccc daemon restart
819
+ ccc index
820
+ ```
821
+
822
+ > This manual step is temporary. Once [cocoindex#2108](https://github.com/cocoindex-io/cocoindex/issues/2108) lands, the map size grows automatically when needed and `COCOINDEX_LMDB_MAP_SIZE` won't be necessary.
823
+
784
824
  ## Legacy: Environment Variables
785
825
 
786
826
  If you previously configured `cocoindex-code` via environment variables, the `cocoindex-code` MCP command still reads them and auto-migrates to YAML settings on first run. We recommend switching to the YAML settings for new setups.
@@ -808,18 +848,39 @@ export COCOINDEX_DISABLE_USAGE_TRACKING=1
808
848
  ## Large codebase / Enterprise
809
849
  [CocoIndex](https://github.com/cocoindex-io/cocoindex) is an ultra efficient indexing engine that also works on large codebases at scale for enterprises. In enterprise scenarios it is a lot more efficient to share indexes with teammates when there are large or many repos. We also have advanced features like branch dedupe etc designed for enterprise users.
810
850
 
851
+ > Indexing a very large codebase and hitting `MDB_MAP_FULL`? Raise the LMDB map size — see [`MDB_MAP_FULL: Environment mapsize limit reached`](#mdb_map_full-environment-mapsize-limit-reached) under Troubleshooting.
852
+
811
853
  If you need help with remote setup, please email our maintainer linghua@cocoindex.io, happy to help!
812
854
 
813
855
  ## Contributing
814
856
 
815
- We welcome contributions! Before you start, please install the [pre-commit](https://pre-commit.com/) hooks so that linting, formatting, type checking, and tests run automatically before each commit:
857
+ We welcome contributions! This project uses [uv](https://docs.astral.sh/uv/getting-started/installation/) for development, and every PR is gated on the same lint, format, type-check, and test suite in CI. **Please run these checks locally before opening a PR** — failing pre-commit checks are the most common cause of red CI on incoming PRs.
858
+
859
+ ### 1. Install the dev dependencies
860
+
861
+ After installing [uv](https://docs.astral.sh/uv/getting-started/installation/), sync the project. This installs everything the checks need — including [prek](https://github.com/j178/prek), a fast pre-commit runner, plus Ruff, mypy, and pytest:
816
862
 
817
863
  ```bash
818
- pip install pre-commit
819
- pre-commit install
864
+ uv sync
820
865
  ```
821
866
 
822
- This catches common issues trailing whitespace, lint errors (Ruff), type errors (mypy), and test failures — before they reach CI.
867
+ ### 2. Run all checks before every PR
868
+
869
+ Run the full hook suite across all files — this is exactly what CI runs:
870
+
871
+ ```bash
872
+ uv run prek run --all-files
873
+ ```
874
+
875
+ It runs trailing-whitespace/end-of-file fixes, Ruff lint (`--fix`) and format, `uv.lock` validation, mypy type checking, and the pytest suite. Fix anything it reports (Ruff auto-fixes most lint/format issues for you), re-run until it passes, then push.
876
+
877
+ ### 3. (Optional) Run automatically on each commit
878
+
879
+ To have the same checks run on every `git commit`, install the git hook once:
880
+
881
+ ```bash
882
+ uv run prek install
883
+ ```
823
884
 
824
885
  For more details, see our [contributing guide](https://cocoindex.io/docs/contributing/guide).
825
886
 
@@ -77,6 +77,17 @@ The agent uses semantic search automatically when it would be helpful. You can a
77
77
 
78
78
  Works with [Claude Code](https://docs.anthropic.com/en/docs/claude-code) and other skill-compatible agents.
79
79
 
80
+ #### Claude Code plugin marketplace
81
+
82
+ For Claude Code users, this repository is also a [plugin marketplace](https://code.claude.com/docs/en/plugin-marketplaces). Install the skill from inside Claude Code with:
83
+
84
+ ```text
85
+ /plugin marketplace add Roxabi/cocoindex-code
86
+ /plugin install cocoindex-code@cocoindex-code
87
+ ```
88
+
89
+ This bundles the same `ccc` skill, with version pinning and `/plugin marketplace update` for updates.
90
+
80
91
  ### MCP Server
81
92
 
82
93
  Alternatively, use `ccc mcp` to run as an MCP server:
@@ -380,6 +391,8 @@ docker build -t cocoindex-code:local -f docker/Dockerfile .
380
391
 
381
392
  ## Configuration
382
393
 
394
+ For a detailed guide on choosing and configuring embedding models, see [EMBEDDINGS.md](EMBEDDINGS.md).
395
+
383
396
  Configuration lives in two YAML files, both created automatically by `ccc init`.
384
397
 
385
398
  ### User Settings (`~/.cocoindex_code/global_settings.yml`)
@@ -737,6 +750,33 @@ Using uv (install or upgrade):
737
750
  uv tool install --upgrade cocoindex-code
738
751
  ```
739
752
 
753
+ ### `MDB_MAP_FULL: Environment mapsize limit reached`
754
+
755
+ The index is stored in an LMDB database whose maximum size is fixed when the daemon starts. The default ceiling is **4 GiB**, which is plenty for most projects but can be exhausted by very large codebases (tens of thousands of files), especially with high-dimensional embedding models like `nomic-ai/CodeRankEmbed`.
756
+
757
+ Raise the ceiling with the `COCOINDEX_LMDB_MAP_SIZE` environment variable (value in **bytes**). LMDB only grows the file as data is written, so a high limit doesn't pre-allocate disk — it's safe to set it generously:
758
+
759
+ ```yaml
760
+ # ~/.cocoindex_code/global_settings.yml
761
+ envs:
762
+ COCOINDEX_LMDB_MAP_SIZE: "34359738368" # 32 GiB (= 32 * 1024^3)
763
+ ```
764
+
765
+ Or, if you prefer to set it in your shell environment (the daemon inherits it):
766
+
767
+ ```bash
768
+ export COCOINDEX_LMDB_MAP_SIZE=$((32 * 1024 * 1024 * 1024)) # 32 GiB
769
+ ```
770
+
771
+ The map size is read when the daemon starts, so restart it to pick up the change, then re-index:
772
+
773
+ ```bash
774
+ ccc daemon restart
775
+ ccc index
776
+ ```
777
+
778
+ > This manual step is temporary. Once [cocoindex#2108](https://github.com/cocoindex-io/cocoindex/issues/2108) lands, the map size grows automatically when needed and `COCOINDEX_LMDB_MAP_SIZE` won't be necessary.
779
+
740
780
  ## Legacy: Environment Variables
741
781
 
742
782
  If you previously configured `cocoindex-code` via environment variables, the `cocoindex-code` MCP command still reads them and auto-migrates to YAML settings on first run. We recommend switching to the YAML settings for new setups.
@@ -764,18 +804,39 @@ export COCOINDEX_DISABLE_USAGE_TRACKING=1
764
804
  ## Large codebase / Enterprise
765
805
  [CocoIndex](https://github.com/cocoindex-io/cocoindex) is an ultra efficient indexing engine that also works on large codebases at scale for enterprises. In enterprise scenarios it is a lot more efficient to share indexes with teammates when there are large or many repos. We also have advanced features like branch dedupe etc designed for enterprise users.
766
806
 
807
+ > Indexing a very large codebase and hitting `MDB_MAP_FULL`? Raise the LMDB map size — see [`MDB_MAP_FULL: Environment mapsize limit reached`](#mdb_map_full-environment-mapsize-limit-reached) under Troubleshooting.
808
+
767
809
  If you need help with remote setup, please email our maintainer linghua@cocoindex.io, happy to help!
768
810
 
769
811
  ## Contributing
770
812
 
771
- We welcome contributions! Before you start, please install the [pre-commit](https://pre-commit.com/) hooks so that linting, formatting, type checking, and tests run automatically before each commit:
813
+ We welcome contributions! This project uses [uv](https://docs.astral.sh/uv/getting-started/installation/) for development, and every PR is gated on the same lint, format, type-check, and test suite in CI. **Please run these checks locally before opening a PR** — failing pre-commit checks are the most common cause of red CI on incoming PRs.
814
+
815
+ ### 1. Install the dev dependencies
816
+
817
+ After installing [uv](https://docs.astral.sh/uv/getting-started/installation/), sync the project. This installs everything the checks need — including [prek](https://github.com/j178/prek), a fast pre-commit runner, plus Ruff, mypy, and pytest:
772
818
 
773
819
  ```bash
774
- pip install pre-commit
775
- pre-commit install
820
+ uv sync
776
821
  ```
777
822
 
778
- This catches common issues trailing whitespace, lint errors (Ruff), type errors (mypy), and test failures — before they reach CI.
823
+ ### 2. Run all checks before every PR
824
+
825
+ Run the full hook suite across all files — this is exactly what CI runs:
826
+
827
+ ```bash
828
+ uv run prek run --all-files
829
+ ```
830
+
831
+ It runs trailing-whitespace/end-of-file fixes, Ruff lint (`--fix`) and format, `uv.lock` validation, mypy type checking, and the pytest suite. Fix anything it reports (Ruff auto-fixes most lint/format issues for you), re-run until it passes, then push.
832
+
833
+ ### 3. (Optional) Run automatically on each commit
834
+
835
+ To have the same checks run on every `git commit`, install the git hook once:
836
+
837
+ ```bash
838
+ uv run prek install
839
+ ```
779
840
 
780
841
  For more details, see our [contributing guide](https://cocoindex.io/docs/contributing/guide).
781
842
 
@@ -2,7 +2,6 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- import logging
6
5
  import os
7
6
  from typing import TYPE_CHECKING, Any
8
7
 
@@ -11,8 +10,6 @@ from typing import TYPE_CHECKING, Any
11
10
  # init time). See cocoindex-io/cocoindex#1992.
12
11
  os.environ.setdefault("COCOINDEX_APPLICATION_FOR_TRACKING", "cocoindex-code")
13
12
 
14
- logging.basicConfig(level=logging.WARNING)
15
-
16
13
  from ._version import __version__ # noqa: E402
17
14
 
18
15
  if TYPE_CHECKING:
@@ -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.35'
22
- __version_tuple__ = version_tuple = (0, 2, 35)
21
+ __version__ = version = '0.2.36'
22
+ __version_tuple__ = version_tuple = (0, 2, 36)
23
23
 
24
24
  __commit_id__ = commit_id = None
File without changes