yats-toolkit 0.1.21 → 0.1.22

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/setup.js +23 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yats-toolkit",
3
- "version": "0.1.21",
3
+ "version": "0.1.22",
4
4
  "description": "YATS — Yet Another Token Saver. One-command MCP server that indexes your codebase into a knowledge graph so AI agents (Claude, Cursor, Copilot) can search and navigate it without burning tokens.",
5
5
  "author": "Franco Vinciarelli <vinciarellifranco@gmail.com>",
6
6
  "license": "SEE LICENSE IN LICENSE",
package/src/setup.js CHANGED
@@ -408,6 +408,29 @@ async function main() {
408
408
  process.exit(0);
409
409
  }
410
410
 
411
+ // Check for existing stopped install (compose file exists but containers not running)
412
+ if (existsSync(COMPOSE_FILE)) {
413
+ console.log(` ${Y}⚠${R} Found existing YATS installation (containers not running).`);
414
+ console.log("");
415
+ const rlStopped = createInterface({ input: process.stdin, output: process.stdout });
416
+ const cleanAnswer = await ask(rlStopped, ` ${B}Start fresh (deletes all indexed data)? [y/N]${R} `);
417
+ rlStopped.close();
418
+ if (cleanAnswer.toLowerCase() === "y") {
419
+ console.log("");
420
+ const sClean = spinner("Cleaning up previous installation...");
421
+ try {
422
+ await runCmd("docker", ["compose", "-f", COMPOSE_FILE, "down", "-v"]);
423
+ sClean.done(true);
424
+ } catch {
425
+ sClean.done(false);
426
+ }
427
+ } else {
428
+ console.log("");
429
+ console.log(` ${G}✓${R} Keeping existing data. Proceeding with reconfiguration.`);
430
+ }
431
+ console.log("");
432
+ }
433
+
411
434
  // Step 1: Embedding provider
412
435
  step("Step 1 — Embedding provider");
413
436