@tai-io/codesearch 2026.313.1614 → 2026.313.1626
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.
- package/README.md +115 -0
- package/dist/build-info.d.ts +2 -2
- package/dist/build-info.js +2 -2
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# @tai-io/codesearch
|
|
2
|
+
|
|
3
|
+
Semantic code search MCP server for [Claude Code](https://claude.ai/code). Index any codebase and search it by meaning, not just keywords.
|
|
4
|
+
|
|
5
|
+
## How it works
|
|
6
|
+
|
|
7
|
+
1. **Index** a codebase — files are parsed with tree-sitter (AST-aware chunking for 10 languages), embedded via OpenAI, and stored in a local SQLite database
|
|
8
|
+
2. **Search** by natural language — queries are embedded and matched using hybrid search (dense vectors + full-text, RRF fusion)
|
|
9
|
+
3. Results return in a compact table (~20 tokens/result) so Claude can efficiently decide what to read in full
|
|
10
|
+
|
|
11
|
+
All data is stored locally under `~/.eidetic/`. No external servers required.
|
|
12
|
+
|
|
13
|
+
## Quick start
|
|
14
|
+
|
|
15
|
+
### Prerequisites
|
|
16
|
+
|
|
17
|
+
- Node.js >= 20
|
|
18
|
+
- An OpenAI API key (for embeddings), or Ollama running locally
|
|
19
|
+
|
|
20
|
+
### Install as a Claude Code MCP server
|
|
21
|
+
|
|
22
|
+
Add to your Claude Code config (`.claude.json` or via CLI):
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
claude mcp add -s user -e OPENAI_API_KEY=sk-... eidetic-codesearch npx @tai-io/codesearch
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Or add the MCP config directly:
|
|
29
|
+
|
|
30
|
+
```json
|
|
31
|
+
{
|
|
32
|
+
"eidetic-codesearch": {
|
|
33
|
+
"command": "npx",
|
|
34
|
+
"args": ["@tai-io/codesearch"],
|
|
35
|
+
"env": {
|
|
36
|
+
"OPENAI_API_KEY": "sk-..."
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Use it
|
|
43
|
+
|
|
44
|
+
Once configured, Claude Code has 8 new tools:
|
|
45
|
+
|
|
46
|
+
| Tool | Example | What it does |
|
|
47
|
+
|------|---------|--------------|
|
|
48
|
+
| `index` | `index(path="/my/project")` | Index a codebase (~30s one-time) |
|
|
49
|
+
| `search` | `search(query="how does auth work")` | Semantic search |
|
|
50
|
+
| `list` | `list()` | See indexed codebases |
|
|
51
|
+
| `browse` | `browse(path="/my/project")` | Structural map of classes/functions |
|
|
52
|
+
| `clear` | `clear(path="/my/project")` | Remove index |
|
|
53
|
+
| `cleanup` | `cleanup(path="/my/project")` | Remove vectors for deleted files |
|
|
54
|
+
| `ingest` | `ingest(content="...", library="react", ...)` | Cache external docs |
|
|
55
|
+
| `lookup` | `lookup(query="react hooks")` | Search cached docs |
|
|
56
|
+
|
|
57
|
+
## Tools
|
|
58
|
+
|
|
59
|
+
| Tool | Description |
|
|
60
|
+
|------|-------------|
|
|
61
|
+
| `index` | Index a codebase for semantic search. Incremental — only re-embeds changed files. |
|
|
62
|
+
| `search` | Search indexed code by natural language. Returns compact results (~20 tokens each). |
|
|
63
|
+
| `list` | List all indexed codebases with status and file/chunk counts. |
|
|
64
|
+
| `browse` | Structural map — classes, functions, methods with signatures, grouped by file. |
|
|
65
|
+
| `clear` | Remove the search index for a codebase. |
|
|
66
|
+
| `cleanup` | Remove orphaned vectors for deleted files. No embedding cost. |
|
|
67
|
+
| `ingest` | Cache external documentation for cheap semantic search later. |
|
|
68
|
+
| `lookup` | Search cached documentation (~20 tokens/result vs ~5K for re-fetching). |
|
|
69
|
+
|
|
70
|
+
## Supported languages
|
|
71
|
+
|
|
72
|
+
AST-aware chunking (via tree-sitter): TypeScript, JavaScript, Python, Go, Java, Rust, C++, C, C#, TSX.
|
|
73
|
+
|
|
74
|
+
Line-based fallback for all other text files.
|
|
75
|
+
|
|
76
|
+
## Configuration
|
|
77
|
+
|
|
78
|
+
All configuration is via environment variables:
|
|
79
|
+
|
|
80
|
+
| Variable | Default | Description |
|
|
81
|
+
|----------|---------|-------------|
|
|
82
|
+
| `OPENAI_API_KEY` | *required* | OpenAI API key for embeddings |
|
|
83
|
+
| `EMBEDDING_PROVIDER` | `openai` | `openai`, `ollama`, or `local` |
|
|
84
|
+
| `EMBEDDING_MODEL` | `text-embedding-3-small` | Embedding model name |
|
|
85
|
+
| `OPENAI_BASE_URL` | — | Override base URL (for proxies or compatible APIs) |
|
|
86
|
+
| `OLLAMA_BASE_URL` | `http://localhost:11434/v1` | Ollama server URL |
|
|
87
|
+
| `EMBEDDING_BATCH_SIZE` | `100` | Vectors per API call (1–2048) |
|
|
88
|
+
| `INDEXING_CONCURRENCY` | `8` | Parallel file processing (1–32) |
|
|
89
|
+
| `EIDETIC_DATA_DIR` | `~/.eidetic` | Data directory for indexes and state |
|
|
90
|
+
| `CUSTOM_EXTENSIONS` | `[]` | Additional file extensions as JSON array |
|
|
91
|
+
| `CUSTOM_IGNORE_PATTERNS` | `[]` | Additional glob ignore patterns as JSON array |
|
|
92
|
+
|
|
93
|
+
### Using Ollama (free, local)
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
# Install and start Ollama with an embedding model
|
|
97
|
+
ollama pull nomic-embed-text
|
|
98
|
+
|
|
99
|
+
# Configure
|
|
100
|
+
export EMBEDDING_PROVIDER=ollama
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Development
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
git clone https://github.com/tai-io/codesearch.git
|
|
107
|
+
cd codesearch
|
|
108
|
+
npm install
|
|
109
|
+
npm run build
|
|
110
|
+
npm test
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## License
|
|
114
|
+
|
|
115
|
+
MIT
|
package/dist/build-info.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const BUILD_VERSION = "2026.313.
|
|
2
|
-
export declare const BUILD_TIMESTAMP = "2026-03-13T16:
|
|
1
|
+
export declare const BUILD_VERSION = "2026.313.1626";
|
|
2
|
+
export declare const BUILD_TIMESTAMP = "2026-03-13T16:26:54.448Z";
|
|
3
3
|
//# sourceMappingURL=build-info.d.ts.map
|
package/dist/build-info.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// Auto-generated by scripts/generate-build-info.ts — do not edit
|
|
2
|
-
export const BUILD_VERSION = '2026.313.
|
|
3
|
-
export const BUILD_TIMESTAMP = '2026-03-13T16:
|
|
2
|
+
export const BUILD_VERSION = '2026.313.1626';
|
|
3
|
+
export const BUILD_TIMESTAMP = '2026-03-13T16:26:54.448Z';
|
|
4
4
|
//# sourceMappingURL=build-info.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tai-io/codesearch",
|
|
3
|
-
"version": "2026.313.
|
|
3
|
+
"version": "2026.313.1626",
|
|
4
4
|
"description": "Semantic code search MCP server for Claude Code",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
},
|
|
74
74
|
"repository": {
|
|
75
75
|
"type": "git",
|
|
76
|
-
"url": "https://github.com/
|
|
76
|
+
"url": "https://github.com/tai-io/codesearch.git"
|
|
77
77
|
},
|
|
78
78
|
"license": "MIT"
|
|
79
79
|
}
|