xindex 1.0.4 → 1.0.5
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 +27 -26
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -39,6 +39,15 @@ Drop this into `.mcp.json` at your project root:
|
|
|
39
39
|
|
|
40
40
|
Open the project in Claude Code — it picks up the xindex MCP server and can call `xindex_search`, `xindex_index`, and `xindex_reset` directly. Fewer hallucinations, fewer round-trips.
|
|
41
41
|
|
|
42
|
+
## Features
|
|
43
|
+
|
|
44
|
+
- **Local** — everything runs on your machine; embeddings cached on disk
|
|
45
|
+
- **Semantic search** — natural-language queries, not substring match
|
|
46
|
+
- **MCP server** — plugs into Claude Code via `.mcp.json`
|
|
47
|
+
- **Watch mode** — keeps the index warm while you code
|
|
48
|
+
- **Gitignore-aware** — respects `.gitignore` + custom ignore rules
|
|
49
|
+
- **Zero config** — works with defaults; `.xindex.json` is optional
|
|
50
|
+
|
|
42
51
|
## Claude Code skills (`@xi`)
|
|
43
52
|
|
|
44
53
|
Two optional [Claude Code skills](https://docs.claude.com/en/docs/claude-code/skills) wrap the MCP tools so you don't have to think about them:
|
|
@@ -73,13 +82,12 @@ argument-hint: "[question]"
|
|
|
73
82
|
Surface-level codebase discovery via xindex. Tool: `xindex_search` (natural-language, meaning-based).
|
|
74
83
|
|
|
75
84
|
**Steps:**
|
|
76
|
-
1. Draft
|
|
77
|
-
2.
|
|
78
|
-
3.
|
|
79
|
-
4.
|
|
80
|
-
5. Return file paths + brief keywords showing why each matched.
|
|
85
|
+
1. Draft 3–7 queries from $ARGUMENTS (entry points, routing, config, tests, patterns); run `xindex_search` in parallel.
|
|
86
|
+
2. If empty/sparse/stale → scoped `xindex_index` on relevant root folders (one path per call, e.g. `src`, `skills`, `agents`), then re-search. Prefer scoped over full-repo.
|
|
87
|
+
3. Run 3–7 narrower follow-ups in parallel based on round-1 hits.
|
|
88
|
+
4. Return file paths + brief keywords showing why each matched.
|
|
81
89
|
|
|
82
|
-
Output = file links + keywords, not analysis. For reset or full re-index, delegate to `/xindex` (owns safety rules).
|
|
90
|
+
Output = file links + keywords, not analysis. **Escalate to `/ask-cursor` by default** (cheap codebase reasoning); only go to `/ask-claude` for multi-file/pattern analysis or `/ask-claude-opus` for trade-offs. For reset or full re-index, delegate to `/xindex` (owns safety rules).
|
|
83
91
|
````
|
|
84
92
|
|
|
85
93
|
`xindex/SKILL.md`:
|
|
@@ -90,7 +98,7 @@ name: xindex
|
|
|
90
98
|
description: Manages xindex semantic search — index, search, reset via MCP tools. For research questions, use /ask-xi.
|
|
91
99
|
argument-hint: "[search query | index | reset]"
|
|
92
100
|
---
|
|
93
|
-
Full xindex tool management. For research, use `/ask-xi`. Install: `npm i -g xindex
|
|
101
|
+
Full xindex tool management. For research, use `/ask-xi`. Install: `npm i -g xindex` ([npm](https://www.npmjs.com/package/xindex)).
|
|
94
102
|
|
|
95
103
|
**Tools:**
|
|
96
104
|
- `xindex_search` — find files by meaning (synonyms, semantics). Try before grepping blindly.
|
|
@@ -106,15 +114,6 @@ $ARGUMENTS
|
|
|
106
114
|
|
|
107
115
|
Both skills assume the `xindex` MCP server is registered (see the section above). Restart Claude Code after adding skills.
|
|
108
116
|
|
|
109
|
-
## Features
|
|
110
|
-
|
|
111
|
-
- **Local** — everything runs on your machine; embeddings cached on disk
|
|
112
|
-
- **Semantic search** — natural-language queries, not substring match
|
|
113
|
-
- **MCP server** — plugs into Claude Code via `.mcp.json`
|
|
114
|
-
- **Watch mode** — keeps the index warm while you code
|
|
115
|
-
- **Gitignore-aware** — respects `.gitignore` + custom ignore rules
|
|
116
|
-
- **Zero config** — works with defaults; `.xindex.json` is optional
|
|
117
|
-
|
|
118
117
|
---
|
|
119
118
|
|
|
120
119
|
## CLI reference
|
|
@@ -129,7 +128,7 @@ xindex-index apps features
|
|
|
129
128
|
```
|
|
130
129
|
|
|
131
130
|
### `xindex-search <query...>`
|
|
132
|
-
Search the index. All args are joined into one query. Default limit:
|
|
131
|
+
Search the index. All args are joined into one query. Default limit: 7.
|
|
133
132
|
```bash
|
|
134
133
|
xindex-search "database migration logic"
|
|
135
134
|
xindex-search file watcher debounce
|
|
@@ -157,19 +156,22 @@ xindex-mcp --watch-dir=./src # watch a specific dir
|
|
|
157
156
|
|
|
158
157
|
## MCP tools
|
|
159
158
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
| `xindex_index` | Index paths | `inputs: string[]` (at least one) |
|
|
164
|
-
| `xindex_reset` | Wipe index (destructive) | — |
|
|
159
|
+
- **`xindex_search`** — semantic search. `query: string`, `limit?: number` (default 7, max 50)
|
|
160
|
+
- **`xindex_index`** — index paths. `inputs: string[]` (at least one)
|
|
161
|
+
- **`xindex_reset`** — wipe index (destructive). No input
|
|
165
162
|
|
|
166
|
-
Note: CLI `xindex-search`
|
|
163
|
+
Note: both CLI `xindex-search` and MCP `xindex_search` default to 7 results; MCP caps at 50.
|
|
167
164
|
|
|
168
165
|
## Configuration
|
|
169
166
|
|
|
170
167
|
### `.xindex.json` (optional)
|
|
171
168
|
|
|
172
|
-
|
|
169
|
+
Project-root file. All fields optional; unknown keys ignored; missing/empty → defaults.
|
|
170
|
+
|
|
171
|
+
- **`ignoreKeywords`** — `string[]`, default `[]`. Tokens stripped before embedding — add project slang/boilerplate polluting results. Entries ≤1 char warn.
|
|
172
|
+
- **`ignoreFiles`** — `string[]`, default `[]`. Extra globs excluded during walk/watch, on top of `.gitignore` — add vendored/generated folders.
|
|
173
|
+
- **`maxLines`** — `number`, default `30`. Lines per chunk — tune if chunks feel over/under-sized.
|
|
174
|
+
- **`maxFileBytes`** — `number`, default `5000000`. Skip files over this (5 MB) — lower for faster indexing on huge generated files.
|
|
173
175
|
|
|
174
176
|
```json
|
|
175
177
|
{
|
|
@@ -178,8 +180,7 @@ Place at your project root. Both fields are optional arrays; unknown keys are ig
|
|
|
178
180
|
}
|
|
179
181
|
```
|
|
180
182
|
|
|
181
|
-
|
|
182
|
-
- **`ignoreFiles`** — extra glob patterns excluded during walk/watch, on top of `.gitignore`.
|
|
183
|
+
Override only what you need; re-run `xindex-index .` (or let the watcher pick it up). Invalid JSON throws; wrong-typed fields fall back silently.
|
|
183
184
|
|
|
184
185
|
### `.xindex/` folder
|
|
185
186
|
|