coding-friend-cli 1.36.4 → 1.38.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 +8 -3
- package/dist/{chunk-GZT3YPAP.js → chunk-32UAW3NX.js} +1 -1
- package/dist/chunk-5QCGEPQO.js +238 -0
- package/dist/{chunk-YIXAQ4R2.js → chunk-6NXZKAOV.js} +1 -1
- package/dist/{chunk-XHP3EBR3.js → chunk-776ZY62N.js} +112 -4
- package/dist/{chunk-N4WZWRCI.js → chunk-BXSCYGWE.js} +85 -37
- package/dist/{chunk-AK6RMCAC.js → chunk-CGEMETKQ.js} +44 -30
- package/dist/{chunk-XEKQW4RN.js → chunk-ETTZRJ55.js} +1 -1
- package/dist/{chunk-IKLMHJH6.js → chunk-GIH6E7GJ.js} +62 -1
- package/dist/{chunk-56YJWGAN.js → chunk-ONG4KRYP.js} +60 -47
- package/dist/{chunk-X2H7JJMR.js → chunk-PLSJW7QJ.js} +29 -1
- package/dist/{chunk-O5ZKLFSL.js → chunk-RCE4OWNX.js} +1 -1
- package/dist/{chunk-K4WSC62G.js → chunk-RFNKPAJW.js} +42 -2
- package/dist/{clean-Q4VU662V.js → clean-YWEMYDE5.js} +3 -2
- package/dist/{config-CTTHWJH5.js → config-NG7SICM4.js} +15 -27
- package/dist/{dev-IGHMMEP4.js → dev-PTBNMKZT.js} +3 -3
- package/dist/{disable-HL5OEURT.js → disable-MO7AXYYF.js} +20 -3
- package/dist/{enable-CZIOCKKJ.js → enable-4GXLQEHD.js} +20 -3
- package/dist/{guide-CO2V4ZLZ.js → guide-HCR43LJN.js} +1 -1
- package/dist/{host-NCJMUSME.js → host-EV6QIVTI.js} +3 -3
- package/dist/index.js +62 -48
- package/dist/{init-UABKVDVT.js → init-KYE5CJMW.js} +135 -17
- package/dist/{install-R2HDM3N4.js → install-XAFQY5YF.js} +80 -5
- package/dist/{learn-K64AUUFB.js → learn-MC4VDHZH.js} +2 -2
- package/dist/{mcp-OMQFSJP4.js → mcp-FV6YX3ZT.js} +24 -24
- package/dist/{mcp-serve-3FEPFVVQ.js → mcp-serve-PXREYQRZ.js} +10 -1
- package/dist/{mcp-serve-learn-OF3ZJUJC.js → mcp-serve-learn-UVXIDOEZ.js} +1 -1
- package/dist/{memory-Y6GNALG3.js → memory-DF7OUOTV.js} +7 -7
- package/dist/{permission-I3OFJUYA.js → permission-VISPGMUK.js} +38 -4
- package/dist/{permissions-J46VP6US.js → permissions-2SBACQHV.js} +2 -2
- package/dist/{session-Q2DLQPYP.js → session-QK6OZO3X.js} +3 -2
- package/dist/{status-ML4XEDYL.js → status-FVFTJ6GS.js} +18 -14
- package/dist/{statusline-KKFJPTI7.js → statusline-AOZHEQSV.js} +2 -2
- package/dist/{uninstall-ASLHT3MH.js → uninstall-MF6FRUBO.js} +64 -3
- package/dist/{update-DIOH45TE.js → update-QNUCSDSA.js} +7 -4
- package/dist/{update-check-25SCLHZO.js → update-check-7LKJLJPM.js} +1 -1
- package/lib/cf-memory/src/backends/sqlite/index.ts +142 -85
- package/lib/cf-memory/src/lib/claude-md.ts +82 -70
- package/lib/cf-memory/src/lib/status-frame.ts +2 -2
- package/lib/cf-memory/src/tools/delete.ts +1 -1
- package/lib/cf-memory/src/tools/store.ts +6 -6
- package/lib/cf-memory/src/tools/update.ts +5 -11
- package/package.json +32 -4
- package/lib/cf-memory/README.md +0 -317
- package/lib/cf-memory/src/__tests__/claude-md.test.ts +0 -343
- package/lib/cf-memory/src/__tests__/daemon-client.test.ts +0 -146
- package/lib/cf-memory/src/__tests__/daemon-e2e.test.ts +0 -223
- package/lib/cf-memory/src/__tests__/daemon.test.ts +0 -407
- package/lib/cf-memory/src/__tests__/dedup.test.ts +0 -103
- package/lib/cf-memory/src/__tests__/embeddings.test.ts +0 -292
- package/lib/cf-memory/src/__tests__/lazy-install.test.ts +0 -210
- package/lib/cf-memory/src/__tests__/markdown-backend.test.ts +0 -450
- package/lib/cf-memory/src/__tests__/migration.test.ts +0 -255
- package/lib/cf-memory/src/__tests__/migrations.test.ts +0 -288
- package/lib/cf-memory/src/__tests__/minisearch-backend.test.ts +0 -262
- package/lib/cf-memory/src/__tests__/ollama.test.ts +0 -48
- package/lib/cf-memory/src/__tests__/project-id.test.ts +0 -43
- package/lib/cf-memory/src/__tests__/schema.test.ts +0 -128
- package/lib/cf-memory/src/__tests__/search.test.ts +0 -115
- package/lib/cf-memory/src/__tests__/status-frame.test.ts +0 -136
- package/lib/cf-memory/src/__tests__/temporal-decay.test.ts +0 -54
- package/lib/cf-memory/src/__tests__/tier.test.ts +0 -367
- package/lib/cf-memory/src/__tests__/tools.test.ts +0 -83
- package/lib/cf-memory/vitest.config.ts +0 -7
- package/lib/learn-host/.prettierignore +0 -4
- package/lib/learn-host/.prettierrc +0 -8
- package/lib/learn-host/README.md +0 -113
- package/lib/learn-host/eslint.config.mjs +0 -6
- package/lib/learn-mcp/README.md +0 -187
- package/lib/learn-mcp/src/__tests__/docs.test.ts +0 -117
- package/lib/learn-mcp/vitest.config.ts +0 -8
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureStatusline
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ETTZRJ55.js";
|
|
4
4
|
import "./chunk-3WIZA5OZ.js";
|
|
5
5
|
import {
|
|
6
6
|
ensureShellCompletion
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
isMarketplaceRegistered,
|
|
10
10
|
isPluginInstalled
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-32UAW3NX.js";
|
|
12
12
|
import {
|
|
13
13
|
commandExists,
|
|
14
14
|
run,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
devStatePath,
|
|
23
23
|
knownMarketplacesPath,
|
|
24
24
|
pluginCachePath
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-PLSJW7QJ.js";
|
|
26
26
|
import {
|
|
27
27
|
log,
|
|
28
28
|
printBanner
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isPluginDisabled,
|
|
3
3
|
setPluginEnabled
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-32UAW3NX.js";
|
|
5
5
|
import {
|
|
6
|
+
isCodexPluginDisabled,
|
|
7
|
+
setCodexPluginEnabled
|
|
8
|
+
} from "./chunk-5QCGEPQO.js";
|
|
9
|
+
import {
|
|
10
|
+
resolveHostFlags,
|
|
6
11
|
resolveScope
|
|
7
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-GIH6E7GJ.js";
|
|
8
13
|
import "./chunk-EVGXUDX4.js";
|
|
9
14
|
import "./chunk-5UVDWG5L.js";
|
|
10
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-PLSJW7QJ.js";
|
|
11
16
|
import {
|
|
12
17
|
log
|
|
13
18
|
} from "./chunk-NREZK463.js";
|
|
@@ -15,6 +20,18 @@ import {
|
|
|
15
20
|
// src/commands/disable.ts
|
|
16
21
|
import chalk from "chalk";
|
|
17
22
|
async function disableCommand(opts = {}) {
|
|
23
|
+
const { host } = resolveHostFlags(opts);
|
|
24
|
+
if (host === "codex") {
|
|
25
|
+
if (isCodexPluginDisabled()) {
|
|
26
|
+
log.info("Coding Friend is already disabled for Codex.");
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
log.step("Disabling Codex plugin...");
|
|
30
|
+
setCodexPluginEnabled(false);
|
|
31
|
+
log.success("Coding Friend disabled for Codex.");
|
|
32
|
+
log.dim("Restart Codex CLI for the change to take effect.");
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
18
35
|
const scope = await resolveScope(
|
|
19
36
|
opts,
|
|
20
37
|
"Where should Coding Friend be disabled?"
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isPluginDisabled,
|
|
3
3
|
setPluginEnabled
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-32UAW3NX.js";
|
|
5
5
|
import {
|
|
6
|
+
isCodexPluginDisabled,
|
|
7
|
+
setCodexPluginEnabled
|
|
8
|
+
} from "./chunk-5QCGEPQO.js";
|
|
9
|
+
import {
|
|
10
|
+
resolveHostFlags,
|
|
6
11
|
resolveScope
|
|
7
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-GIH6E7GJ.js";
|
|
8
13
|
import "./chunk-EVGXUDX4.js";
|
|
9
14
|
import "./chunk-5UVDWG5L.js";
|
|
10
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-PLSJW7QJ.js";
|
|
11
16
|
import {
|
|
12
17
|
log
|
|
13
18
|
} from "./chunk-NREZK463.js";
|
|
@@ -15,6 +20,18 @@ import {
|
|
|
15
20
|
// src/commands/enable.ts
|
|
16
21
|
import chalk from "chalk";
|
|
17
22
|
async function enableCommand(opts = {}) {
|
|
23
|
+
const { host } = resolveHostFlags(opts);
|
|
24
|
+
if (host === "codex") {
|
|
25
|
+
if (!isCodexPluginDisabled()) {
|
|
26
|
+
log.info("Coding Friend is already enabled for Codex.");
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
log.step("Enabling Codex plugin...");
|
|
30
|
+
setCodexPluginEnabled(true);
|
|
31
|
+
log.success("Coding Friend enabled for Codex.");
|
|
32
|
+
log.dim("Restart Codex CLI for the change to take effect.");
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
18
35
|
const scope = await resolveScope(
|
|
19
36
|
opts,
|
|
20
37
|
"Where should Coding Friend be enabled?"
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveLearnDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RFNKPAJW.js";
|
|
4
|
+
import "./chunk-3WIZA5OZ.js";
|
|
4
5
|
import {
|
|
5
6
|
getLibPath
|
|
6
7
|
} from "./chunk-RZRT7NGT.js";
|
|
7
|
-
import "./chunk-3WIZA5OZ.js";
|
|
8
8
|
import {
|
|
9
9
|
run,
|
|
10
10
|
streamExec
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from "./chunk-5UVDWG5L.js";
|
|
15
15
|
import {
|
|
16
16
|
globalConfigPath
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-PLSJW7QJ.js";
|
|
18
18
|
import {
|
|
19
19
|
log,
|
|
20
20
|
printBanner
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
installedPluginsPath
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-PLSJW7QJ.js";
|
|
5
5
|
|
|
6
6
|
// src/index.ts
|
|
7
7
|
import { Command } from "commander";
|
|
@@ -42,28 +42,34 @@ var program = new Command();
|
|
|
42
42
|
program.name("cf").description(
|
|
43
43
|
"coding-friend CLI \u2014 host learning docs, setup MCP, init projects"
|
|
44
44
|
).version(wantsVersion ? buildVersionString() : pkg.version, "-v, --version");
|
|
45
|
-
program.command("install").description("Install the Coding Friend plugin into
|
|
46
|
-
const { installCommand } = await import("./install-
|
|
45
|
+
program.command("install").description("Install the Coding Friend plugin into a supported host").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)").option("--agent <agent>", "Operate on host agent: claude or codex", "claude").option("--codex", "Alias for --agent codex").action(async (opts) => {
|
|
46
|
+
const { installCommand } = await import("./install-XAFQY5YF.js");
|
|
47
47
|
await installCommand(opts);
|
|
48
48
|
});
|
|
49
|
-
program.command("uninstall").description("Uninstall the Coding Friend plugin from
|
|
50
|
-
|
|
49
|
+
program.command("uninstall").description("Uninstall the Coding Friend plugin from a supported host").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").option("--agent <agent>", "Operate on host agent: claude or codex", "claude").option("--codex", "Alias for --agent codex").option(
|
|
50
|
+
"--remove-marketplace",
|
|
51
|
+
"Also remove the host marketplace registration"
|
|
52
|
+
).action(async (opts) => {
|
|
53
|
+
const { uninstallCommand } = await import("./uninstall-MF6FRUBO.js");
|
|
51
54
|
await uninstallCommand(opts);
|
|
52
55
|
});
|
|
53
|
-
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) => {
|
|
54
|
-
const { disableCommand } = await import("./disable-
|
|
56
|
+
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").option("--agent <agent>", "Operate on host agent: claude or codex", "claude").option("--codex", "Alias for --agent codex").action(async (opts) => {
|
|
57
|
+
const { disableCommand } = await import("./disable-MO7AXYYF.js");
|
|
55
58
|
await disableCommand(opts);
|
|
56
59
|
});
|
|
57
|
-
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) => {
|
|
58
|
-
const { enableCommand } = await import("./enable-
|
|
60
|
+
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").option("--agent <agent>", "Operate on host agent: claude or codex", "claude").option("--codex", "Alias for --agent codex").action(async (opts) => {
|
|
61
|
+
const { enableCommand } = await import("./enable-4GXLQEHD.js");
|
|
59
62
|
await enableCommand(opts);
|
|
60
63
|
});
|
|
61
|
-
program.command("init").description("Initialize coding-friend in current project").
|
|
62
|
-
|
|
63
|
-
|
|
64
|
+
program.command("init").description("Initialize coding-friend in current project").option("--agent <agent>", "Operate on host agent: claude or codex", "claude").option("--codex", "Alias for --agent codex").option(
|
|
65
|
+
"--trust-project",
|
|
66
|
+
"For Codex, mark the current project trusted in ~/.codex/config.toml"
|
|
67
|
+
).action(async (opts) => {
|
|
68
|
+
const { initCommand } = await import("./init-KYE5CJMW.js");
|
|
69
|
+
await initCommand(opts);
|
|
64
70
|
});
|
|
65
71
|
program.command("config").description("Manage Coding Friend configuration").action(async () => {
|
|
66
|
-
const { configCommand } = await import("./config-
|
|
72
|
+
const { configCommand } = await import("./config-NG7SICM4.js");
|
|
67
73
|
await configCommand();
|
|
68
74
|
});
|
|
69
75
|
var learn = program.command("learn").description("Manage learning docs \u2014 host as a website or push to git");
|
|
@@ -75,50 +81,58 @@ Learn subcommands:
|
|
|
75
81
|
learn push [path] Commit and push learning docs (only if learn dir is the git root)`
|
|
76
82
|
);
|
|
77
83
|
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) => {
|
|
78
|
-
const { hostCommand } = await import("./host-
|
|
84
|
+
const { hostCommand } = await import("./host-EV6QIVTI.js");
|
|
79
85
|
await hostCommand(path, opts);
|
|
80
86
|
});
|
|
81
87
|
learn.command("push").description("Commit and push learning docs to origin").argument("[path]", "path to docs folder").action(async (path) => {
|
|
82
|
-
const { learnPushCommand } = await import("./learn-
|
|
88
|
+
const { learnPushCommand } = await import("./learn-MC4VDHZH.js");
|
|
83
89
|
await learnPushCommand(path);
|
|
84
90
|
});
|
|
85
91
|
program.command("host", { hidden: true }).argument("[path]", "path to docs folder").option("-p, --port <port>", "port number", "3333").action(async (path, opts) => {
|
|
86
|
-
const { hostCommand } = await import("./host-
|
|
92
|
+
const { hostCommand } = await import("./host-EV6QIVTI.js");
|
|
87
93
|
await hostCommand(path, opts);
|
|
88
94
|
});
|
|
89
95
|
program.command("mcp").description("Setup MCP server for learning docs").action(async () => {
|
|
90
|
-
const { mcpCommand } = await import("./mcp-
|
|
96
|
+
const { mcpCommand } = await import("./mcp-FV6YX3ZT.js");
|
|
91
97
|
await mcpCommand();
|
|
92
98
|
});
|
|
93
|
-
program.command("mcp-serve").description(
|
|
94
|
-
|
|
99
|
+
program.command("mcp-serve").description(
|
|
100
|
+
"Start the cf-memory MCP server (used internally by npx). When memoryDir is omitted, resolves from CLAUDE_PROJECT_DIR at runtime."
|
|
101
|
+
).argument("[memoryDir]", "path to memory directory (optional)").action(async (memoryDir) => {
|
|
102
|
+
const { mcpServeCommand } = await import("./mcp-serve-PXREYQRZ.js");
|
|
95
103
|
await mcpServeCommand(memoryDir);
|
|
96
104
|
});
|
|
97
105
|
program.command("mcp-serve-learn").description("Start the learn MCP server (used internally by npx)").argument("<docsDir>", "path to docs directory").action(async (docsDir) => {
|
|
98
|
-
const { mcpServeLearnCommand } = await import("./mcp-serve-learn-
|
|
106
|
+
const { mcpServeLearnCommand } = await import("./mcp-serve-learn-UVXIDOEZ.js");
|
|
99
107
|
await mcpServeLearnCommand(docsDir);
|
|
100
108
|
});
|
|
101
|
-
program.command("permission").description("Manage
|
|
109
|
+
program.command("permission").description("Manage host permission and approval settings for Coding Friend").option("--all", "Apply all recommended permissions without prompts").option("--user", "Save to user-level settings (~/.claude/settings.json)").option(
|
|
102
110
|
"--project",
|
|
103
111
|
"Save to project-level settings (.claude/settings.local.json)"
|
|
112
|
+
).option("--agent <agent>", "Operate on host agent: claude or codex", "claude").option("--codex", "Alias for --agent codex").option(
|
|
113
|
+
"--enable-auto-approve",
|
|
114
|
+
"For Codex, enable deterministic Coding Friend auto-approve"
|
|
115
|
+
).option(
|
|
116
|
+
"--disable-auto-approve",
|
|
117
|
+
"For Codex, disable deterministic Coding Friend auto-approve"
|
|
104
118
|
).action(async (opts) => {
|
|
105
|
-
const { permissionCommand } = await import("./permission-
|
|
119
|
+
const { permissionCommand } = await import("./permission-VISPGMUK.js");
|
|
106
120
|
await permissionCommand(opts);
|
|
107
121
|
});
|
|
108
122
|
program.command("statusline").description("Setup coding-friend statusline in Claude Code").action(async () => {
|
|
109
|
-
const { statuslineCommand } = await import("./statusline-
|
|
123
|
+
const { statuslineCommand } = await import("./statusline-AOZHEQSV.js");
|
|
110
124
|
await statuslineCommand();
|
|
111
125
|
});
|
|
112
|
-
program.command("update").description("Update coding-friend plugin, CLI, and statusline").option("--cli", "Update only the CLI (npm package)").option("--plugin", "Update only the
|
|
113
|
-
const { updateCommand } = await import("./update-
|
|
126
|
+
program.command("update").description("Update coding-friend plugin, CLI, and statusline").option("--cli", "Update only the CLI (npm package)").option("--plugin", "Update only the host 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").option("--agent <agent>", "Operate on host agent: claude or codex", "claude").option("--codex", "Alias for --agent codex").action(async (opts) => {
|
|
127
|
+
const { updateCommand } = await import("./update-QNUCSDSA.js");
|
|
114
128
|
await updateCommand(opts);
|
|
115
129
|
});
|
|
116
130
|
program.command("status").description("Show comprehensive Coding Friend status").action(async () => {
|
|
117
|
-
const { statusCommand } = await import("./status-
|
|
131
|
+
const { statusCommand } = await import("./status-FVFTJ6GS.js");
|
|
118
132
|
await statusCommand();
|
|
119
133
|
});
|
|
120
134
|
program.command("clean").description("Clean files generated by Coding Friend in docs/").action(async () => {
|
|
121
|
-
const { cleanCommand } = await import("./clean-
|
|
135
|
+
const { cleanCommand } = await import("./clean-YWEMYDE5.js");
|
|
122
136
|
await cleanCommand();
|
|
123
137
|
});
|
|
124
138
|
var session = program.command("session").description("[beta] Save and load Claude Code sessions across machines");
|
|
@@ -133,11 +147,11 @@ session.command("save").description("Save current Claude Code session to sync fo
|
|
|
133
147
|
"-s, --session-id <id>",
|
|
134
148
|
"session UUID to save (default: auto-detect newest)"
|
|
135
149
|
).option("-l, --label <label>", "label for this session").action(async (opts) => {
|
|
136
|
-
const { sessionSaveCommand } = await import("./session-
|
|
150
|
+
const { sessionSaveCommand } = await import("./session-QK6OZO3X.js");
|
|
137
151
|
await sessionSaveCommand(opts);
|
|
138
152
|
});
|
|
139
153
|
session.command("load").description("Load a saved session from sync folder").action(async () => {
|
|
140
|
-
const { sessionLoadCommand } = await import("./session-
|
|
154
|
+
const { sessionLoadCommand } = await import("./session-QK6OZO3X.js");
|
|
141
155
|
await sessionLoadCommand();
|
|
142
156
|
});
|
|
143
157
|
var memory = program.command("memory").description("AI memory system \u2014 store and search project knowledge");
|
|
@@ -157,43 +171,43 @@ Memory subcommands:
|
|
|
157
171
|
memory mcp Show MCP server setup instructions`
|
|
158
172
|
);
|
|
159
173
|
memory.command("status").description("Show memory system status").action(async () => {
|
|
160
|
-
const { memoryStatusCommand } = await import("./memory-
|
|
174
|
+
const { memoryStatusCommand } = await import("./memory-DF7OUOTV.js");
|
|
161
175
|
await memoryStatusCommand();
|
|
162
176
|
});
|
|
163
177
|
memory.command("search").description("Search memories by query").argument("<query>", "search query").action(async (query) => {
|
|
164
|
-
const { memorySearchCommand } = await import("./memory-
|
|
178
|
+
const { memorySearchCommand } = await import("./memory-DF7OUOTV.js");
|
|
165
179
|
await memorySearchCommand(query);
|
|
166
180
|
});
|
|
167
181
|
memory.command("list").description(
|
|
168
182
|
"List memories in current project, or all projects with --projects"
|
|
169
183
|
).option("--projects", "List all project databases with size and metadata").action(async (opts) => {
|
|
170
|
-
const { memoryListCommand } = await import("./memory-
|
|
184
|
+
const { memoryListCommand } = await import("./memory-DF7OUOTV.js");
|
|
171
185
|
await memoryListCommand(opts);
|
|
172
186
|
});
|
|
173
187
|
memory.command("init").description(
|
|
174
188
|
"Initialize memory system \u2014 interactive wizard (first time) or config menu"
|
|
175
189
|
).action(async () => {
|
|
176
|
-
const { memoryInitCommand } = await import("./memory-
|
|
190
|
+
const { memoryInitCommand } = await import("./memory-DF7OUOTV.js");
|
|
177
191
|
await memoryInitCommand();
|
|
178
192
|
});
|
|
179
193
|
memory.command("config").description("Configure memory system settings").action(async () => {
|
|
180
|
-
const { memoryConfigCommand } = await import("./memory-
|
|
194
|
+
const { memoryConfigCommand } = await import("./memory-DF7OUOTV.js");
|
|
181
195
|
await memoryConfigCommand();
|
|
182
196
|
});
|
|
183
197
|
memory.command("start-daemon").description("Start the memory daemon (Tier 2 \u2014 MiniSearch)").action(async () => {
|
|
184
|
-
const { memoryStartDaemonCommand } = await import("./memory-
|
|
198
|
+
const { memoryStartDaemonCommand } = await import("./memory-DF7OUOTV.js");
|
|
185
199
|
await memoryStartDaemonCommand();
|
|
186
200
|
});
|
|
187
201
|
memory.command("stop-daemon").description("Stop the memory daemon").action(async () => {
|
|
188
|
-
const { memoryStopDaemonCommand } = await import("./memory-
|
|
202
|
+
const { memoryStopDaemonCommand } = await import("./memory-DF7OUOTV.js");
|
|
189
203
|
await memoryStopDaemonCommand();
|
|
190
204
|
});
|
|
191
205
|
memory.command("rebuild").description("Rebuild the daemon search index").action(async () => {
|
|
192
|
-
const { memoryRebuildCommand } = await import("./memory-
|
|
206
|
+
const { memoryRebuildCommand } = await import("./memory-DF7OUOTV.js");
|
|
193
207
|
await memoryRebuildCommand();
|
|
194
208
|
});
|
|
195
209
|
memory.command("mcp").description("Show MCP server setup instructions").action(async () => {
|
|
196
|
-
const { memoryMcpCommand } = await import("./memory-
|
|
210
|
+
const { memoryMcpCommand } = await import("./memory-DF7OUOTV.js");
|
|
197
211
|
await memoryMcpCommand();
|
|
198
212
|
});
|
|
199
213
|
memory.command("rm").description("Remove a project database").option("--project-id <id>", "Project ID to remove").option("--all", "Remove all project databases").option(
|
|
@@ -201,17 +215,17 @@ memory.command("rm").description("Remove a project database").option("--project-
|
|
|
201
215
|
"Remove orphaned projects (source dir missing or 0 memories)"
|
|
202
216
|
).action(
|
|
203
217
|
async (opts) => {
|
|
204
|
-
const { memoryRmCommand } = await import("./memory-
|
|
218
|
+
const { memoryRmCommand } = await import("./memory-DF7OUOTV.js");
|
|
205
219
|
await memoryRmCommand(opts);
|
|
206
220
|
}
|
|
207
221
|
);
|
|
208
222
|
var guide = program.command("guide").description("Manage custom skill guides");
|
|
209
223
|
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) => {
|
|
210
|
-
const { guideCreateCommand } = await import("./guide-
|
|
224
|
+
const { guideCreateCommand } = await import("./guide-HCR43LJN.js");
|
|
211
225
|
guideCreateCommand(skillName);
|
|
212
226
|
});
|
|
213
227
|
guide.command("list").description("List existing custom guides").action(async () => {
|
|
214
|
-
const { guideListCommand } = await import("./guide-
|
|
228
|
+
const { guideListCommand } = await import("./guide-HCR43LJN.js");
|
|
215
229
|
guideListCommand();
|
|
216
230
|
});
|
|
217
231
|
var dev = program.command("dev").description("Development mode commands");
|
|
@@ -227,28 +241,28 @@ Dev subcommands:
|
|
|
227
241
|
dev update [path] Update local dev plugin to latest version`
|
|
228
242
|
);
|
|
229
243
|
dev.command("on").description("Switch to local plugin source").argument("[path]", "path to local coding-friend repo (default: cwd)").action(async (path) => {
|
|
230
|
-
const { devOnCommand } = await import("./dev-
|
|
244
|
+
const { devOnCommand } = await import("./dev-PTBNMKZT.js");
|
|
231
245
|
await devOnCommand(path);
|
|
232
246
|
});
|
|
233
247
|
dev.command("off").description("Switch back to remote marketplace").action(async () => {
|
|
234
|
-
const { devOffCommand } = await import("./dev-
|
|
248
|
+
const { devOffCommand } = await import("./dev-PTBNMKZT.js");
|
|
235
249
|
await devOffCommand();
|
|
236
250
|
});
|
|
237
251
|
dev.command("status").description("Show current dev mode").action(async () => {
|
|
238
|
-
const { devStatusCommand } = await import("./dev-
|
|
252
|
+
const { devStatusCommand } = await import("./dev-PTBNMKZT.js");
|
|
239
253
|
await devStatusCommand();
|
|
240
254
|
});
|
|
241
255
|
dev.command("sync").description(
|
|
242
256
|
"Copy local source files to plugin cache (no version bump needed)"
|
|
243
257
|
).action(async () => {
|
|
244
|
-
const { devSyncCommand } = await import("./dev-
|
|
258
|
+
const { devSyncCommand } = await import("./dev-PTBNMKZT.js");
|
|
245
259
|
await devSyncCommand();
|
|
246
260
|
});
|
|
247
261
|
dev.command("restart").description("Reinstall local dev plugin (off + on)").argument(
|
|
248
262
|
"[path]",
|
|
249
263
|
"path to local coding-friend repo (default: saved path or cwd)"
|
|
250
264
|
).action(async (path) => {
|
|
251
|
-
const { devRestartCommand } = await import("./dev-
|
|
265
|
+
const { devRestartCommand } = await import("./dev-PTBNMKZT.js");
|
|
252
266
|
await devRestartCommand(path);
|
|
253
267
|
});
|
|
254
268
|
dev.command("update").description(
|
|
@@ -257,13 +271,13 @@ dev.command("update").description(
|
|
|
257
271
|
"[path]",
|
|
258
272
|
"path to local coding-friend repo (default: saved path or cwd)"
|
|
259
273
|
).action(async (path) => {
|
|
260
|
-
const { devUpdateCommand } = await import("./dev-
|
|
274
|
+
const { devUpdateCommand } = await import("./dev-PTBNMKZT.js");
|
|
261
275
|
await devUpdateCommand(path);
|
|
262
276
|
});
|
|
263
277
|
program.hook("postAction", async () => {
|
|
264
278
|
const topCmd = process.argv[2];
|
|
265
279
|
if (topCmd === "update") return;
|
|
266
|
-
const { checkAndNotifyCliUpdate } = await import("./update-check-
|
|
280
|
+
const { checkAndNotifyCliUpdate } = await import("./update-check-7LKJLJPM.js");
|
|
267
281
|
checkAndNotifyCliUpdate(pkg.version);
|
|
268
282
|
});
|
|
269
283
|
await program.parseAsync();
|
|
@@ -6,24 +6,18 @@ import {
|
|
|
6
6
|
getExistingRules,
|
|
7
7
|
getMissingRules,
|
|
8
8
|
logPluginScriptWarning
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-RCE4OWNX.js";
|
|
10
10
|
import {
|
|
11
11
|
isLearnMcpRegistered,
|
|
12
12
|
registerLearnMcp
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-6NXZKAOV.js";
|
|
14
14
|
import {
|
|
15
15
|
ensureMemoryBuilt,
|
|
16
16
|
isMemoryInitialized,
|
|
17
17
|
memoryInitWizard
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import
|
|
21
|
-
memoryConfigMenu
|
|
22
|
-
} from "./chunk-N4WZWRCI.js";
|
|
23
|
-
import "./chunk-K4WSC62G.js";
|
|
24
|
-
import {
|
|
25
|
-
getLibPath
|
|
26
|
-
} from "./chunk-RZRT7NGT.js";
|
|
18
|
+
} from "./chunk-CGEMETKQ.js";
|
|
19
|
+
import "./chunk-ONG4KRYP.js";
|
|
20
|
+
import "./chunk-RFNKPAJW.js";
|
|
27
21
|
import {
|
|
28
22
|
findStatuslineHookPath,
|
|
29
23
|
getCurrentAccountEmail,
|
|
@@ -34,7 +28,7 @@ import {
|
|
|
34
28
|
saveStatuslineConfig,
|
|
35
29
|
selectStatuslineComponents,
|
|
36
30
|
writeStatuslineSettings
|
|
37
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-ETTZRJ55.js";
|
|
38
32
|
import {
|
|
39
33
|
DEFAULT_CONFIG
|
|
40
34
|
} from "./chunk-3WIZA5OZ.js";
|
|
@@ -42,6 +36,21 @@ import {
|
|
|
42
36
|
ensureShellCompletion,
|
|
43
37
|
hasShellCompletion
|
|
44
38
|
} from "./chunk-667NMPN4.js";
|
|
39
|
+
import {
|
|
40
|
+
isMemoryMcpRegistered,
|
|
41
|
+
memoryConfigMenu,
|
|
42
|
+
registerMemoryMcp
|
|
43
|
+
} from "./chunk-BXSCYGWE.js";
|
|
44
|
+
import {
|
|
45
|
+
getLibPath
|
|
46
|
+
} from "./chunk-RZRT7NGT.js";
|
|
47
|
+
import {
|
|
48
|
+
deployCodexAgents,
|
|
49
|
+
findCodexAgentSourceDir,
|
|
50
|
+
trustCodexProject,
|
|
51
|
+
writeCodexAgentLimits,
|
|
52
|
+
writeCodexMemoryMcpConfig
|
|
53
|
+
} from "./chunk-5QCGEPQO.js";
|
|
45
54
|
import {
|
|
46
55
|
BACK,
|
|
47
56
|
applyDocsDirChange,
|
|
@@ -51,8 +60,9 @@ import {
|
|
|
51
60
|
getMergedValue,
|
|
52
61
|
getScopeLabel,
|
|
53
62
|
injectBackChoice,
|
|
63
|
+
resolveHostFlags,
|
|
54
64
|
showConfigHint
|
|
55
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-GIH6E7GJ.js";
|
|
56
66
|
import {
|
|
57
67
|
commandExists,
|
|
58
68
|
run
|
|
@@ -66,10 +76,11 @@ import {
|
|
|
66
76
|
claudeLocalSettingsPath,
|
|
67
77
|
claudeProjectSettingsPath,
|
|
68
78
|
claudeSettingsPath,
|
|
79
|
+
codexConfigTomlPath,
|
|
69
80
|
globalConfigPath,
|
|
70
81
|
localConfigPath,
|
|
71
82
|
resolvePath
|
|
72
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-PLSJW7QJ.js";
|
|
73
84
|
import {
|
|
74
85
|
log,
|
|
75
86
|
printBanner
|
|
@@ -697,7 +708,7 @@ async function stepAutoApprove(globalCfg, localCfg) {
|
|
|
697
708
|
mergeJson(targetPath, { autoApprove: autoApproveChoice });
|
|
698
709
|
log.success(`Saved to ${targetPath}`);
|
|
699
710
|
if (autoApproveChoice) {
|
|
700
|
-
const { runDangerousRulesAudit } = await import("./permissions-
|
|
711
|
+
const { runDangerousRulesAudit } = await import("./permissions-2SBACQHV.js");
|
|
701
712
|
await runDangerousRulesAudit(
|
|
702
713
|
[
|
|
703
714
|
claudeProjectSettingsPath(),
|
|
@@ -981,7 +992,7 @@ async function initMenu(gitAvailable) {
|
|
|
981
992
|
log.success(`Saved to ${targetPath}`);
|
|
982
993
|
}
|
|
983
994
|
if (autoApproveChoice) {
|
|
984
|
-
const { runDangerousRulesAudit } = await import("./permissions-
|
|
995
|
+
const { runDangerousRulesAudit } = await import("./permissions-2SBACQHV.js");
|
|
985
996
|
await runDangerousRulesAudit(
|
|
986
997
|
[
|
|
987
998
|
claudeProjectSettingsPath(),
|
|
@@ -1047,7 +1058,12 @@ async function initMenu(gitAvailable) {
|
|
|
1047
1058
|
console.log();
|
|
1048
1059
|
}
|
|
1049
1060
|
}
|
|
1050
|
-
async function initCommand() {
|
|
1061
|
+
async function initCommand(opts = {}) {
|
|
1062
|
+
const { host } = resolveHostFlags(opts);
|
|
1063
|
+
if (host === "codex") {
|
|
1064
|
+
initCodexCommand(opts);
|
|
1065
|
+
return;
|
|
1066
|
+
}
|
|
1051
1067
|
_stepIndex = 0;
|
|
1052
1068
|
console.log();
|
|
1053
1069
|
printBanner("\u2728 Coding Friend Setup Wizard \u2728");
|
|
@@ -1166,6 +1182,19 @@ async function initCommand() {
|
|
|
1166
1182
|
);
|
|
1167
1183
|
}
|
|
1168
1184
|
}
|
|
1185
|
+
if (isMemoryMcpRegistered()) {
|
|
1186
|
+
log.dim("coding-friend-memory: already registered (user scope)");
|
|
1187
|
+
log.dim(
|
|
1188
|
+
" (If it points to an old path, run: claude mcp remove --scope user coding-friend-memory && cf mcp)"
|
|
1189
|
+
);
|
|
1190
|
+
} else {
|
|
1191
|
+
const registered = registerMemoryMcp();
|
|
1192
|
+
if (registered) {
|
|
1193
|
+
log.success(
|
|
1194
|
+
"Registered coding-friend-memory (user scope). Restart Claude Code to activate."
|
|
1195
|
+
);
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1169
1198
|
await stepShellCompletion();
|
|
1170
1199
|
await stepStatusline();
|
|
1171
1200
|
await stepMemory(docsDir);
|
|
@@ -1188,6 +1217,95 @@ async function initCommand() {
|
|
|
1188
1217
|
"Available commands: /cf-ask, /cf-plan, /cf-design, /cf-fix, /cf-commit, /cf-review, /cf-review-out, /cf-review-in, /cf-ship, /cf-optimize, /cf-scan, /cf-remember, /cf-learn, /cf-teach, /cf-research, /cf-session, /cf-warm, /cf-help"
|
|
1189
1218
|
);
|
|
1190
1219
|
}
|
|
1220
|
+
function initCodexCommand(opts) {
|
|
1221
|
+
_stepIndex = 0;
|
|
1222
|
+
console.log();
|
|
1223
|
+
printBanner("\u2728 Coding Friend Codex Setup \u2728");
|
|
1224
|
+
console.log();
|
|
1225
|
+
const gitAvailable = isGitRepo();
|
|
1226
|
+
const globalCfg = readJson(globalConfigPath());
|
|
1227
|
+
const localCfg = readJson(localConfigPath());
|
|
1228
|
+
const docsDir = getDocsDir(globalCfg, localCfg);
|
|
1229
|
+
const memoryDir = join(process.cwd(), docsDir, "memory");
|
|
1230
|
+
ensureDocsFolders(docsDir, [
|
|
1231
|
+
"plans",
|
|
1232
|
+
"memory",
|
|
1233
|
+
"research",
|
|
1234
|
+
"sessions",
|
|
1235
|
+
"reviews",
|
|
1236
|
+
"warm"
|
|
1237
|
+
]);
|
|
1238
|
+
if (!existsSync(localConfigPath())) {
|
|
1239
|
+
writeJson(localConfigPath(), {});
|
|
1240
|
+
}
|
|
1241
|
+
const agentsMdPath = join(process.cwd(), "AGENTS.md");
|
|
1242
|
+
if (!existsSync(agentsMdPath)) {
|
|
1243
|
+
writeFileSync(agentsMdPath, renderCodexAgentsMd(), "utf8");
|
|
1244
|
+
log.success("Created AGENTS.md.");
|
|
1245
|
+
if (gitAvailable) {
|
|
1246
|
+
ensureGitignoreEntry("AGENTS.md");
|
|
1247
|
+
}
|
|
1248
|
+
} else {
|
|
1249
|
+
log.dim("AGENTS.md already exists; left unchanged.");
|
|
1250
|
+
}
|
|
1251
|
+
writeCodexAgentLimits(codexConfigTomlPath());
|
|
1252
|
+
log.success("Configured Codex agent depth for nested Coding Friend agents.");
|
|
1253
|
+
const projectCodexDir = join(process.cwd(), ".codex");
|
|
1254
|
+
const projectConfigPath = join(projectCodexDir, "config.toml");
|
|
1255
|
+
writeCodexMemoryMcpConfig(memoryDir, projectConfigPath);
|
|
1256
|
+
log.success("Registered coding-friend-memory in project .codex/config.toml.");
|
|
1257
|
+
const agentSource = findCodexAgentSourceDir();
|
|
1258
|
+
if (agentSource) {
|
|
1259
|
+
const copied = deployCodexAgents(
|
|
1260
|
+
agentSource,
|
|
1261
|
+
join(projectCodexDir, "agents")
|
|
1262
|
+
);
|
|
1263
|
+
log.success(`Deployed ${copied} project Codex agent definition(s).`);
|
|
1264
|
+
} else {
|
|
1265
|
+
log.warn(
|
|
1266
|
+
"Codex agent TOMLs were not found locally yet. Install the plugin from Codex, then rerun cf init --agent codex."
|
|
1267
|
+
);
|
|
1268
|
+
}
|
|
1269
|
+
if (opts.trustProject) {
|
|
1270
|
+
trustCodexProject(process.cwd());
|
|
1271
|
+
log.success("Marked this project trusted in ~/.codex/config.toml.");
|
|
1272
|
+
} else {
|
|
1273
|
+
log.dim(
|
|
1274
|
+
"Project trust was not changed. The project-scoped memory MCP only loads once the project is trusted \u2014 run: cf init --agent codex --trust-project"
|
|
1275
|
+
);
|
|
1276
|
+
}
|
|
1277
|
+
console.log();
|
|
1278
|
+
log.congrats("Codex setup complete!");
|
|
1279
|
+
log.dim("Restart Codex CLI or start a new session to use Coding Friend.");
|
|
1280
|
+
}
|
|
1281
|
+
function renderCodexAgentsMd() {
|
|
1282
|
+
return `# Coding Friend
|
|
1283
|
+
|
|
1284
|
+
Use Coding Friend skills with Codex's $skill syntax.
|
|
1285
|
+
|
|
1286
|
+
## Rules
|
|
1287
|
+
|
|
1288
|
+
1. Verify before claiming done.
|
|
1289
|
+
2. Respect .coding-friend/ignore and project privacy boundaries.
|
|
1290
|
+
3. Use conventional commits without AI attribution.
|
|
1291
|
+
4. Store durable project knowledge in docs/memory/.
|
|
1292
|
+
|
|
1293
|
+
## Skills
|
|
1294
|
+
|
|
1295
|
+
$cf-ask, $cf-plan, $cf-review, $cf-review-out, $cf-review-in, $cf-commit, $cf-design, $cf-ship, $cf-fix, $cf-optimize, $cf-scan, $cf-remember, $cf-learn, $cf-teach, $cf-research, $cf-session, $cf-warm, $cf-help
|
|
1296
|
+
`;
|
|
1297
|
+
}
|
|
1298
|
+
function ensureGitignoreEntry(entry) {
|
|
1299
|
+
const gitignorePath = ".gitignore";
|
|
1300
|
+
const existing = existsSync(gitignorePath) ? readFileSync(gitignorePath, "utf8") : "";
|
|
1301
|
+
if (existing.split(/\n/).includes(entry)) return;
|
|
1302
|
+
const next = existing.endsWith("\n") || existing.length === 0 ? `${existing}${entry}
|
|
1303
|
+
` : `${existing}
|
|
1304
|
+
${entry}
|
|
1305
|
+
`;
|
|
1306
|
+
writeFileSync(gitignorePath, next, "utf8");
|
|
1307
|
+
log.success(`Added ${entry} to .gitignore.`);
|
|
1308
|
+
}
|
|
1191
1309
|
export {
|
|
1192
1310
|
initCommand
|
|
1193
1311
|
};
|