xindex 1.0.25 → 1.0.26

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 CHANGED
@@ -144,7 +144,7 @@ Both skills assume the `xindex` MCP server is registered (see the section above)
144
144
 
145
145
  ## CLI reference
146
146
 
147
- All five binaries run from any directory; they index/search the current working directory.
147
+ All six binaries run from any directory; they index/search the current working directory.
148
148
 
149
149
  ### `xindex-index [paths...]`
150
150
 
@@ -182,6 +182,15 @@ Wipe and recreate the index. Destructive.
182
182
  xindex-reset
183
183
  ```
184
184
 
185
+ ### `xindex-reindex [paths...]`
186
+
187
+ Reset the index, then build it again. Same as `xindex-reset` followed by `xindex-index`. Defaults to `.`.
188
+
189
+ ```bash
190
+ xindex-reindex
191
+ xindex-reindex apps features
192
+ ```
193
+
185
194
  ### `xindex-mcp`
186
195
 
187
196
  MCP stdio server; background watcher by default. Flags: `--watch-disabled`, `--watch-dir=./src` — rare use cases; defaults are fine for most setups.
@@ -0,0 +1,23 @@
1
+ import {BuildComponents} from "../components/buildComponents.js";
2
+ import {BufferedLoggerToStdOut} from "../components/logger.js";
3
+ import {WalkFiles} from "../components/walkFiles.js";
4
+ import {IndexApp} from "./indexApp.js";
5
+ import {AppId} from "../components/appId.js";
6
+ import {INDEXING_COALESCE_MS} from "../components/config/INDEXING_COALESCE_MS.js";
7
+
8
+ const appId = AppId();
9
+ const cwd = process.cwd();
10
+ const log = BufferedLoggerToStdOut();
11
+ const {indexContentBatch, getIndexStats, resetIndex, config, flush} = await BuildComponents({log, indexingCoalesceMs: INDEXING_COALESCE_MS});
12
+ const walkFiles = WalkFiles({cwd, log, ignoreFiles: config.ignoreFiles, followSymlinks: config.followSymlinks});
13
+ const indexApp = IndexApp({walkFiles, indexContent: indexContentBatch, log, maxFileBytes: config.maxFileBytes});
14
+
15
+ const inputs = process.argv.slice(2);
16
+ if (!inputs.length) inputs.push(".");
17
+
18
+ log(`[${appId}] resetting index...`);
19
+ await resetIndex();
20
+ log(`[${appId}] started, indexing: ${inputs.join(", ")}`);
21
+ await indexApp(inputs);
22
+ await flush();
23
+ log(`[${appId}] done:`, await getIndexStats());
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env -S npx --yes tsx
2
+ import "../apps/run.reindex.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xindex",
3
- "version": "1.0.25",
3
+ "version": "1.0.26",
4
4
  "description": "Local semantic code search — index codebase, search by meaning or keywords",
5
5
  "type": "module",
6
6
  "main": "xindex.ts",
@@ -10,12 +10,14 @@
10
10
  "xindex-search": "bin/xindex-search",
11
11
  "xindex-mcp": "bin/xindex-mcp",
12
12
  "xindex-reset": "bin/xindex-reset",
13
+ "xindex-reindex": "bin/xindex-reindex",
13
14
  "xindex-watch": "bin/xindex-watch"
14
15
  },
15
16
  "scripts": {
16
17
  "index": "tsx apps/run.index.ts",
17
18
  "search": "tsx apps/run.search.ts",
18
19
  "reset": "tsx apps/run.reset.ts",
20
+ "reindex": "tsx apps/run.reindex.ts",
19
21
  "test": "npm run test.functional && npm run test.compilation",
20
22
  "dev.ci": "npm run test && npm run test.npx",
21
23
  "mcp": "tsx apps/run.mcp.ts",