Skip to content

Commit 6779f0d

Browse files
authored
docs: update README (#26)
1 parent 4faead0 commit 6779f0d

1 file changed

Lines changed: 36 additions & 22 deletions

File tree

README.md

Lines changed: 36 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -40,22 +40,20 @@ A super light-weight, effective embedded MCP **(AST-based)** that understand and
4040

4141
## Get Started - zero config, let's go!!
4242

43-
Install [`uv`](https://docs.astral.sh/uv/getting-started/installation/) if you don't have it.
43+
Requires Python 3 (`pip3` comes pre-installed with Python).
4444

4545
```bash
46-
curl -LsSf https://astral.sh/uv/install.sh | sh
46+
pip3 install -U cocoindex-code
4747
```
4848

4949
### Claude
5050
```bash
51-
claude mcp add cocoindex-code \
52-
-- uvx --prerelease=explicit --with "cocoindex>=1.0.0a22" cocoindex-code@latest
51+
claude mcp add cocoindex-code -- cocoindex-code
5352
```
5453

5554
### Codex
5655
```bash
57-
codex mcp add cocoindex-code \
58-
-- uvx --prerelease=explicit --with "cocoindex>=1.0.0a22" cocoindex-code@latest
56+
codex mcp add cocoindex-code -- cocoindex-code
5957
```
6058

6159
### OpenCode
@@ -64,7 +62,7 @@ opencode mcp add
6462
```
6563
Enter MCP server name: `cocoindex-code`
6664
Select MCP server type: `local`
67-
Enter command to run: `uvx --prerelease=explicit --with cocoindex>=1.0.0a16 cocoindex-code@latest`
65+
Enter command to run: `cocoindex-code`
6866

6967
Or use opencode.json:
7068
```
@@ -74,17 +72,15 @@ Or use opencode.json:
7472
"cocoindex-code": {
7573
"type": "local",
7674
"command": [
77-
"uvx",
78-
"--prerelease=explicit",
79-
"--with",
80-
"cocoindex>=1.0.0a16",
81-
"cocoindex-code@latest"
75+
"cocoindex-code"
8276
]
8377
}
8478
}
8579
}
8680
```
8781

82+
Optionally, you can run `cocoindex-code index` to create or update the index. Without running it, the MCP server will automatically build and keep the index up-to-date in the background.
83+
8884
## Features
8985
- **Semantic Code Search**: Find relevant code using natural language queries when grep doesn't work well, and save tokens immediately.
9086
- **Ultra Performant to code changes**:⚡ Built on top of ultra performant [Rust indexing engine](https://github.com/cocoindex-io/cocoindex/edit/main/README.md). Only re-indexes changed files for fast updates.
@@ -123,7 +119,7 @@ Set `COCOINDEX_CODE_EMBEDDING_MODEL` to any [LiteLLM-supported model](https://do
123119
```bash
124120
claude mcp add cocoindex-code \
125121
-e COCOINDEX_CODE_EMBEDDING_MODEL=ollama/nomic-embed-text \
126-
-- uvx --prerelease=explicit --with "cocoindex>=1.0.0a22" cocoindex-code@latest
122+
-- cocoindex-code
127123
```
128124

129125
Set `OLLAMA_API_BASE` if your Ollama server is not at `http://localhost:11434`.
@@ -137,7 +133,7 @@ Set `OLLAMA_API_BASE` if your Ollama server is not at `http://localhost:11434`.
137133
claude mcp add cocoindex-code \
138134
-e COCOINDEX_CODE_EMBEDDING_MODEL=text-embedding-3-small \
139135
-e OPENAI_API_KEY=your-api-key \
140-
-- uvx --prerelease=explicit --with "cocoindex>=1.0.0a22" cocoindex-code@latest
136+
-- cocoindex-code
141137
```
142138

143139
</details>
@@ -151,7 +147,7 @@ claude mcp add cocoindex-code \
151147
-e AZURE_API_KEY=your-api-key \
152148
-e AZURE_API_BASE=https://your-resource.openai.azure.com \
153149
-e AZURE_API_VERSION=2024-06-01 \
154-
-- uvx --prerelease=explicit --with "cocoindex>=1.0.0a22" cocoindex-code@latest
150+
-- cocoindex-code
155151
```
156152

157153
</details>
@@ -163,7 +159,7 @@ claude mcp add cocoindex-code \
163159
claude mcp add cocoindex-code \
164160
-e COCOINDEX_CODE_EMBEDDING_MODEL=gemini/text-embedding-004 \
165161
-e GEMINI_API_KEY=your-api-key \
166-
-- uvx --prerelease=explicit --with "cocoindex>=1.0.0a22" cocoindex-code@latest
162+
-- cocoindex-code
167163
```
168164

169165
</details>
@@ -175,7 +171,7 @@ claude mcp add cocoindex-code \
175171
claude mcp add cocoindex-code \
176172
-e COCOINDEX_CODE_EMBEDDING_MODEL=mistral/mistral-embed \
177173
-e MISTRAL_API_KEY=your-api-key \
178-
-- uvx --prerelease=explicit --with "cocoindex>=1.0.0a22" cocoindex-code@latest
174+
-- cocoindex-code
179175
```
180176

181177
</details>
@@ -187,7 +183,7 @@ claude mcp add cocoindex-code \
187183
claude mcp add cocoindex-code \
188184
-e COCOINDEX_CODE_EMBEDDING_MODEL=voyage/voyage-code-3 \
189185
-e VOYAGE_API_KEY=your-api-key \
190-
-- uvx --prerelease=explicit --with "cocoindex>=1.0.0a22" cocoindex-code@latest
186+
-- cocoindex-code
191187
```
192188

193189
</details>
@@ -199,7 +195,7 @@ claude mcp add cocoindex-code \
199195
claude mcp add cocoindex-code \
200196
-e COCOINDEX_CODE_EMBEDDING_MODEL=cohere/embed-english-v3.0 \
201197
-e COHERE_API_KEY=your-api-key \
202-
-- uvx --prerelease=explicit --with "cocoindex>=1.0.0a22" cocoindex-code@latest
198+
-- cocoindex-code
203199
```
204200

205201
</details>
@@ -213,7 +209,7 @@ claude mcp add cocoindex-code \
213209
-e AWS_ACCESS_KEY_ID=your-access-key \
214210
-e AWS_SECRET_ACCESS_KEY=your-secret-key \
215211
-e AWS_REGION_NAME=us-east-1 \
216-
-- uvx --prerelease=explicit --with "cocoindex>=1.0.0a22" cocoindex-code@latest
212+
-- cocoindex-code
217213
```
218214

219215
</details>
@@ -225,7 +221,7 @@ claude mcp add cocoindex-code \
225221
claude mcp add cocoindex-code \
226222
-e COCOINDEX_CODE_EMBEDDING_MODEL=nebius/BAAI/bge-en-icl \
227223
-e NEBIUS_API_KEY=your-api-key \
228-
-- uvx --prerelease=explicit --with "cocoindex>=1.0.0a22" cocoindex-code@latest
224+
-- cocoindex-code
229225
```
230226

231227
</details>
@@ -240,7 +236,7 @@ If you have a GPU, [`nomic-ai/CodeRankEmbed`](https://huggingface.co/nomic-ai/Co
240236
claude mcp add cocoindex-code \
241237
-e COCOINDEX_CODE_EMBEDDING_MODEL=sbert/nomic-ai/CodeRankEmbed \
242238
-e COCOINDEX_CODE_BATCH_SIZE=16 \
243-
-- uvx --prerelease=explicit --with "cocoindex>=1.0.0a18" cocoindex-code@latest
239+
-- cocoindex-code
244240
```
245241

246242
> **Note:** Switching models requires re-indexing your codebase (the vector dimensions differ).
@@ -315,6 +311,24 @@ Common generated directories are automatically excluded:
315311
- `dist/`
316312
- `vendor/` (Go vendored dependencies, matched by domain-based child paths)
317313

314+
## Troubleshooting
315+
316+
### `sqlite3.Connection object has no attribute enable_load_extension`
317+
318+
Some Python installations (e.g. the one pre-installed on macOS) ship with a SQLite library that doesn't enable extensions.
319+
320+
**macOS fix:** Install Python through [Homebrew](https://brew.sh/):
321+
322+
```bash
323+
brew install python3
324+
```
325+
326+
Then re-install cocoindex-code with the Homebrew Python:
327+
328+
```bash
329+
pip3 install -U cocoindex-code
330+
```
331+
318332
## Large codebase / Enterprise
319333
[CocoIndex](https://github.com/cocoindex-io/cocoindex) is an ultra effecient indexing engine that also works on large codebase at scale on XXX G for enterprises. In enterprise scenarios it is a lot more effecient to do index share with teammates when there are large repo or many repos. We also have advanced features like branch dedupe etc designed for enterprise users.
320334

0 commit comments

Comments
 (0)