xindex 1.0.11 → 1.0.12
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 +19 -7
- package/componets/config/loadConfig.ts +4 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
# xindex
|
|
2
2
|
|
|
3
3
|
**grep matches text. xindex matches meaning.**
|
|
4
|
+
Fully local, no cloud, no API keys, instant response.
|
|
4
5
|
|
|
5
|
-
Ask
|
|
6
|
+
Ask **"where is auth handled?"** — get the right files, even when they don't contain the word *auth*.
|
|
7
|
+
|
|
8
|
+
Local semantic code search for your codebase,
|
|
9
|
+
w/ an MCP server so Claude Code searches your repo directly.
|
|
10
|
+
Fewer hallucinations, fewer round-trips.
|
|
6
11
|
|
|
7
12
|
## Install
|
|
8
13
|
|
|
@@ -12,7 +17,7 @@ Requires **Node ≥22**.
|
|
|
12
17
|
npm i -g xindex
|
|
13
18
|
```
|
|
14
19
|
|
|
15
|
-
First run downloads a small embedding model (
|
|
20
|
+
First run downloads a small embedding model (~23MB). After that, fully offline.
|
|
16
21
|
|
|
17
22
|
## Quick start
|
|
18
23
|
|
|
@@ -53,7 +58,7 @@ Drop this into `.mcp.json` at the repo root — `npx` fetches on demand:
|
|
|
53
58
|
1. `npm i -g xindex`
|
|
54
59
|
2. In `.mcp.json`, set `"command": "xindex-mcp"` with `"args": []`.
|
|
55
60
|
|
|
56
|
-
Open the project in Claude Code — it picks up the xindex MCP server and can call `xindex_search`, `xindex_index`, and `xindex_reset` directly.
|
|
61
|
+
Open the project in Claude Code — it picks up the xindex MCP server and can call `xindex_search`, `xindex_index`, and `xindex_reset` directly.
|
|
57
62
|
|
|
58
63
|
## Features
|
|
59
64
|
|
|
@@ -63,11 +68,11 @@ Open the project in Claude Code — it picks up the xindex MCP server and can ca
|
|
|
63
68
|
- **Watch mode** — keeps the index warm while you code
|
|
64
69
|
- **Gitignore-aware** — respects `.gitignore` + custom ignore rules
|
|
65
70
|
- **Zero config** — works with defaults; `.xindex.json` is optional
|
|
66
|
-
- **Tolerant** — unreadable, oversize, empty, binary files and symlinks are skipped
|
|
71
|
+
- **Tolerant** — unreadable, oversize, empty, binary files and symlinks are skipped;
|
|
67
72
|
|
|
68
73
|
## Claude Code skills (`@xi`)
|
|
69
74
|
|
|
70
|
-
Two optional
|
|
75
|
+
Two optional Claude Code skills wrap the MCP tools so you don't have to think about them:
|
|
71
76
|
|
|
72
77
|
- **`ask-xi`** — read-only discovery. `@xi where is auth handled` drafts several focused queries, runs `xindex_search` for each, and returns ranked file paths with matched keywords. Use it as a cheap first step before grepping or asking a heavier model.
|
|
73
78
|
- **`xindex`** — index management (`xindex_index`, `xindex_reset`). Reset requires explicit confirmation every time.
|
|
@@ -160,6 +165,8 @@ xindex-search file watcher debounce
|
|
|
160
165
|
|
|
161
166
|
Initial index + filesystem watch for incremental updates. Lockfile coordinates concurrent watchers; Ctrl+C releases cleanly.
|
|
162
167
|
|
|
168
|
+
Bundled inside `xindex-mcp` — no need to run separately in the primary MCP use case.
|
|
169
|
+
|
|
163
170
|
```bash
|
|
164
171
|
xindex-watch .
|
|
165
172
|
```
|
|
@@ -174,7 +181,7 @@ xindex-reset
|
|
|
174
181
|
|
|
175
182
|
### `xindex-mcp`
|
|
176
183
|
|
|
177
|
-
MCP stdio server; background watcher by default. Flags: `--watch-disabled`, `--watch-dir=./src
|
|
184
|
+
MCP stdio server; background watcher by default. Flags: `--watch-disabled`, `--watch-dir=./src` — rare use cases; defaults are fine for most setups.
|
|
178
185
|
|
|
179
186
|
## MCP tools
|
|
180
187
|
|
|
@@ -206,7 +213,7 @@ Full example with every option (copy-paste and trim what you don't need):
|
|
|
206
213
|
}
|
|
207
214
|
```
|
|
208
215
|
|
|
209
|
-
Override only what you need; re-run `xindex-index .` (or let the watcher pick it up on restart). Invalid JSON
|
|
216
|
+
Override only what you need; re-run `xindex-index .` (or let the watcher pick it up on restart). Invalid JSON or unreadable config warns and falls back to defaults; wrong-typed fields fall back silently.
|
|
210
217
|
|
|
211
218
|
### `.xindex/` folder
|
|
212
219
|
|
|
@@ -261,3 +268,8 @@ yarn test.compilation
|
|
|
261
268
|
## License
|
|
262
269
|
|
|
263
270
|
MIT
|
|
271
|
+
|
|
272
|
+
## Links
|
|
273
|
+
|
|
274
|
+
- [Claude Code skills](https://docs.claude.com/en/docs/claude-code/skills)
|
|
275
|
+
|
|
@@ -24,7 +24,8 @@ export function LoadConfig({configPath, log}: { configPath: string, log: ILogger
|
|
|
24
24
|
raw = await readFile(configPath, "utf8");
|
|
25
25
|
} catch (e: any) {
|
|
26
26
|
if (e?.code === "ENOENT") return {...DEFAULTS};
|
|
27
|
-
|
|
27
|
+
log(`warning: cannot read ${configPath}: ${e?.message ?? e} — using defaults`);
|
|
28
|
+
return {...DEFAULTS};
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
if (!raw.trim()) return {...DEFAULTS};
|
|
@@ -33,7 +34,8 @@ export function LoadConfig({configPath, log}: { configPath: string, log: ILogger
|
|
|
33
34
|
try {
|
|
34
35
|
parsed = JSON.parse(raw);
|
|
35
36
|
} catch (e) {
|
|
36
|
-
|
|
37
|
+
log(`warning: failed to parse ${configPath}: ${e instanceof Error ? e.message : e} — using defaults`);
|
|
38
|
+
return {...DEFAULTS};
|
|
37
39
|
}
|
|
38
40
|
|
|
39
41
|
const toStrings = (v: unknown) => Array.isArray(v) ? v.filter((e): e is string => typeof e === "string") : [];
|