coding-friend-cli 1.25.0 → 1.26.0

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 (26) hide show
  1. package/dist/{chunk-5UEY7HQX.js → chunk-2TFHVNBI.js} +1 -1
  2. package/dist/{chunk-TRIALFOQ.js → chunk-3HTLOI34.js} +1 -1
  3. package/dist/{chunk-LTHJTWJ6.js → chunk-K2PSF7SF.js} +3 -3
  4. package/dist/{chunk-SIQJPT47.js → chunk-KFNKH5Z7.js} +1 -1
  5. package/dist/{chunk-O4CNZB5H.js → chunk-N2Q224HO.js} +1 -1
  6. package/dist/{chunk-2ETE7NEL.js → chunk-OARRVZL4.js} +3 -3
  7. package/dist/{chunk-DO6FV6BL.js → chunk-TWKNGPBO.js} +4 -0
  8. package/dist/{chunk-WCSNAEOF.js → chunk-WAFKFCAB.js} +65 -51
  9. package/dist/{config-6Z4XX5HW.js → config-MSVSD3HA.js} +13 -13
  10. package/dist/{dev-S7S3SFKI.js → dev-KTEINOFU.js} +7 -7
  11. package/dist/{disable-V7OLXEUH.js → disable-7BVJGSIP.js} +3 -3
  12. package/dist/{enable-OLHRKZCV.js → enable-RO2FBKS6.js} +3 -3
  13. package/dist/{host-RR6FT7AX.js → host-USZC44PR.js} +2 -2
  14. package/dist/index.js +31 -31
  15. package/dist/{init-UOKYZJ53.js → init-KPUEY6NC.js} +46 -61
  16. package/dist/{install-BURZ5QEM.js → install-65JCZGCB.js} +15 -12
  17. package/dist/{mcp-CB4PUUES.js → mcp-V7PM4WTE.js} +5 -5
  18. package/dist/{memory-TJZNGTOA.js → memory-36YZTSSE.js} +9 -5
  19. package/dist/{permission-QIJLEMJ6.js → permission-36BMHDYX.js} +1 -1
  20. package/dist/{session-IECOM63R.js → session-CZ4ZJP7Q.js} +2 -2
  21. package/dist/{status-FRIGREUV.js → status-IJH4EZBG.js} +12 -12
  22. package/dist/{statusline-YL44XYGF.js → statusline-PUPTHPBR.js} +2 -2
  23. package/dist/{uninstall-OXWRPWYF.js → uninstall-5MINSH35.js} +35 -8
  24. package/dist/{update-6N7EASFT.js → update-IO27DSZW.js} +5 -5
  25. package/dist/{update-check-XSETLRVR.js → update-check-BPCQ25AR.js} +1 -1
  26. package/package.json +1 -1
@@ -8,7 +8,7 @@ import {
8
8
  claudeSettingsPath,
9
9
  installedPluginsPath,
10
10
  knownMarketplacesPath
11
- } from "./chunk-DO6FV6BL.js";
11
+ } from "./chunk-TWKNGPBO.js";
12
12
 
13
13
  // src/lib/plugin-state.ts
14
14
  var MARKETPLACE_NAME = "coding-friend-marketplace";
@@ -12,7 +12,7 @@ import {
12
12
  globalConfigPath,
13
13
  installedPluginsPath,
14
14
  pluginCachePath
15
- } from "./chunk-DO6FV6BL.js";
15
+ } from "./chunk-TWKNGPBO.js";
16
16
 
17
17
  // src/lib/statusline.ts
18
18
  import { existsSync, readdirSync } from "fs";
@@ -3,13 +3,13 @@ import {
3
3
  } from "./chunk-RZRT7NGT.js";
4
4
  import {
5
5
  resolveMemoryDir
6
- } from "./chunk-SIQJPT47.js";
6
+ } from "./chunk-KFNKH5Z7.js";
7
7
  import {
8
8
  BACK,
9
9
  askScope,
10
10
  formatScopeLabel,
11
11
  injectBackChoice
12
- } from "./chunk-O4CNZB5H.js";
12
+ } from "./chunk-N2Q224HO.js";
13
13
  import {
14
14
  mergeJson,
15
15
  readJson,
@@ -18,7 +18,7 @@ import {
18
18
  import {
19
19
  globalConfigPath,
20
20
  localConfigPath
21
- } from "./chunk-DO6FV6BL.js";
21
+ } from "./chunk-TWKNGPBO.js";
22
22
  import {
23
23
  log
24
24
  } from "./chunk-NREZK463.js";
@@ -8,7 +8,7 @@ import {
8
8
  globalConfigPath,
9
9
  localConfigPath,
10
10
  resolvePath
11
- } from "./chunk-DO6FV6BL.js";
11
+ } from "./chunk-TWKNGPBO.js";
12
12
 
13
13
  // src/lib/config.ts
14
14
  function deepMerge(base, override) {
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  globalConfigPath,
9
9
  localConfigPath
10
- } from "./chunk-DO6FV6BL.js";
10
+ } from "./chunk-TWKNGPBO.js";
11
11
  import {
12
12
  log
13
13
  } from "./chunk-NREZK463.js";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  ensureStatusline,
3
3
  getInstalledVersion
4
- } from "./chunk-TRIALFOQ.js";
4
+ } from "./chunk-3HTLOI34.js";
5
5
  import {
6
6
  ensureShellCompletion
7
7
  } from "./chunk-DMJCO6LJ.js";
8
8
  import {
9
9
  resolveScope
10
- } from "./chunk-O4CNZB5H.js";
10
+ } from "./chunk-N2Q224HO.js";
11
11
  import {
12
12
  commandExists,
13
13
  run,
@@ -19,7 +19,7 @@ import {
19
19
  } from "./chunk-5UVDWG5L.js";
20
20
  import {
21
21
  claudeSettingsPath
22
- } from "./chunk-DO6FV6BL.js";
22
+ } from "./chunk-TWKNGPBO.js";
23
23
  import {
24
24
  log,
25
25
  printBanner
@@ -61,6 +61,9 @@ function marketplaceClonePath() {
61
61
  function globalConfigDir() {
62
62
  return join(homedir(), ".coding-friend");
63
63
  }
64
+ function memoryDepsDir() {
65
+ return join(homedir(), ".coding-friend", "memory");
66
+ }
64
67
  function encodeProjectPath(absolutePath) {
65
68
  return absolutePath.replace(/[\\/:]/g, "-");
66
69
  }
@@ -85,6 +88,7 @@ export {
85
88
  marketplaceCachePath,
86
89
  marketplaceClonePath,
87
90
  globalConfigDir,
91
+ memoryDepsDir,
88
92
  encodeProjectPath,
89
93
  claudeSessionDir
90
94
  };
@@ -7,17 +7,17 @@ import {
7
7
  getMemoryMcpStatus,
8
8
  memoryConfigMenu,
9
9
  writeMemoryMcpEntry
10
- } from "./chunk-LTHJTWJ6.js";
10
+ } from "./chunk-K2PSF7SF.js";
11
11
  import {
12
12
  getLibPath
13
13
  } from "./chunk-RZRT7NGT.js";
14
14
  import {
15
15
  loadConfig,
16
16
  resolveMemoryDir
17
- } from "./chunk-SIQJPT47.js";
17
+ } from "./chunk-KFNKH5Z7.js";
18
18
  import {
19
19
  showConfigHint
20
- } from "./chunk-O4CNZB5H.js";
20
+ } from "./chunk-N2Q224HO.js";
21
21
  import {
22
22
  run,
23
23
  runWithStderr
@@ -28,7 +28,7 @@ import {
28
28
  import {
29
29
  globalConfigPath,
30
30
  localConfigPath
31
- } from "./chunk-DO6FV6BL.js";
31
+ } from "./chunk-TWKNGPBO.js";
32
32
  import {
33
33
  log,
34
34
  printBanner
@@ -456,54 +456,16 @@ async function ensureSqliteDepsIfNeeded(mcpDir) {
456
456
  log.success("Dependencies installed.");
457
457
  return true;
458
458
  }
459
- async function setupMemoryMcp(memoryDir, mcpDir) {
460
- const mcpStatus = getMemoryMcpStatus();
461
- if (mcpStatus.configured && mcpStatus.scope === "local") {
462
- log.info(`MCP: ${chalk.green("already configured")} in .mcp.json`);
463
- return;
464
- }
465
- console.log();
466
- log.step("MCP setup");
467
- log.dim(
468
- "The Memory MCP connects Claude Code to the memory system so skills can store and search memories."
469
- );
470
- const addMcp = await confirm({
471
- message: "Add coding-friend-memory to .mcp.json?",
472
- default: true
473
- });
474
- if (!addMcp) {
475
- log.dim('Skipped. Run "cf memory mcp" anytime to get the config.');
476
- return;
477
- }
478
- const serverPath = join(mcpDir, "dist", "index.js");
479
- if (!existsSync(serverPath)) {
480
- log.warn(
481
- "cf-memory not built yet. Run `cf memory mcp` after building to get the config."
482
- );
483
- return;
484
- }
485
- writeMemoryMcpEntry(serverPath, memoryDir);
486
- }
487
- async function memoryInitCommand() {
459
+ function isMemoryInitialized() {
460
+ const globalCfg = readJson(globalConfigPath());
461
+ const localCfg = readJson(localConfigPath());
462
+ const globalTier = globalCfg?.memory?.tier;
463
+ const localTier = localCfg?.memory?.tier;
464
+ if (globalTier !== void 0 || localTier !== void 0) return true;
488
465
  const memoryDir = getMemoryDir();
489
- const mcpDir = getLibPath("cf-memory");
490
- ensureMemoryBuilt(mcpDir);
491
- const dbExists = getDbPath(memoryDir) !== null;
492
- if (dbExists) {
493
- console.log();
494
- log.info(
495
- "Memory already initialized. Opening config menu to adjust settings."
496
- );
497
- log.dim('To re-import memories, run "cf memory rebuild".');
498
- console.log();
499
- await memoryConfigMenu({ exitLabel: "Done" });
500
- await ensureSqliteDepsIfNeeded(mcpDir);
501
- return;
502
- }
503
- console.log();
504
- printBanner("\u{1F9E0} Memory Setup");
505
- console.log();
506
- showConfigHint();
466
+ return getDbPath(memoryDir) !== null;
467
+ }
468
+ async function memoryInitWizard(memoryDir, mcpDir) {
507
469
  log.step("Step 1/5: Search tier");
508
470
  await editMemoryTier(
509
471
  readJson(globalConfigPath()),
@@ -591,6 +553,56 @@ async function memoryInitCommand() {
591
553
  `Tip: Run ${chalk.cyan("/cf-scan")} in Claude Code to populate memory with project knowledge.`
592
554
  );
593
555
  }
556
+ async function setupMemoryMcp(memoryDir, mcpDir) {
557
+ const mcpStatus = getMemoryMcpStatus();
558
+ if (mcpStatus.configured && mcpStatus.scope === "local") {
559
+ log.info(`MCP: ${chalk.green("already configured")} in .mcp.json`);
560
+ return;
561
+ }
562
+ console.log();
563
+ log.step("MCP setup");
564
+ log.dim(
565
+ "The Memory MCP connects Claude Code to the memory system so skills can store and search memories."
566
+ );
567
+ const addMcp = await confirm({
568
+ message: "Add coding-friend-memory to .mcp.json?",
569
+ default: true
570
+ });
571
+ if (!addMcp) {
572
+ log.dim('Skipped. Run "cf memory mcp" anytime to get the config.');
573
+ return;
574
+ }
575
+ const serverPath = join(mcpDir, "dist", "index.js");
576
+ if (!existsSync(serverPath)) {
577
+ log.warn(
578
+ "cf-memory not built yet. Run `cf memory mcp` after building to get the config."
579
+ );
580
+ return;
581
+ }
582
+ writeMemoryMcpEntry(serverPath, memoryDir);
583
+ }
584
+ async function memoryInitCommand() {
585
+ const memoryDir = getMemoryDir();
586
+ const mcpDir = getLibPath("cf-memory");
587
+ ensureMemoryBuilt(mcpDir);
588
+ const dbExists = getDbPath(memoryDir) !== null;
589
+ if (dbExists) {
590
+ console.log();
591
+ log.info(
592
+ "Memory already initialized. Opening config menu to adjust settings."
593
+ );
594
+ log.dim('To re-import memories, run "cf memory rebuild".');
595
+ console.log();
596
+ await memoryConfigMenu({ exitLabel: "Done" });
597
+ await ensureSqliteDepsIfNeeded(mcpDir);
598
+ return;
599
+ }
600
+ console.log();
601
+ printBanner("\u{1F9E0} Memory Setup");
602
+ console.log();
603
+ showConfigHint();
604
+ await memoryInitWizard(memoryDir, mcpDir);
605
+ }
594
606
  async function memoryConfigCommand() {
595
607
  console.log();
596
608
  printBanner("\u{1F9E0} Memory Config");
@@ -864,6 +876,8 @@ export {
864
876
  memoryStartDaemonCommand,
865
877
  memoryStopDaemonCommand,
866
878
  memoryRebuildCommand,
879
+ isMemoryInitialized,
880
+ memoryInitWizard,
867
881
  memoryInitCommand,
868
882
  memoryConfigCommand,
869
883
  memoryRmCommand,
@@ -1,28 +1,28 @@
1
- import {
2
- memoryConfigMenu
3
- } from "./chunk-LTHJTWJ6.js";
4
1
  import {
5
2
  getAllRules,
6
3
  getExistingRules
7
4
  } from "./chunk-HEBLANJO.js";
8
- import "./chunk-RZRT7NGT.js";
9
- import "./chunk-SIQJPT47.js";
10
5
  import {
11
6
  findStatuslineHookPath,
12
7
  isStatuslineConfigured,
13
8
  saveStatuslineConfig,
14
9
  selectStatuslineComponents,
15
10
  writeStatuslineSettings
16
- } from "./chunk-TRIALFOQ.js";
17
- import {
18
- ALL_COMPONENT_IDS,
19
- DEFAULT_CONFIG
20
- } from "./chunk-PRIH34UB.js";
11
+ } from "./chunk-3HTLOI34.js";
21
12
  import {
22
13
  ensureShellCompletion,
23
14
  hasShellCompletion,
24
15
  removeShellCompletion
25
16
  } from "./chunk-DMJCO6LJ.js";
17
+ import {
18
+ memoryConfigMenu
19
+ } from "./chunk-K2PSF7SF.js";
20
+ import "./chunk-RZRT7NGT.js";
21
+ import "./chunk-KFNKH5Z7.js";
22
+ import {
23
+ ALL_COMPONENT_IDS,
24
+ DEFAULT_CONFIG
25
+ } from "./chunk-PRIH34UB.js";
26
26
  import {
27
27
  BACK,
28
28
  applyDocsDirChange,
@@ -32,7 +32,7 @@ import {
32
32
  getScopeLabel,
33
33
  injectBackChoice,
34
34
  showConfigHint
35
- } from "./chunk-O4CNZB5H.js";
35
+ } from "./chunk-N2Q224HO.js";
36
36
  import {
37
37
  run
38
38
  } from "./chunk-EVGXUDX4.js";
@@ -46,7 +46,7 @@ import {
46
46
  globalConfigPath,
47
47
  localConfigPath,
48
48
  resolvePath
49
- } from "./chunk-DO6FV6BL.js";
49
+ } from "./chunk-TWKNGPBO.js";
50
50
  import {
51
51
  log,
52
52
  printBanner
@@ -557,7 +557,7 @@ async function editPermissions() {
557
557
  )
558
558
  });
559
559
  if (choice === BACK) return;
560
- const { permissionCommand } = await import("./permission-QIJLEMJ6.js");
560
+ const { permissionCommand } = await import("./permission-36BMHDYX.js");
561
561
  switch (choice) {
562
562
  case "interactive":
563
563
  await permissionCommand({});
@@ -1,14 +1,14 @@
1
- import {
2
- isMarketplaceRegistered,
3
- isPluginInstalled
4
- } from "./chunk-5UEY7HQX.js";
5
1
  import {
6
2
  ensureStatusline
7
- } from "./chunk-TRIALFOQ.js";
8
- import "./chunk-PRIH34UB.js";
3
+ } from "./chunk-3HTLOI34.js";
9
4
  import {
10
5
  ensureShellCompletion
11
6
  } from "./chunk-DMJCO6LJ.js";
7
+ import {
8
+ isMarketplaceRegistered,
9
+ isPluginInstalled
10
+ } from "./chunk-2TFHVNBI.js";
11
+ import "./chunk-PRIH34UB.js";
12
12
  import {
13
13
  commandExists,
14
14
  run
@@ -21,7 +21,7 @@ import {
21
21
  devStatePath,
22
22
  knownMarketplacesPath,
23
23
  pluginCachePath
24
- } from "./chunk-DO6FV6BL.js";
24
+ } from "./chunk-TWKNGPBO.js";
25
25
  import {
26
26
  log,
27
27
  printBanner
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  isPluginDisabled,
3
3
  setPluginEnabled
4
- } from "./chunk-5UEY7HQX.js";
4
+ } from "./chunk-2TFHVNBI.js";
5
5
  import {
6
6
  resolveScope
7
- } from "./chunk-O4CNZB5H.js";
7
+ } from "./chunk-N2Q224HO.js";
8
8
  import "./chunk-EVGXUDX4.js";
9
9
  import "./chunk-5UVDWG5L.js";
10
- import "./chunk-DO6FV6BL.js";
10
+ import "./chunk-TWKNGPBO.js";
11
11
  import {
12
12
  log
13
13
  } from "./chunk-NREZK463.js";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  isPluginDisabled,
3
3
  setPluginEnabled
4
- } from "./chunk-5UEY7HQX.js";
4
+ } from "./chunk-2TFHVNBI.js";
5
5
  import {
6
6
  resolveScope
7
- } from "./chunk-O4CNZB5H.js";
7
+ } from "./chunk-N2Q224HO.js";
8
8
  import "./chunk-EVGXUDX4.js";
9
9
  import "./chunk-5UVDWG5L.js";
10
- import "./chunk-DO6FV6BL.js";
10
+ import "./chunk-TWKNGPBO.js";
11
11
  import {
12
12
  log
13
13
  } from "./chunk-NREZK463.js";
@@ -3,14 +3,14 @@ import {
3
3
  } from "./chunk-RZRT7NGT.js";
4
4
  import {
5
5
  resolveDocsDir
6
- } from "./chunk-SIQJPT47.js";
6
+ } from "./chunk-KFNKH5Z7.js";
7
7
  import "./chunk-PRIH34UB.js";
8
8
  import {
9
9
  run,
10
10
  streamExec
11
11
  } from "./chunk-EVGXUDX4.js";
12
12
  import "./chunk-5UVDWG5L.js";
13
- import "./chunk-DO6FV6BL.js";
13
+ import "./chunk-TWKNGPBO.js";
14
14
  import {
15
15
  log,
16
16
  printBanner
package/dist/index.js CHANGED
@@ -14,54 +14,54 @@ program.name("cf").description(
14
14
  "coding-friend CLI \u2014 host learning docs, setup MCP, init projects"
15
15
  ).version(pkg.version, "-v, --version");
16
16
  program.command("install").description("Install the Coding Friend plugin into Claude Code").option("--user", "Install at user scope (all projects)").option("--global", "Install at user scope (all projects)").option("--project", "Install at project scope (shared via git)").option("--local", "Install at local scope (this machine only)").action(async (opts) => {
17
- const { installCommand } = await import("./install-BURZ5QEM.js");
17
+ const { installCommand } = await import("./install-65JCZGCB.js");
18
18
  await installCommand(opts);
19
19
  });
20
20
  program.command("uninstall").description("Uninstall the Coding Friend plugin from Claude Code").option("--user", "Uninstall from user scope (all projects)").option("--global", "Uninstall from user scope (all projects)").option("--project", "Uninstall from project scope").option("--local", "Uninstall from local scope").action(async (opts) => {
21
- const { uninstallCommand } = await import("./uninstall-OXWRPWYF.js");
21
+ const { uninstallCommand } = await import("./uninstall-5MINSH35.js");
22
22
  await uninstallCommand(opts);
23
23
  });
24
24
  program.command("disable").description("Disable the Coding Friend plugin without uninstalling").option("--user", "Disable at user scope (all projects)").option("--global", "Disable at user scope (all projects)").option("--project", "Disable at project scope").option("--local", "Disable at local scope").action(async (opts) => {
25
- const { disableCommand } = await import("./disable-V7OLXEUH.js");
25
+ const { disableCommand } = await import("./disable-7BVJGSIP.js");
26
26
  await disableCommand(opts);
27
27
  });
28
28
  program.command("enable").description("Re-enable the Coding Friend plugin").option("--user", "Enable at user scope (all projects)").option("--global", "Enable at user scope (all projects)").option("--project", "Enable at project scope").option("--local", "Enable at local scope").action(async (opts) => {
29
- const { enableCommand } = await import("./enable-OLHRKZCV.js");
29
+ const { enableCommand } = await import("./enable-RO2FBKS6.js");
30
30
  await enableCommand(opts);
31
31
  });
32
32
  program.command("init").description("Initialize coding-friend in current project").action(async () => {
33
- const { initCommand } = await import("./init-UOKYZJ53.js");
33
+ const { initCommand } = await import("./init-KPUEY6NC.js");
34
34
  await initCommand();
35
35
  });
36
36
  program.command("config").description("Manage Coding Friend configuration").action(async () => {
37
- const { configCommand } = await import("./config-6Z4XX5HW.js");
37
+ const { configCommand } = await import("./config-MSVSD3HA.js");
38
38
  await configCommand();
39
39
  });
40
40
  program.command("host").description("Build and serve learning docs as a static website").argument("[path]", "path to docs folder").option("-p, --port <port>", "port number", "3333").action(async (path, opts) => {
41
- const { hostCommand } = await import("./host-RR6FT7AX.js");
41
+ const { hostCommand } = await import("./host-USZC44PR.js");
42
42
  await hostCommand(path, opts);
43
43
  });
44
44
  program.command("mcp").description("Setup MCP server for learning docs").argument("[path]", "path to docs folder").action(async (path) => {
45
- const { mcpCommand } = await import("./mcp-CB4PUUES.js");
45
+ const { mcpCommand } = await import("./mcp-V7PM4WTE.js");
46
46
  await mcpCommand(path);
47
47
  });
48
48
  program.command("permission").description("Manage Claude Code permission rules for Coding Friend").option("--all", "Apply all recommended permissions without prompts").option("--user", "Save to user-level settings (~/.claude/settings.json)").option(
49
49
  "--project",
50
50
  "Save to project-level settings (.claude/settings.local.json)"
51
51
  ).action(async (opts) => {
52
- const { permissionCommand } = await import("./permission-QIJLEMJ6.js");
52
+ const { permissionCommand } = await import("./permission-36BMHDYX.js");
53
53
  await permissionCommand(opts);
54
54
  });
55
55
  program.command("statusline").description("Setup coding-friend statusline in Claude Code").action(async () => {
56
- const { statuslineCommand } = await import("./statusline-YL44XYGF.js");
56
+ const { statuslineCommand } = await import("./statusline-PUPTHPBR.js");
57
57
  await statuslineCommand();
58
58
  });
59
59
  program.command("update").description("Update coding-friend plugin, CLI, and statusline").option("--cli", "Update only the CLI (npm package)").option("--plugin", "Update only the Claude Code plugin").option("--statusline", "Update only the statusline").option("--user", "Update plugin at user scope (all projects)").option("--global", "Update plugin at user scope (all projects)").option("--project", "Update plugin at project scope").option("--local", "Update plugin at local scope").action(async (opts) => {
60
- const { updateCommand } = await import("./update-6N7EASFT.js");
60
+ const { updateCommand } = await import("./update-IO27DSZW.js");
61
61
  await updateCommand(opts);
62
62
  });
63
63
  program.command("status").description("Show comprehensive Coding Friend status").action(async () => {
64
- const { statusCommand } = await import("./status-FRIGREUV.js");
64
+ const { statusCommand } = await import("./status-IJH4EZBG.js");
65
65
  await statusCommand();
66
66
  });
67
67
  var session = program.command("session").description("Save and load Claude Code sessions across machines");
@@ -76,11 +76,11 @@ session.command("save").description("Save current Claude Code session to sync fo
76
76
  "-s, --session-id <id>",
77
77
  "session UUID to save (default: auto-detect newest)"
78
78
  ).option("-l, --label <label>", "label for this session").action(async (opts) => {
79
- const { sessionSaveCommand } = await import("./session-IECOM63R.js");
79
+ const { sessionSaveCommand } = await import("./session-CZ4ZJP7Q.js");
80
80
  await sessionSaveCommand(opts);
81
81
  });
82
82
  session.command("load").description("Load a saved session from sync folder").action(async () => {
83
- const { sessionLoadCommand } = await import("./session-IECOM63R.js");
83
+ const { sessionLoadCommand } = await import("./session-CZ4ZJP7Q.js");
84
84
  await sessionLoadCommand();
85
85
  });
86
86
  var memory = program.command("memory").description("AI memory system \u2014 store and search project knowledge");
@@ -100,43 +100,43 @@ Memory subcommands:
100
100
  memory mcp Show MCP server setup instructions`
101
101
  );
102
102
  memory.command("status").description("Show memory system status").action(async () => {
103
- const { memoryStatusCommand } = await import("./memory-TJZNGTOA.js");
103
+ const { memoryStatusCommand } = await import("./memory-36YZTSSE.js");
104
104
  await memoryStatusCommand();
105
105
  });
106
106
  memory.command("search").description("Search memories by query").argument("<query>", "search query").action(async (query) => {
107
- const { memorySearchCommand } = await import("./memory-TJZNGTOA.js");
107
+ const { memorySearchCommand } = await import("./memory-36YZTSSE.js");
108
108
  await memorySearchCommand(query);
109
109
  });
110
110
  memory.command("list").description(
111
111
  "List memories in current project, or all projects with --projects"
112
112
  ).option("--projects", "List all project databases with size and metadata").action(async (opts) => {
113
- const { memoryListCommand } = await import("./memory-TJZNGTOA.js");
113
+ const { memoryListCommand } = await import("./memory-36YZTSSE.js");
114
114
  await memoryListCommand(opts);
115
115
  });
116
116
  memory.command("init").description(
117
117
  "Initialize memory system \u2014 interactive wizard (first time) or config menu"
118
118
  ).action(async () => {
119
- const { memoryInitCommand } = await import("./memory-TJZNGTOA.js");
119
+ const { memoryInitCommand } = await import("./memory-36YZTSSE.js");
120
120
  await memoryInitCommand();
121
121
  });
122
122
  memory.command("config").description("Configure memory system settings").action(async () => {
123
- const { memoryConfigCommand } = await import("./memory-TJZNGTOA.js");
123
+ const { memoryConfigCommand } = await import("./memory-36YZTSSE.js");
124
124
  await memoryConfigCommand();
125
125
  });
126
126
  memory.command("start-daemon").description("Start the memory daemon (Tier 2 \u2014 MiniSearch)").action(async () => {
127
- const { memoryStartDaemonCommand } = await import("./memory-TJZNGTOA.js");
127
+ const { memoryStartDaemonCommand } = await import("./memory-36YZTSSE.js");
128
128
  await memoryStartDaemonCommand();
129
129
  });
130
130
  memory.command("stop-daemon").description("Stop the memory daemon").action(async () => {
131
- const { memoryStopDaemonCommand } = await import("./memory-TJZNGTOA.js");
131
+ const { memoryStopDaemonCommand } = await import("./memory-36YZTSSE.js");
132
132
  await memoryStopDaemonCommand();
133
133
  });
134
134
  memory.command("rebuild").description("Rebuild the daemon search index").action(async () => {
135
- const { memoryRebuildCommand } = await import("./memory-TJZNGTOA.js");
135
+ const { memoryRebuildCommand } = await import("./memory-36YZTSSE.js");
136
136
  await memoryRebuildCommand();
137
137
  });
138
138
  memory.command("mcp").description("Show MCP server setup instructions").action(async () => {
139
- const { memoryMcpCommand } = await import("./memory-TJZNGTOA.js");
139
+ const { memoryMcpCommand } = await import("./memory-36YZTSSE.js");
140
140
  await memoryMcpCommand();
141
141
  });
142
142
  memory.command("rm").description("Remove a project database").option("--project-id <id>", "Project ID to remove").option("--all", "Remove all project databases").option(
@@ -144,7 +144,7 @@ memory.command("rm").description("Remove a project database").option("--project-
144
144
  "Remove orphaned projects (source dir missing or 0 memories)"
145
145
  ).action(
146
146
  async (opts) => {
147
- const { memoryRmCommand } = await import("./memory-TJZNGTOA.js");
147
+ const { memoryRmCommand } = await import("./memory-36YZTSSE.js");
148
148
  await memoryRmCommand(opts);
149
149
  }
150
150
  );
@@ -161,41 +161,41 @@ Dev subcommands:
161
161
  dev update [path] Update local dev plugin to latest version`
162
162
  );
163
163
  dev.command("on").description("Switch to local plugin source").argument("[path]", "path to local coding-friend repo (default: cwd)").action(async (path) => {
164
- const { devOnCommand } = await import("./dev-S7S3SFKI.js");
164
+ const { devOnCommand } = await import("./dev-KTEINOFU.js");
165
165
  await devOnCommand(path);
166
166
  });
167
167
  dev.command("off").description("Switch back to remote marketplace").action(async () => {
168
- const { devOffCommand } = await import("./dev-S7S3SFKI.js");
168
+ const { devOffCommand } = await import("./dev-KTEINOFU.js");
169
169
  await devOffCommand();
170
170
  });
171
171
  dev.command("status").description("Show current dev mode").action(async () => {
172
- const { devStatusCommand } = await import("./dev-S7S3SFKI.js");
172
+ const { devStatusCommand } = await import("./dev-KTEINOFU.js");
173
173
  await devStatusCommand();
174
174
  });
175
175
  dev.command("sync").description(
176
176
  "Copy local source files to plugin cache (no version bump needed)"
177
177
  ).action(async () => {
178
- const { devSyncCommand } = await import("./dev-S7S3SFKI.js");
178
+ const { devSyncCommand } = await import("./dev-KTEINOFU.js");
179
179
  await devSyncCommand();
180
180
  });
181
181
  dev.command("restart").description("Reinstall local dev plugin (off + on)").argument(
182
182
  "[path]",
183
183
  "path to local coding-friend repo (default: saved path or cwd)"
184
184
  ).action(async (path) => {
185
- const { devRestartCommand } = await import("./dev-S7S3SFKI.js");
185
+ const { devRestartCommand } = await import("./dev-KTEINOFU.js");
186
186
  await devRestartCommand(path);
187
187
  });
188
188
  dev.command("update").description("Update local dev plugin to latest version (off + on)").argument(
189
189
  "[path]",
190
190
  "path to local coding-friend repo (default: saved path or cwd)"
191
191
  ).action(async (path) => {
192
- const { devUpdateCommand } = await import("./dev-S7S3SFKI.js");
192
+ const { devUpdateCommand } = await import("./dev-KTEINOFU.js");
193
193
  await devUpdateCommand(path);
194
194
  });
195
195
  program.hook("postAction", async () => {
196
196
  const topCmd = process.argv[2];
197
197
  if (topCmd === "update") return;
198
- const { checkAndNotifyCliUpdate } = await import("./update-check-XSETLRVR.js");
198
+ const { checkAndNotifyCliUpdate } = await import("./update-check-BPCQ25AR.js");
199
199
  checkAndNotifyCliUpdate(pkg.version);
200
200
  });
201
201
  await program.parseAsync();
@@ -1,7 +1,3 @@
1
- import {
2
- getMemoryMcpStatus,
3
- writeMemoryMcpEntry
4
- } from "./chunk-LTHJTWJ6.js";
5
1
  import {
6
2
  applyPermissions,
7
3
  buildLearnDirRules,
@@ -11,24 +7,32 @@ import {
11
7
  getMissingRules,
12
8
  logPluginScriptWarning
13
9
  } from "./chunk-HEBLANJO.js";
14
- import {
15
- getLibPath
16
- } from "./chunk-RZRT7NGT.js";
17
- import "./chunk-SIQJPT47.js";
18
10
  import {
19
11
  findStatuslineHookPath,
20
12
  isStatuslineConfigured,
21
13
  saveStatuslineConfig,
22
14
  selectStatuslineComponents,
23
15
  writeStatuslineSettings
24
- } from "./chunk-TRIALFOQ.js";
25
- import {
26
- DEFAULT_CONFIG
27
- } from "./chunk-PRIH34UB.js";
16
+ } from "./chunk-3HTLOI34.js";
28
17
  import {
29
18
  ensureShellCompletion,
30
19
  hasShellCompletion
31
20
  } from "./chunk-DMJCO6LJ.js";
21
+ import {
22
+ ensureMemoryBuilt,
23
+ isMemoryInitialized,
24
+ memoryInitWizard
25
+ } from "./chunk-WAFKFCAB.js";
26
+ import {
27
+ memoryConfigMenu
28
+ } from "./chunk-K2PSF7SF.js";
29
+ import {
30
+ getLibPath
31
+ } from "./chunk-RZRT7NGT.js";
32
+ import "./chunk-KFNKH5Z7.js";
33
+ import {
34
+ DEFAULT_CONFIG
35
+ } from "./chunk-PRIH34UB.js";
32
36
  import {
33
37
  BACK,
34
38
  applyDocsDirChange,
@@ -39,7 +43,7 @@ import {
39
43
  getScopeLabel,
40
44
  injectBackChoice,
41
45
  showConfigHint
42
- } from "./chunk-O4CNZB5H.js";
46
+ } from "./chunk-N2Q224HO.js";
43
47
  import {
44
48
  commandExists,
45
49
  run
@@ -55,7 +59,7 @@ import {
55
59
  globalConfigPath,
56
60
  localConfigPath,
57
61
  resolvePath
58
- } from "./chunk-DO6FV6BL.js";
62
+ } from "./chunk-TWKNGPBO.js";
59
63
  import {
60
64
  log,
61
65
  printBanner
@@ -163,8 +167,8 @@ function printSetupStatus(globalCfg, localCfg, gitAvailable) {
163
167
  { label: "Shell completion", done: hasShellCompletion(), skipped: false },
164
168
  { label: "Statusline", done: isStatuslineConfigured(), skipped: false },
165
169
  {
166
- label: "CF Memory MCP",
167
- done: getMemoryMcpStatus().configured,
170
+ label: "CF Memory",
171
+ done: isMemoryInitialized(),
168
172
  skipped: false
169
173
  },
170
174
  {
@@ -586,27 +590,33 @@ async function stepStatusline() {
586
590
  writeStatuslineSettings(hookResult.hookPath);
587
591
  log.success("Statusline configured!");
588
592
  }
589
- async function stepMemory(docsDir) {
590
- const mcpStatus = getMemoryMcpStatus();
591
- if (mcpStatus.configured) {
593
+ async function stepMemory(docsDir, opts) {
594
+ const initialized = isMemoryInitialized();
595
+ if (initialized) {
592
596
  printStepHeader(
593
- `CF Memory MCP ${chalk.green("[done]")}`,
594
- "Connects the memory system to Claude Code via MCP."
597
+ `CF Memory ${chalk.green("[done]")}`,
598
+ "Persistent project knowledge across sessions \u2014 search tier, embeddings, MCP."
595
599
  );
596
- log.dim("Memory MCP already configured in .mcp.json.");
600
+ if (opts?.menuMode) {
601
+ await memoryConfigMenu({ exitLabel: "Back" });
602
+ } else {
603
+ log.dim(
604
+ 'Memory already initialized. Run "cf memory config" to adjust settings.'
605
+ );
606
+ }
597
607
  return;
598
608
  }
599
609
  printStepHeader(
600
- "CF Memory MCP",
601
- "Connects the memory system to Claude Code via MCP so skills can store and search memories."
610
+ "CF Memory",
611
+ "Persistent project knowledge across sessions \u2014 search tier, embeddings, MCP."
602
612
  );
603
613
  const choice = await select({
604
- message: "Configure CF Memory MCP server?",
614
+ message: "Set up CF Memory?",
605
615
  choices: injectBackChoice(
606
616
  [
607
- { name: "Yes, add to .mcp.json", value: "yes" },
617
+ { name: "Yes, run memory setup wizard", value: "yes" },
608
618
  {
609
- name: "No, I'll configure it later (cf memory mcp)",
619
+ name: "No, I'll set it up later (cf memory init)",
610
620
  value: "no"
611
621
  }
612
622
  ],
@@ -615,46 +625,21 @@ async function stepMemory(docsDir) {
615
625
  });
616
626
  handleBack(choice);
617
627
  if (choice === "no") {
618
- log.dim("Skipped. Run `cf memory mcp` anytime to get the config.");
628
+ log.dim('Skipped. Run "cf memory init" anytime to set up.');
619
629
  return;
620
630
  }
621
- let serverPath;
631
+ let mcpDir;
622
632
  try {
623
- const mcpDir = getLibPath("cf-memory");
624
- serverPath = join(mcpDir, "dist", "index.js");
625
- if (!existsSync(serverPath)) {
626
- log.warn(
627
- "cf-memory not built yet. Run `cd cli/lib/cf-memory && npm install && npm run build` first."
628
- );
629
- return;
630
- }
633
+ mcpDir = getLibPath("cf-memory");
631
634
  } catch {
632
635
  log.warn(
633
636
  "cf-memory package not found. Install the CLI first: npm i -g coding-friend-cli"
634
637
  );
635
638
  return;
636
639
  }
640
+ ensureMemoryBuilt(mcpDir);
637
641
  const memoryDir = join(process.cwd(), docsDir, "memory");
638
- writeMemoryMcpEntry(serverPath, memoryDir);
639
- const autoCapture = await confirm({
640
- message: "Enable auto-capture? (saves session summaries to memory before context compaction)",
641
- default: false
642
- });
643
- if (autoCapture) {
644
- const scope = await askScope();
645
- if (scope !== "back") {
646
- const targetPath = scope === "global" ? globalConfigPath() : localConfigPath();
647
- const existingConfig = readJson(targetPath);
648
- const existingMemory = existingConfig?.memory ?? {};
649
- mergeJson(targetPath, {
650
- memory: { ...existingMemory, autoCapture: true }
651
- });
652
- log.success(`Saved to ${targetPath}`);
653
- }
654
- }
655
- log.info(
656
- `Tip: Run ${chalk.cyan("/cf-scan")} in Claude Code to populate memory with project knowledge.`
657
- );
642
+ await memoryInitWizard(memoryDir, mcpDir);
658
643
  }
659
644
  async function stepClaudePermissions(externalLearnDir, autoCommit) {
660
645
  const scope = await select({
@@ -734,7 +719,7 @@ async function initMenu(gitAvailable) {
734
719
  const gitignoreStatus = !gitAvailable ? chalk.dim("skipped") : hasGitignoreBlock() ? chalk.green("configured") : chalk.yellow("not configured");
735
720
  const completionStatus = hasShellCompletion() ? chalk.green("installed") : chalk.yellow("not installed");
736
721
  const statuslineStatus = isStatuslineConfigured() ? chalk.green("configured") : chalk.yellow("not configured");
737
- const memoryStatus = getMemoryMcpStatus().configured ? chalk.green("configured") : chalk.yellow("not configured");
722
+ const memoryStatus = isMemoryInitialized() ? chalk.green("initialized") : chalk.yellow("not configured");
738
723
  const autoApproveScope = getScopeLabel("autoApprove", globalCfg, localCfg);
739
724
  const autoApproveVal = getMergedValue(
740
725
  "autoApprove",
@@ -783,9 +768,9 @@ async function initMenu(gitAvailable) {
783
768
  description: " Token count, model, and session info in your terminal prompt"
784
769
  },
785
770
  {
786
- name: `CF Memory MCP (${memoryStatus})`,
771
+ name: `CF Memory (${memoryStatus})`,
787
772
  value: "memory",
788
- description: " Connect the memory system to Claude Code via MCP"
773
+ description: " Persistent project knowledge \u2014 search tier, embeddings, MCP"
789
774
  },
790
775
  {
791
776
  name: `Auto-approve ${formatScopeLabel(autoApproveScope)}${autoApproveVal !== void 0 ? ` (${autoApproveVal})` : ""}`,
@@ -827,7 +812,7 @@ async function initMenu(gitAvailable) {
827
812
  await stepStatusline();
828
813
  break;
829
814
  case "memory":
830
- await stepMemory(docsDir);
815
+ await stepMemory(docsDir, { menuMode: true });
831
816
  break;
832
817
  case "autoApprove": {
833
818
  const autoApproveChoice = await confirm({
@@ -1,22 +1,22 @@
1
1
  import {
2
2
  getLatestVersion,
3
3
  semverCompare
4
- } from "./chunk-2ETE7NEL.js";
5
- import {
6
- enableMarketplaceAutoUpdate,
7
- isMarketplaceRegistered,
8
- isPluginDisabled
9
- } from "./chunk-5UEY7HQX.js";
4
+ } from "./chunk-OARRVZL4.js";
10
5
  import {
11
6
  getInstalledVersion
12
- } from "./chunk-TRIALFOQ.js";
13
- import "./chunk-PRIH34UB.js";
7
+ } from "./chunk-3HTLOI34.js";
14
8
  import {
15
9
  ensureShellCompletion
16
10
  } from "./chunk-DMJCO6LJ.js";
11
+ import {
12
+ enableMarketplaceAutoUpdate,
13
+ isMarketplaceRegistered,
14
+ isPluginDisabled
15
+ } from "./chunk-2TFHVNBI.js";
16
+ import "./chunk-PRIH34UB.js";
17
17
  import {
18
18
  resolveScope
19
- } from "./chunk-O4CNZB5H.js";
19
+ } from "./chunk-N2Q224HO.js";
20
20
  import {
21
21
  commandExists,
22
22
  run
@@ -24,7 +24,7 @@ import {
24
24
  import "./chunk-5UVDWG5L.js";
25
25
  import {
26
26
  devStatePath
27
- } from "./chunk-DO6FV6BL.js";
27
+ } from "./chunk-TWKNGPBO.js";
28
28
  import {
29
29
  log,
30
30
  printBanner
@@ -119,10 +119,13 @@ async function installCommand(opts = {}) {
119
119
  console.log();
120
120
  log.info("Next steps:");
121
121
  console.log(
122
- ` ${chalk.cyan("cf init")} Initialize workspace (docs folders, config)`
122
+ ` ${chalk.cyan("cf init")} Initialize workspace (docs folders, config)`
123
+ );
124
+ console.log(
125
+ ` ${chalk.cyan("cf memory init")} Setup AI memory for the project (also available in ${chalk.cyan("cf init")})`
123
126
  );
124
127
  console.log(
125
- ` ${chalk.cyan("cf statusline")} Setup statusline in Claude Code to show more real-time info`
128
+ ` ${chalk.cyan("cf statusline")} Setup statusline in Claude Code to show more real-time info`
126
129
  );
127
130
  console.log();
128
131
  log.dim("Restart Claude Code (or start a new session) to use the plugin.");
@@ -1,22 +1,22 @@
1
1
  import {
2
2
  ensureMemoryBuilt,
3
3
  printMemoryMcpConfig
4
- } from "./chunk-WCSNAEOF.js";
5
- import "./chunk-LTHJTWJ6.js";
4
+ } from "./chunk-WAFKFCAB.js";
5
+ import "./chunk-K2PSF7SF.js";
6
6
  import {
7
7
  getLibPath
8
8
  } from "./chunk-RZRT7NGT.js";
9
9
  import {
10
10
  resolveDocsDir,
11
11
  resolveMemoryDir
12
- } from "./chunk-SIQJPT47.js";
12
+ } from "./chunk-KFNKH5Z7.js";
13
13
  import "./chunk-PRIH34UB.js";
14
- import "./chunk-O4CNZB5H.js";
14
+ import "./chunk-N2Q224HO.js";
15
15
  import {
16
16
  run
17
17
  } from "./chunk-EVGXUDX4.js";
18
18
  import "./chunk-5UVDWG5L.js";
19
- import "./chunk-DO6FV6BL.js";
19
+ import "./chunk-TWKNGPBO.js";
20
20
  import {
21
21
  log,
22
22
  printBanner
@@ -1,7 +1,9 @@
1
1
  import {
2
2
  ensureMemoryBuilt,
3
+ isMemoryInitialized,
3
4
  memoryConfigCommand,
4
5
  memoryInitCommand,
6
+ memoryInitWizard,
5
7
  memoryListCommand,
6
8
  memoryMcpCommand,
7
9
  memoryRebuildCommand,
@@ -11,20 +13,22 @@ import {
11
13
  memoryStatusCommand,
12
14
  memoryStopDaemonCommand,
13
15
  printMemoryMcpConfig
14
- } from "./chunk-WCSNAEOF.js";
15
- import "./chunk-LTHJTWJ6.js";
16
+ } from "./chunk-WAFKFCAB.js";
17
+ import "./chunk-K2PSF7SF.js";
16
18
  import "./chunk-RZRT7NGT.js";
17
- import "./chunk-SIQJPT47.js";
19
+ import "./chunk-KFNKH5Z7.js";
18
20
  import "./chunk-PRIH34UB.js";
19
- import "./chunk-O4CNZB5H.js";
21
+ import "./chunk-N2Q224HO.js";
20
22
  import "./chunk-EVGXUDX4.js";
21
23
  import "./chunk-5UVDWG5L.js";
22
- import "./chunk-DO6FV6BL.js";
24
+ import "./chunk-TWKNGPBO.js";
23
25
  import "./chunk-NREZK463.js";
24
26
  export {
25
27
  ensureMemoryBuilt,
28
+ isMemoryInitialized,
26
29
  memoryConfigCommand,
27
30
  memoryInitCommand,
31
+ memoryInitWizard,
28
32
  memoryListCommand,
29
33
  memoryMcpCommand,
30
34
  memoryRebuildCommand,
@@ -12,7 +12,7 @@ import "./chunk-5UVDWG5L.js";
12
12
  import {
13
13
  claudeLocalSettingsPath,
14
14
  claudeSettingsPath
15
- } from "./chunk-DO6FV6BL.js";
15
+ } from "./chunk-TWKNGPBO.js";
16
16
  import {
17
17
  log,
18
18
  printBanner
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  loadConfig
3
- } from "./chunk-SIQJPT47.js";
3
+ } from "./chunk-KFNKH5Z7.js";
4
4
  import "./chunk-PRIH34UB.js";
5
5
  import {
6
6
  readJson,
@@ -10,7 +10,7 @@ import {
10
10
  claudeSessionDir,
11
11
  encodeProjectPath,
12
12
  resolvePath
13
- } from "./chunk-DO6FV6BL.js";
13
+ } from "./chunk-TWKNGPBO.js";
14
14
  import {
15
15
  log
16
16
  } from "./chunk-NREZK463.js";
@@ -1,28 +1,28 @@
1
+ import {
2
+ getExistingRules
3
+ } from "./chunk-HEBLANJO.js";
1
4
  import {
2
5
  getCliVersion,
3
6
  getLatestCliVersion,
4
7
  getLatestVersion,
5
8
  semverCompare
6
- } from "./chunk-2ETE7NEL.js";
9
+ } from "./chunk-OARRVZL4.js";
10
+ import {
11
+ getInstalledVersion
12
+ } from "./chunk-3HTLOI34.js";
13
+ import "./chunk-DMJCO6LJ.js";
7
14
  import {
8
15
  detectPluginScope,
9
16
  isPluginDisabled
10
- } from "./chunk-5UEY7HQX.js";
11
- import {
12
- getExistingRules
13
- } from "./chunk-HEBLANJO.js";
17
+ } from "./chunk-2TFHVNBI.js";
14
18
  import {
15
19
  getLibPath
16
20
  } from "./chunk-RZRT7NGT.js";
17
21
  import {
18
22
  resolveMemoryDir
19
- } from "./chunk-SIQJPT47.js";
20
- import {
21
- getInstalledVersion
22
- } from "./chunk-TRIALFOQ.js";
23
+ } from "./chunk-KFNKH5Z7.js";
23
24
  import "./chunk-PRIH34UB.js";
24
- import "./chunk-DMJCO6LJ.js";
25
- import "./chunk-O4CNZB5H.js";
25
+ import "./chunk-N2Q224HO.js";
26
26
  import "./chunk-EVGXUDX4.js";
27
27
  import {
28
28
  readJson
@@ -32,7 +32,7 @@ import {
32
32
  devStatePath,
33
33
  globalConfigPath,
34
34
  localConfigPath
35
- } from "./chunk-DO6FV6BL.js";
35
+ } from "./chunk-TWKNGPBO.js";
36
36
  import "./chunk-NREZK463.js";
37
37
 
38
38
  // src/commands/status.ts
@@ -4,7 +4,7 @@ import {
4
4
  saveStatuslineConfig,
5
5
  selectStatuslineComponents,
6
6
  writeStatuslineSettings
7
- } from "./chunk-TRIALFOQ.js";
7
+ } from "./chunk-3HTLOI34.js";
8
8
  import {
9
9
  ALL_COMPONENT_IDS
10
10
  } from "./chunk-PRIH34UB.js";
@@ -12,7 +12,7 @@ import {
12
12
  commandExists
13
13
  } from "./chunk-EVGXUDX4.js";
14
14
  import "./chunk-5UVDWG5L.js";
15
- import "./chunk-DO6FV6BL.js";
15
+ import "./chunk-TWKNGPBO.js";
16
16
  import {
17
17
  log,
18
18
  printBanner
@@ -1,14 +1,14 @@
1
- import {
2
- isMarketplaceRegistered,
3
- isPluginInstalled
4
- } from "./chunk-5UEY7HQX.js";
5
1
  import {
6
2
  hasShellCompletion,
7
3
  removeShellCompletion
8
4
  } from "./chunk-DMJCO6LJ.js";
5
+ import {
6
+ isMarketplaceRegistered,
7
+ isPluginInstalled
8
+ } from "./chunk-2TFHVNBI.js";
9
9
  import {
10
10
  resolveScope
11
- } from "./chunk-O4CNZB5H.js";
11
+ } from "./chunk-N2Q224HO.js";
12
12
  import {
13
13
  commandExists,
14
14
  run
@@ -22,8 +22,9 @@ import {
22
22
  devStatePath,
23
23
  globalConfigDir,
24
24
  marketplaceCachePath,
25
- marketplaceClonePath
26
- } from "./chunk-DO6FV6BL.js";
25
+ marketplaceClonePath,
26
+ memoryDepsDir
27
+ } from "./chunk-TWKNGPBO.js";
27
28
  import {
28
29
  log,
29
30
  printBanner
@@ -61,6 +62,7 @@ function detect() {
61
62
  statuslineConfigured: hasStatuslineReference(),
62
63
  shellCompletionExists: hasShellCompletion(),
63
64
  globalConfigExists: existsSync(globalConfigDir()),
65
+ memoryDepsExists: existsSync(memoryDepsDir()),
64
66
  devModeActive: existsSync(devStatePath())
65
67
  };
66
68
  }
@@ -77,10 +79,13 @@ function displayDetection(d) {
77
79
  console.log(
78
80
  ` ${check(d.globalConfigExists)} Global config (~/.coding-friend/)`
79
81
  );
82
+ console.log(
83
+ ` ${check(d.memoryDepsExists)} Memory dependencies (~/.coding-friend/memory/)`
84
+ );
80
85
  console.log();
81
86
  }
82
87
  function nothingToRemove(d) {
83
- return !d.pluginInstalled && !d.marketplaceRegistered && !d.cacheExists && !d.cloneExists && !d.statuslineConfigured && !d.shellCompletionExists && !d.globalConfigExists;
88
+ return !d.pluginInstalled && !d.marketplaceRegistered && !d.cacheExists && !d.cloneExists && !d.statuslineConfigured && !d.shellCompletionExists && !d.globalConfigExists && !d.memoryDepsExists;
84
89
  }
85
90
  async function uninstallScoped(scope) {
86
91
  const proceed = await confirm({
@@ -171,6 +176,13 @@ async function uninstallCommand(opts = {}) {
171
176
  default: false
172
177
  });
173
178
  }
179
+ let removeMemory = false;
180
+ if (detection.memoryDepsExists && !removeConfig) {
181
+ removeMemory = await confirm({
182
+ message: "Also remove memory dependencies? (better-sqlite3, sqlite-vec, @huggingface/transformers)",
183
+ default: false
184
+ });
185
+ }
174
186
  console.log();
175
187
  let errors = 0;
176
188
  if (detection.pluginInstalled) {
@@ -242,6 +254,15 @@ async function uninstallCommand(opts = {}) {
242
254
  errors++;
243
255
  }
244
256
  }
257
+ if (removeMemory && !removeConfig) {
258
+ log.step("Removing memory dependencies...");
259
+ try {
260
+ rmSync(memoryDepsDir(), { recursive: true, force: true });
261
+ } catch {
262
+ log.warn("Could not remove ~/.coding-friend/memory/ directory.");
263
+ errors++;
264
+ }
265
+ }
245
266
  console.log();
246
267
  if (errors === 0) {
247
268
  log.success("Coding Friend has been completely uninstalled.");
@@ -251,8 +272,14 @@ async function uninstallCommand(opts = {}) {
251
272
  if (!removeConfig && detection.globalConfigExists) {
252
273
  log.dim("Global config kept at ~/.coding-friend/");
253
274
  }
275
+ if (!removeMemory && !removeConfig && detection.memoryDepsExists) {
276
+ log.dim("Memory dependencies kept at ~/.coding-friend/memory/");
277
+ }
254
278
  console.log();
255
279
  log.dim("Restart Claude Code to complete the uninstall.");
280
+ console.log();
281
+ log.dim("To also remove the CLI tool globally, run:");
282
+ console.log(` ${chalk.bold("npm uninstall -g coding-friend-cli")}`);
256
283
  }
257
284
  export {
258
285
  uninstallCommand
@@ -4,14 +4,14 @@ import {
4
4
  getLatestVersion,
5
5
  semverCompare,
6
6
  updateCommand
7
- } from "./chunk-2ETE7NEL.js";
8
- import "./chunk-TRIALFOQ.js";
9
- import "./chunk-PRIH34UB.js";
7
+ } from "./chunk-OARRVZL4.js";
8
+ import "./chunk-3HTLOI34.js";
10
9
  import "./chunk-DMJCO6LJ.js";
11
- import "./chunk-O4CNZB5H.js";
10
+ import "./chunk-PRIH34UB.js";
11
+ import "./chunk-N2Q224HO.js";
12
12
  import "./chunk-EVGXUDX4.js";
13
13
  import "./chunk-5UVDWG5L.js";
14
- import "./chunk-DO6FV6BL.js";
14
+ import "./chunk-TWKNGPBO.js";
15
15
  import "./chunk-NREZK463.js";
16
16
  export {
17
17
  getCliVersion,
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-EVGXUDX4.js";
4
4
  import {
5
5
  globalConfigDir
6
- } from "./chunk-DO6FV6BL.js";
6
+ } from "./chunk-TWKNGPBO.js";
7
7
  import {
8
8
  log
9
9
  } from "./chunk-NREZK463.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coding-friend-cli",
3
- "version": "1.25.0",
3
+ "version": "1.26.0",
4
4
  "description": "CLI for coding-friend — host learning docs, setup MCP server, initialize projects",
5
5
  "type": "module",
6
6
  "bin": {