coding-friend-cli 1.35.7 → 1.36.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.
- package/README.md +5 -3
- package/dist/{chunk-RLUNNJWJ.js → chunk-667NMPN4.js} +47 -4
- package/dist/{chunk-DTSWPWPA.js → chunk-7QFJODWB.js} +14 -9
- package/dist/{chunk-UCYGDDFS.js → chunk-7SMP5CZ4.js} +6 -6
- package/dist/{chunk-B2NFXRFP.js → chunk-DUKBBMVM.js} +11 -18
- package/dist/{chunk-TAPL6NF3.js → chunk-EFRPDFO7.js} +4 -4
- package/dist/{chunk-YBK44KZM.js → chunk-GHR3TNL6.js} +8 -8
- package/dist/{chunk-R6HDMRYL.js → chunk-GZT3YPAP.js} +5 -5
- package/dist/{chunk-UIPLDRGI.js → chunk-KIKN5HEH.js} +6 -6
- package/dist/{chunk-O27FVQFU.js → chunk-O5ZKLFSL.js} +6 -4
- package/dist/{chunk-XMSSEJYL.js → chunk-PQUACN4U.js} +1 -1
- package/dist/{chunk-WSUYLIYX.js → chunk-TEC25H6C.js} +3 -3
- package/dist/{chunk-TWKNGPBO.js → chunk-X2H7JJMR.js} +15 -10
- package/dist/{clean-VFWQ4AJP.js → clean-2IRHH4SU.js} +24 -25
- package/dist/{config-Z3GE6HAP.js → config-36YY3XLM.js} +41 -17
- package/dist/{dev-DWIZTH25.js → dev-JSYPSXEZ.js} +81 -19
- package/dist/{disable-5UK4QINT.js → disable-35RSJICU.js} +3 -3
- package/dist/{enable-UQZNZRPI.js → enable-RXWDQRIU.js} +3 -3
- package/dist/{guide-LQ2BHU5Y.js → guide-ECSMH2AT.js} +4 -4
- package/dist/{host-HKA4OHBM.js → host-BYJEZN6T.js} +10 -5
- package/dist/index.js +55 -37
- package/dist/{init-MFUX5INO.js → init-QXCMAPXT.js} +19 -19
- package/dist/{install-VFD6C3LZ.js → install-NALHBTGG.js} +8 -8
- package/dist/learn-PNG2TI2E.js +111 -0
- package/dist/{mcp-AG7J6CEP.js → mcp-6GRHKIQW.js} +9 -9
- package/dist/{mcp-serve-learn-OKVC5WV3.js → mcp-serve-learn-36ZQQQTF.js} +3 -3
- package/dist/{memory-RZR672Q7.js → memory-A7OUTQ54.js} +6 -6
- package/dist/{permission-KLT2TLZY.js → permission-PB3OMKRB.js} +9 -9
- package/dist/{permissions-LYADLYYK.js → permissions-J46VP6US.js} +2 -1
- package/dist/postinstall.js +1 -1
- package/dist/{session-B3B3CSRF.js → session-YJJRGQPX.js} +6 -6
- package/dist/{status-DDNQ5QNJ.js → status-SG5LCXER.js} +16 -16
- package/dist/{statusline-EYTWM5X6.js → statusline-3Z4DE24F.js} +2 -2
- package/dist/{uninstall-MLSKOCOZ.js → uninstall-JLSEHXS5.js} +11 -11
- package/dist/{update-G5YXZRMQ.js → update-MO5BT3C5.js} +5 -5
- package/dist/{update-check-BPCQ25AR.js → update-check-I2RSVGFO.js} +3 -3
- package/lib/learn-host/README.md +8 -9
- package/lib/learn-host/src/components/Breadcrumbs.tsx +30 -19
- package/package.json +1 -1
- package/lib/learn-host/tsconfig.tsbuildinfo +0 -1
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
registerLearnMcp,
|
|
6
6
|
unregisterLearnMcp
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-TEC25H6C.js";
|
|
8
8
|
import {
|
|
9
9
|
memoryConfigMenu
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-7QFJODWB.js";
|
|
11
11
|
import {
|
|
12
12
|
resolveLearnDir
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-DUKBBMVM.js";
|
|
14
14
|
import "./chunk-RZRT7NGT.js";
|
|
15
15
|
import {
|
|
16
16
|
findStatuslineHookPath,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
saveStatuslineConfig,
|
|
23
23
|
selectStatuslineComponents,
|
|
24
24
|
writeStatuslineSettings
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-7SMP5CZ4.js";
|
|
26
26
|
import {
|
|
27
27
|
ALL_COMPONENT_IDS,
|
|
28
28
|
DEFAULT_CONFIG
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
ensureShellCompletion,
|
|
32
32
|
hasShellCompletion,
|
|
33
33
|
removeShellCompletion
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-667NMPN4.js";
|
|
35
35
|
import {
|
|
36
36
|
BACK,
|
|
37
37
|
applyDocsDirChange,
|
|
@@ -41,16 +41,8 @@ import {
|
|
|
41
41
|
getScopeLabel,
|
|
42
42
|
injectBackChoice,
|
|
43
43
|
showConfigHint
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-EFRPDFO7.js";
|
|
45
45
|
import "./chunk-EVGXUDX4.js";
|
|
46
|
-
import {
|
|
47
|
-
claudeLocalSettingsPath,
|
|
48
|
-
claudeProjectSettingsPath,
|
|
49
|
-
claudeSettingsPath,
|
|
50
|
-
globalConfigPath,
|
|
51
|
-
localConfigPath,
|
|
52
|
-
resolvePath
|
|
53
|
-
} from "./chunk-TWKNGPBO.js";
|
|
54
46
|
import {
|
|
55
47
|
log,
|
|
56
48
|
printBanner
|
|
@@ -58,11 +50,19 @@ import {
|
|
|
58
50
|
import {
|
|
59
51
|
getAllRules,
|
|
60
52
|
getExistingRules
|
|
61
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-O5ZKLFSL.js";
|
|
62
54
|
import {
|
|
63
55
|
mergeJson,
|
|
64
56
|
readJson
|
|
65
57
|
} from "./chunk-5UVDWG5L.js";
|
|
58
|
+
import {
|
|
59
|
+
claudeLocalSettingsPath,
|
|
60
|
+
claudeProjectSettingsPath,
|
|
61
|
+
claudeSettingsPath,
|
|
62
|
+
globalConfigPath,
|
|
63
|
+
localConfigPath,
|
|
64
|
+
resolvePath
|
|
65
|
+
} from "./chunk-X2H7JJMR.js";
|
|
66
66
|
|
|
67
67
|
// src/commands/config.ts
|
|
68
68
|
import { checkbox, confirm, input, select } from "@inquirer/prompts";
|
|
@@ -445,6 +445,20 @@ async function editTdd(globalCfg, localCfg) {
|
|
|
445
445
|
if (scope === "back") return;
|
|
446
446
|
writeToScope(scope, { tdd: value });
|
|
447
447
|
}
|
|
448
|
+
async function editReviewWithCodex(globalCfg, localCfg) {
|
|
449
|
+
const currentValue = getMergedValue("review", globalCfg, localCfg)?.withCodex;
|
|
450
|
+
if (currentValue !== void 0) {
|
|
451
|
+
log.dim(`Current: ${currentValue}`);
|
|
452
|
+
}
|
|
453
|
+
log.dim("Note: requires the Codex CLI installed and logged in.");
|
|
454
|
+
const value = await confirm({
|
|
455
|
+
message: "Run a Codex second-opinion review alongside Claude's by default? (every /cf-review, including auto-invoked ones)",
|
|
456
|
+
default: currentValue ?? false
|
|
457
|
+
});
|
|
458
|
+
const scope = await askScope();
|
|
459
|
+
if (scope === "back") return;
|
|
460
|
+
writeNestedField("review", scope, "withCodex", value);
|
|
461
|
+
}
|
|
448
462
|
async function editAutoApprove(globalCfg, localCfg) {
|
|
449
463
|
const currentValue = getMergedValue("autoApprove", globalCfg, localCfg);
|
|
450
464
|
if (currentValue !== void 0) {
|
|
@@ -458,7 +472,7 @@ async function editAutoApprove(globalCfg, localCfg) {
|
|
|
458
472
|
if (scope === "back") return;
|
|
459
473
|
writeToScope(scope, { autoApprove: value });
|
|
460
474
|
if (value) {
|
|
461
|
-
const { runDangerousRulesAudit } = await import("./permissions-
|
|
475
|
+
const { runDangerousRulesAudit } = await import("./permissions-J46VP6US.js");
|
|
462
476
|
await runDangerousRulesAudit(
|
|
463
477
|
[
|
|
464
478
|
claudeProjectSettingsPath(),
|
|
@@ -654,7 +668,7 @@ async function editPermissions() {
|
|
|
654
668
|
)
|
|
655
669
|
});
|
|
656
670
|
if (choice === BACK) return;
|
|
657
|
-
const { permissionCommand } = await import("./permission-
|
|
671
|
+
const { permissionCommand } = await import("./permission-PB3OMKRB.js");
|
|
658
672
|
switch (choice) {
|
|
659
673
|
case "interactive":
|
|
660
674
|
await permissionCommand({});
|
|
@@ -689,6 +703,8 @@ async function configCommand() {
|
|
|
689
703
|
globalCfg,
|
|
690
704
|
localCfg
|
|
691
705
|
);
|
|
706
|
+
const reviewScope = getScopeLabel("review", globalCfg, localCfg);
|
|
707
|
+
const withCodexVal = getMergedValue("review", globalCfg, localCfg)?.withCodex;
|
|
692
708
|
const statuslineStatus = isStatuslineConfigured() ? chalk.green("configured") : chalk.yellow("not configured");
|
|
693
709
|
const completionStatus = hasShellCompletion() ? chalk.green("installed") : chalk.yellow("not installed");
|
|
694
710
|
const projectRules = getExistingRules(claudeLocalSettingsPath());
|
|
@@ -734,6 +750,11 @@ async function configCommand() {
|
|
|
734
750
|
value: "autoApprove",
|
|
735
751
|
description: " Auto-approve safe tool calls, block destructive ones, prompt for ambiguous"
|
|
736
752
|
},
|
|
753
|
+
{
|
|
754
|
+
name: `Codex dual-review ${formatScopeLabel(reviewScope)}${withCodexVal !== void 0 ? ` (${withCodexVal})` : ""}`,
|
|
755
|
+
value: "review",
|
|
756
|
+
description: " Run a Codex second-opinion review alongside Claude's on every /cf-review"
|
|
757
|
+
},
|
|
737
758
|
{
|
|
738
759
|
name: `Statusline (${statuslineStatus})`,
|
|
739
760
|
value: "statusline",
|
|
@@ -780,6 +801,9 @@ async function configCommand() {
|
|
|
780
801
|
case "autoApprove":
|
|
781
802
|
await editAutoApprove(globalCfg, localCfg);
|
|
782
803
|
break;
|
|
804
|
+
case "review":
|
|
805
|
+
await editReviewWithCodex(globalCfg, localCfg);
|
|
806
|
+
break;
|
|
783
807
|
case "statusline":
|
|
784
808
|
await editStatusline();
|
|
785
809
|
break;
|
|
@@ -1,23 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureStatusline
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7SMP5CZ4.js";
|
|
4
4
|
import "./chunk-57EGAXYI.js";
|
|
5
5
|
import {
|
|
6
6
|
ensureShellCompletion
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-667NMPN4.js";
|
|
8
8
|
import {
|
|
9
9
|
isMarketplaceRegistered,
|
|
10
10
|
isPluginInstalled
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-GZT3YPAP.js";
|
|
12
12
|
import {
|
|
13
13
|
commandExists,
|
|
14
|
-
run
|
|
14
|
+
run,
|
|
15
|
+
runWithStderr
|
|
15
16
|
} from "./chunk-EVGXUDX4.js";
|
|
16
|
-
import {
|
|
17
|
-
devStatePath,
|
|
18
|
-
knownMarketplacesPath,
|
|
19
|
-
pluginCachePath
|
|
20
|
-
} from "./chunk-TWKNGPBO.js";
|
|
21
17
|
import {
|
|
22
18
|
log,
|
|
23
19
|
printBanner
|
|
@@ -26,6 +22,11 @@ import {
|
|
|
26
22
|
readJson,
|
|
27
23
|
writeJson
|
|
28
24
|
} from "./chunk-5UVDWG5L.js";
|
|
25
|
+
import {
|
|
26
|
+
devStatePath,
|
|
27
|
+
knownMarketplacesPath,
|
|
28
|
+
pluginCachePath
|
|
29
|
+
} from "./chunk-X2H7JJMR.js";
|
|
29
30
|
|
|
30
31
|
// src/commands/dev.ts
|
|
31
32
|
import {
|
|
@@ -68,9 +69,11 @@ function ensureClaude() {
|
|
|
68
69
|
}
|
|
69
70
|
function runClaude(args, label) {
|
|
70
71
|
log.step(label);
|
|
71
|
-
const result =
|
|
72
|
-
if (result
|
|
72
|
+
const result = runWithStderr("claude", args);
|
|
73
|
+
if (result.exitCode !== 0) {
|
|
73
74
|
log.error(`Failed: claude ${args.join(" ")}`);
|
|
75
|
+
const tail = result.stderr.split("\n").filter((l) => l.trim()).slice(-5).join("\n");
|
|
76
|
+
if (tail) log.dim(tail);
|
|
74
77
|
return false;
|
|
75
78
|
}
|
|
76
79
|
return true;
|
|
@@ -166,11 +169,21 @@ async function devOffCommand() {
|
|
|
166
169
|
"Removing local marketplace..."
|
|
167
170
|
);
|
|
168
171
|
}
|
|
169
|
-
|
|
172
|
+
try {
|
|
173
|
+
unlinkSync(devStatePath());
|
|
174
|
+
} catch {
|
|
175
|
+
}
|
|
176
|
+
const remoteAdded = runClaude(
|
|
170
177
|
["plugin", "marketplace", "add", REMOTE_URL],
|
|
171
178
|
"Adding remote marketplace..."
|
|
172
|
-
)
|
|
173
|
-
|
|
179
|
+
);
|
|
180
|
+
if (!remoteAdded) {
|
|
181
|
+
log.error(
|
|
182
|
+
"Failed to add remote marketplace. Dev mode is OFF but remote is not configured."
|
|
183
|
+
);
|
|
184
|
+
log.dim(
|
|
185
|
+
`Run \`claude plugin marketplace add ${REMOTE_URL}\` manually, then \`claude plugin install ${PLUGIN_ID}\`.`
|
|
186
|
+
);
|
|
174
187
|
return;
|
|
175
188
|
}
|
|
176
189
|
if (!runClaude(
|
|
@@ -182,10 +195,6 @@ async function devOffCommand() {
|
|
|
182
195
|
return;
|
|
183
196
|
}
|
|
184
197
|
}
|
|
185
|
-
try {
|
|
186
|
-
unlinkSync(devStatePath());
|
|
187
|
-
} catch {
|
|
188
|
-
}
|
|
189
198
|
console.log();
|
|
190
199
|
log.success(`Dev mode ${chalk.yellow("OFF")} \u2014 using remote marketplace.`);
|
|
191
200
|
log.dim("Restart Claude Code to see changes.");
|
|
@@ -299,7 +308,60 @@ async function devReinstall(path, label) {
|
|
|
299
308
|
ensureShellCompletion({ silent: true });
|
|
300
309
|
}
|
|
301
310
|
var devRestartCommand = (path) => devReinstall(path, "Restarting dev mode");
|
|
302
|
-
|
|
311
|
+
async function devUpdateCommand(path) {
|
|
312
|
+
const state = getDevState();
|
|
313
|
+
if (!state) {
|
|
314
|
+
log.error("Dev mode is OFF. Run `cf dev on <path>` first.");
|
|
315
|
+
return;
|
|
316
|
+
}
|
|
317
|
+
if (!ensureClaude()) return;
|
|
318
|
+
if (path && resolve(path) !== state.localPath) {
|
|
319
|
+
return devReinstall(path, "Updating dev plugin (path changed)");
|
|
320
|
+
}
|
|
321
|
+
if (!isMarketplaceRegistered()) {
|
|
322
|
+
return devReinstall(
|
|
323
|
+
state.localPath,
|
|
324
|
+
"Updating dev plugin (marketplace missing)"
|
|
325
|
+
);
|
|
326
|
+
}
|
|
327
|
+
const localPath = state.localPath;
|
|
328
|
+
const version = getLocalPluginVersion(localPath);
|
|
329
|
+
const versionLabel = version ? ` (v${version})` : "";
|
|
330
|
+
console.log();
|
|
331
|
+
printBanner(`Updating dev plugin${versionLabel}`, { color: chalk.cyan });
|
|
332
|
+
console.log();
|
|
333
|
+
log.info(`Local path: ${chalk.cyan(localPath)}`);
|
|
334
|
+
if (isPluginInstalled()) {
|
|
335
|
+
if (!runClaude(
|
|
336
|
+
["plugin", "uninstall", PLUGIN_ID],
|
|
337
|
+
"Uninstalling local plugin..."
|
|
338
|
+
)) {
|
|
339
|
+
run("claude", ["plugin", "uninstall", PLUGIN_NAME]);
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
if (!runClaude(
|
|
343
|
+
["plugin", "install", PLUGIN_ID],
|
|
344
|
+
"Reinstalling plugin from local source..."
|
|
345
|
+
)) {
|
|
346
|
+
if (!runClaude(["plugin", "install", PLUGIN_NAME], "Retrying install...")) {
|
|
347
|
+
log.error(
|
|
348
|
+
"Failed to reinstall local plugin. Run `cf dev restart` to recover."
|
|
349
|
+
);
|
|
350
|
+
return;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
writeJson(devStatePath(), {
|
|
354
|
+
localPath,
|
|
355
|
+
savedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
356
|
+
});
|
|
357
|
+
ensureStatusline();
|
|
358
|
+
ensureShellCompletion({ silent: true });
|
|
359
|
+
console.log();
|
|
360
|
+
log.success(
|
|
361
|
+
`Dev plugin updated${versionLabel} from ${chalk.cyan(localPath)}.`
|
|
362
|
+
);
|
|
363
|
+
log.dim("Restart Claude Code to see changes.");
|
|
364
|
+
}
|
|
303
365
|
async function devStatusCommand() {
|
|
304
366
|
const state = getDevState();
|
|
305
367
|
const source = getMarketplaceSource();
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isPluginDisabled,
|
|
3
3
|
setPluginEnabled
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-GZT3YPAP.js";
|
|
5
5
|
import {
|
|
6
6
|
resolveScope
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-EFRPDFO7.js";
|
|
8
8
|
import "./chunk-EVGXUDX4.js";
|
|
9
|
-
import "./chunk-TWKNGPBO.js";
|
|
10
9
|
import {
|
|
11
10
|
log
|
|
12
11
|
} from "./chunk-NREZK463.js";
|
|
13
12
|
import "./chunk-5UVDWG5L.js";
|
|
13
|
+
import "./chunk-X2H7JJMR.js";
|
|
14
14
|
|
|
15
15
|
// src/commands/disable.ts
|
|
16
16
|
import chalk from "chalk";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isPluginDisabled,
|
|
3
3
|
setPluginEnabled
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-GZT3YPAP.js";
|
|
5
5
|
import {
|
|
6
6
|
resolveScope
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-EFRPDFO7.js";
|
|
8
8
|
import "./chunk-EVGXUDX4.js";
|
|
9
|
-
import "./chunk-TWKNGPBO.js";
|
|
10
9
|
import {
|
|
11
10
|
log
|
|
12
11
|
} from "./chunk-NREZK463.js";
|
|
13
12
|
import "./chunk-5UVDWG5L.js";
|
|
13
|
+
import "./chunk-X2H7JJMR.js";
|
|
14
14
|
|
|
15
15
|
// src/commands/enable.ts
|
|
16
16
|
import chalk from "chalk";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
devStatePath,
|
|
3
|
-
pluginCachePath
|
|
4
|
-
} from "./chunk-TWKNGPBO.js";
|
|
5
1
|
import {
|
|
6
2
|
log
|
|
7
3
|
} from "./chunk-NREZK463.js";
|
|
8
4
|
import {
|
|
9
5
|
readJson
|
|
10
6
|
} from "./chunk-5UVDWG5L.js";
|
|
7
|
+
import {
|
|
8
|
+
devStatePath,
|
|
9
|
+
pluginCachePath
|
|
10
|
+
} from "./chunk-X2H7JJMR.js";
|
|
11
11
|
|
|
12
12
|
// src/commands/guide.ts
|
|
13
13
|
import chalk from "chalk";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-
|
|
2
|
+
resolveLearnDir
|
|
3
|
+
} from "./chunk-DUKBBMVM.js";
|
|
4
4
|
import {
|
|
5
5
|
getLibPath
|
|
6
6
|
} from "./chunk-RZRT7NGT.js";
|
|
@@ -9,12 +9,16 @@ import {
|
|
|
9
9
|
run,
|
|
10
10
|
streamExec
|
|
11
11
|
} from "./chunk-EVGXUDX4.js";
|
|
12
|
-
import "./chunk-TWKNGPBO.js";
|
|
13
12
|
import {
|
|
14
13
|
log,
|
|
15
14
|
printBanner
|
|
16
15
|
} from "./chunk-NREZK463.js";
|
|
17
|
-
import
|
|
16
|
+
import {
|
|
17
|
+
readJson
|
|
18
|
+
} from "./chunk-5UVDWG5L.js";
|
|
19
|
+
import {
|
|
20
|
+
globalConfigPath
|
|
21
|
+
} from "./chunk-X2H7JJMR.js";
|
|
18
22
|
|
|
19
23
|
// src/commands/host.ts
|
|
20
24
|
import { existsSync, readdirSync } from "fs";
|
|
@@ -36,7 +40,8 @@ function countCategories(dir) {
|
|
|
36
40
|
).length;
|
|
37
41
|
}
|
|
38
42
|
async function hostCommand(path, opts) {
|
|
39
|
-
const
|
|
43
|
+
const globalCfg = readJson(globalConfigPath());
|
|
44
|
+
const docsDir = resolveLearnDir(globalCfg, path);
|
|
40
45
|
const port = opts?.port ?? "3333";
|
|
41
46
|
const hostDir = getLibPath("learn-host");
|
|
42
47
|
if (!existsSync(docsDir)) {
|
package/dist/index.js
CHANGED
|
@@ -14,35 +14,51 @@ 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-
|
|
17
|
+
const { installCommand } = await import("./install-NALHBTGG.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-
|
|
21
|
+
const { uninstallCommand } = await import("./uninstall-JLSEHXS5.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-
|
|
25
|
+
const { disableCommand } = await import("./disable-35RSJICU.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-
|
|
29
|
+
const { enableCommand } = await import("./enable-RXWDQRIU.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-
|
|
33
|
+
const { initCommand } = await import("./init-QXCMAPXT.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-
|
|
37
|
+
const { configCommand } = await import("./config-36YY3XLM.js");
|
|
38
38
|
await configCommand();
|
|
39
39
|
});
|
|
40
|
-
program.command("
|
|
41
|
-
|
|
40
|
+
var learn = program.command("learn").description("Manage learning docs \u2014 host as a website or push to git");
|
|
41
|
+
program.addHelpText(
|
|
42
|
+
"after",
|
|
43
|
+
`
|
|
44
|
+
Learn subcommands:
|
|
45
|
+
learn host [path] Build and serve learning docs as a static website
|
|
46
|
+
learn push [path] Commit and push learning docs (only if learn dir is the git root)`
|
|
47
|
+
);
|
|
48
|
+
learn.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) => {
|
|
49
|
+
const { hostCommand } = await import("./host-BYJEZN6T.js");
|
|
50
|
+
await hostCommand(path, opts);
|
|
51
|
+
});
|
|
52
|
+
learn.command("push").description("Commit and push learning docs to origin").argument("[path]", "path to docs folder").action(async (path) => {
|
|
53
|
+
const { learnPushCommand } = await import("./learn-PNG2TI2E.js");
|
|
54
|
+
await learnPushCommand(path);
|
|
55
|
+
});
|
|
56
|
+
program.command("host", { hidden: true }).argument("[path]", "path to docs folder").option("-p, --port <port>", "port number", "3333").action(async (path, opts) => {
|
|
57
|
+
const { hostCommand } = await import("./host-BYJEZN6T.js");
|
|
42
58
|
await hostCommand(path, opts);
|
|
43
59
|
});
|
|
44
60
|
program.command("mcp").description("Setup MCP server for learning docs").action(async () => {
|
|
45
|
-
const { mcpCommand } = await import("./mcp-
|
|
61
|
+
const { mcpCommand } = await import("./mcp-6GRHKIQW.js");
|
|
46
62
|
await mcpCommand();
|
|
47
63
|
});
|
|
48
64
|
program.command("mcp-serve").description("Start the cf-memory MCP server (used internally by npx)").argument("<memoryDir>", "path to memory directory").action(async (memoryDir) => {
|
|
@@ -50,30 +66,30 @@ program.command("mcp-serve").description("Start the cf-memory MCP server (used i
|
|
|
50
66
|
await mcpServeCommand(memoryDir);
|
|
51
67
|
});
|
|
52
68
|
program.command("mcp-serve-learn").description("Start the learn MCP server (used internally by npx)").argument("<docsDir>", "path to docs directory").action(async (docsDir) => {
|
|
53
|
-
const { mcpServeLearnCommand } = await import("./mcp-serve-learn-
|
|
69
|
+
const { mcpServeLearnCommand } = await import("./mcp-serve-learn-36ZQQQTF.js");
|
|
54
70
|
await mcpServeLearnCommand(docsDir);
|
|
55
71
|
});
|
|
56
72
|
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(
|
|
57
73
|
"--project",
|
|
58
74
|
"Save to project-level settings (.claude/settings.local.json)"
|
|
59
75
|
).action(async (opts) => {
|
|
60
|
-
const { permissionCommand } = await import("./permission-
|
|
76
|
+
const { permissionCommand } = await import("./permission-PB3OMKRB.js");
|
|
61
77
|
await permissionCommand(opts);
|
|
62
78
|
});
|
|
63
79
|
program.command("statusline").description("Setup coding-friend statusline in Claude Code").action(async () => {
|
|
64
|
-
const { statuslineCommand } = await import("./statusline-
|
|
80
|
+
const { statuslineCommand } = await import("./statusline-3Z4DE24F.js");
|
|
65
81
|
await statuslineCommand();
|
|
66
82
|
});
|
|
67
83
|
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) => {
|
|
68
|
-
const { updateCommand } = await import("./update-
|
|
84
|
+
const { updateCommand } = await import("./update-MO5BT3C5.js");
|
|
69
85
|
await updateCommand(opts);
|
|
70
86
|
});
|
|
71
87
|
program.command("status").description("Show comprehensive Coding Friend status").action(async () => {
|
|
72
|
-
const { statusCommand } = await import("./status-
|
|
88
|
+
const { statusCommand } = await import("./status-SG5LCXER.js");
|
|
73
89
|
await statusCommand();
|
|
74
90
|
});
|
|
75
91
|
program.command("clean").description("Clean files generated by Coding Friend in docs/").action(async () => {
|
|
76
|
-
const { cleanCommand } = await import("./clean-
|
|
92
|
+
const { cleanCommand } = await import("./clean-2IRHH4SU.js");
|
|
77
93
|
await cleanCommand();
|
|
78
94
|
});
|
|
79
95
|
var session = program.command("session").description("[beta] Save and load Claude Code sessions across machines");
|
|
@@ -88,11 +104,11 @@ session.command("save").description("Save current Claude Code session to sync fo
|
|
|
88
104
|
"-s, --session-id <id>",
|
|
89
105
|
"session UUID to save (default: auto-detect newest)"
|
|
90
106
|
).option("-l, --label <label>", "label for this session").action(async (opts) => {
|
|
91
|
-
const { sessionSaveCommand } = await import("./session-
|
|
107
|
+
const { sessionSaveCommand } = await import("./session-YJJRGQPX.js");
|
|
92
108
|
await sessionSaveCommand(opts);
|
|
93
109
|
});
|
|
94
110
|
session.command("load").description("Load a saved session from sync folder").action(async () => {
|
|
95
|
-
const { sessionLoadCommand } = await import("./session-
|
|
111
|
+
const { sessionLoadCommand } = await import("./session-YJJRGQPX.js");
|
|
96
112
|
await sessionLoadCommand();
|
|
97
113
|
});
|
|
98
114
|
var memory = program.command("memory").description("AI memory system \u2014 store and search project knowledge");
|
|
@@ -112,43 +128,43 @@ Memory subcommands:
|
|
|
112
128
|
memory mcp Show MCP server setup instructions`
|
|
113
129
|
);
|
|
114
130
|
memory.command("status").description("Show memory system status").action(async () => {
|
|
115
|
-
const { memoryStatusCommand } = await import("./memory-
|
|
131
|
+
const { memoryStatusCommand } = await import("./memory-A7OUTQ54.js");
|
|
116
132
|
await memoryStatusCommand();
|
|
117
133
|
});
|
|
118
134
|
memory.command("search").description("Search memories by query").argument("<query>", "search query").action(async (query) => {
|
|
119
|
-
const { memorySearchCommand } = await import("./memory-
|
|
135
|
+
const { memorySearchCommand } = await import("./memory-A7OUTQ54.js");
|
|
120
136
|
await memorySearchCommand(query);
|
|
121
137
|
});
|
|
122
138
|
memory.command("list").description(
|
|
123
139
|
"List memories in current project, or all projects with --projects"
|
|
124
140
|
).option("--projects", "List all project databases with size and metadata").action(async (opts) => {
|
|
125
|
-
const { memoryListCommand } = await import("./memory-
|
|
141
|
+
const { memoryListCommand } = await import("./memory-A7OUTQ54.js");
|
|
126
142
|
await memoryListCommand(opts);
|
|
127
143
|
});
|
|
128
144
|
memory.command("init").description(
|
|
129
145
|
"Initialize memory system \u2014 interactive wizard (first time) or config menu"
|
|
130
146
|
).action(async () => {
|
|
131
|
-
const { memoryInitCommand } = await import("./memory-
|
|
147
|
+
const { memoryInitCommand } = await import("./memory-A7OUTQ54.js");
|
|
132
148
|
await memoryInitCommand();
|
|
133
149
|
});
|
|
134
150
|
memory.command("config").description("Configure memory system settings").action(async () => {
|
|
135
|
-
const { memoryConfigCommand } = await import("./memory-
|
|
151
|
+
const { memoryConfigCommand } = await import("./memory-A7OUTQ54.js");
|
|
136
152
|
await memoryConfigCommand();
|
|
137
153
|
});
|
|
138
154
|
memory.command("start-daemon").description("Start the memory daemon (Tier 2 \u2014 MiniSearch)").action(async () => {
|
|
139
|
-
const { memoryStartDaemonCommand } = await import("./memory-
|
|
155
|
+
const { memoryStartDaemonCommand } = await import("./memory-A7OUTQ54.js");
|
|
140
156
|
await memoryStartDaemonCommand();
|
|
141
157
|
});
|
|
142
158
|
memory.command("stop-daemon").description("Stop the memory daemon").action(async () => {
|
|
143
|
-
const { memoryStopDaemonCommand } = await import("./memory-
|
|
159
|
+
const { memoryStopDaemonCommand } = await import("./memory-A7OUTQ54.js");
|
|
144
160
|
await memoryStopDaemonCommand();
|
|
145
161
|
});
|
|
146
162
|
memory.command("rebuild").description("Rebuild the daemon search index").action(async () => {
|
|
147
|
-
const { memoryRebuildCommand } = await import("./memory-
|
|
163
|
+
const { memoryRebuildCommand } = await import("./memory-A7OUTQ54.js");
|
|
148
164
|
await memoryRebuildCommand();
|
|
149
165
|
});
|
|
150
166
|
memory.command("mcp").description("Show MCP server setup instructions").action(async () => {
|
|
151
|
-
const { memoryMcpCommand } = await import("./memory-
|
|
167
|
+
const { memoryMcpCommand } = await import("./memory-A7OUTQ54.js");
|
|
152
168
|
await memoryMcpCommand();
|
|
153
169
|
});
|
|
154
170
|
memory.command("rm").description("Remove a project database").option("--project-id <id>", "Project ID to remove").option("--all", "Remove all project databases").option(
|
|
@@ -156,17 +172,17 @@ memory.command("rm").description("Remove a project database").option("--project-
|
|
|
156
172
|
"Remove orphaned projects (source dir missing or 0 memories)"
|
|
157
173
|
).action(
|
|
158
174
|
async (opts) => {
|
|
159
|
-
const { memoryRmCommand } = await import("./memory-
|
|
175
|
+
const { memoryRmCommand } = await import("./memory-A7OUTQ54.js");
|
|
160
176
|
await memoryRmCommand(opts);
|
|
161
177
|
}
|
|
162
178
|
);
|
|
163
179
|
var guide = program.command("guide").description("Manage custom skill guides");
|
|
164
180
|
guide.command("create").description("Create a custom guide for a skill").argument("<skill-name>", "skill to create guide for (e.g. cf-commit)").action(async (skillName) => {
|
|
165
|
-
const { guideCreateCommand } = await import("./guide-
|
|
181
|
+
const { guideCreateCommand } = await import("./guide-ECSMH2AT.js");
|
|
166
182
|
guideCreateCommand(skillName);
|
|
167
183
|
});
|
|
168
184
|
guide.command("list").description("List existing custom guides").action(async () => {
|
|
169
|
-
const { guideListCommand } = await import("./guide-
|
|
185
|
+
const { guideListCommand } = await import("./guide-ECSMH2AT.js");
|
|
170
186
|
guideListCommand();
|
|
171
187
|
});
|
|
172
188
|
var dev = program.command("dev").description("Development mode commands");
|
|
@@ -182,41 +198,43 @@ Dev subcommands:
|
|
|
182
198
|
dev update [path] Update local dev plugin to latest version`
|
|
183
199
|
);
|
|
184
200
|
dev.command("on").description("Switch to local plugin source").argument("[path]", "path to local coding-friend repo (default: cwd)").action(async (path) => {
|
|
185
|
-
const { devOnCommand } = await import("./dev-
|
|
201
|
+
const { devOnCommand } = await import("./dev-JSYPSXEZ.js");
|
|
186
202
|
await devOnCommand(path);
|
|
187
203
|
});
|
|
188
204
|
dev.command("off").description("Switch back to remote marketplace").action(async () => {
|
|
189
|
-
const { devOffCommand } = await import("./dev-
|
|
205
|
+
const { devOffCommand } = await import("./dev-JSYPSXEZ.js");
|
|
190
206
|
await devOffCommand();
|
|
191
207
|
});
|
|
192
208
|
dev.command("status").description("Show current dev mode").action(async () => {
|
|
193
|
-
const { devStatusCommand } = await import("./dev-
|
|
209
|
+
const { devStatusCommand } = await import("./dev-JSYPSXEZ.js");
|
|
194
210
|
await devStatusCommand();
|
|
195
211
|
});
|
|
196
212
|
dev.command("sync").description(
|
|
197
213
|
"Copy local source files to plugin cache (no version bump needed)"
|
|
198
214
|
).action(async () => {
|
|
199
|
-
const { devSyncCommand } = await import("./dev-
|
|
215
|
+
const { devSyncCommand } = await import("./dev-JSYPSXEZ.js");
|
|
200
216
|
await devSyncCommand();
|
|
201
217
|
});
|
|
202
218
|
dev.command("restart").description("Reinstall local dev plugin (off + on)").argument(
|
|
203
219
|
"[path]",
|
|
204
220
|
"path to local coding-friend repo (default: saved path or cwd)"
|
|
205
221
|
).action(async (path) => {
|
|
206
|
-
const { devRestartCommand } = await import("./dev-
|
|
222
|
+
const { devRestartCommand } = await import("./dev-JSYPSXEZ.js");
|
|
207
223
|
await devRestartCommand(path);
|
|
208
224
|
});
|
|
209
|
-
dev.command("update").description(
|
|
225
|
+
dev.command("update").description(
|
|
226
|
+
"Refresh local dev plugin via uninstall + reinstall (fast, no remote round-trip)"
|
|
227
|
+
).argument(
|
|
210
228
|
"[path]",
|
|
211
229
|
"path to local coding-friend repo (default: saved path or cwd)"
|
|
212
230
|
).action(async (path) => {
|
|
213
|
-
const { devUpdateCommand } = await import("./dev-
|
|
231
|
+
const { devUpdateCommand } = await import("./dev-JSYPSXEZ.js");
|
|
214
232
|
await devUpdateCommand(path);
|
|
215
233
|
});
|
|
216
234
|
program.hook("postAction", async () => {
|
|
217
235
|
const topCmd = process.argv[2];
|
|
218
236
|
if (topCmd === "update") return;
|
|
219
|
-
const { checkAndNotifyCliUpdate } = await import("./update-check-
|
|
237
|
+
const { checkAndNotifyCliUpdate } = await import("./update-check-I2RSVGFO.js");
|
|
220
238
|
checkAndNotifyCliUpdate(pkg.version);
|
|
221
239
|
});
|
|
222
240
|
await program.parseAsync();
|