coding-friend-cli 1.20.0 → 1.20.1
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 +1 -1
- package/dist/{chunk-WEMDLEK5.js → chunk-V23HBD3E.js} +1 -1
- package/dist/{config-UQXY45DN.js → config-RLSM3UAF.js} +1 -1
- package/dist/index.js +12 -12
- package/dist/{memory-47RXG7VL.js → memory-N6Q2ENBI.js} +1 -1
- package/dist/{status-SENJZQ3G.js → status-WK3TBDN7.js} +3 -1
- package/lib/cf-memory/CHANGELOG.md +4 -0
- package/lib/cf-memory/README.md +9 -9
- package/lib/cf-memory/package.json +1 -1
- package/lib/cf-memory/src/__tests__/tier.test.ts +15 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ CLI companion for the [coding-friend](https://github.com/dinhanhthi/coding-frien
|
|
|
4
4
|
|
|
5
5
|
## Requirements
|
|
6
6
|
|
|
7
|
-
- Node.js >=
|
|
7
|
+
- Node.js >= 20
|
|
8
8
|
- npm (included with Node.js, but on some Linux distros you may need to install it separately)
|
|
9
9
|
- The [coding-friend plugin](https://github.com/dinhanhthi/coding-friend) installed in Claude Code
|
|
10
10
|
|
|
@@ -106,7 +106,7 @@ async function editMemoryAutoStart(globalCfg, localCfg) {
|
|
|
106
106
|
}
|
|
107
107
|
const value = await confirm({
|
|
108
108
|
message: "Auto-start memory daemon when MCP server connects?",
|
|
109
|
-
default: currentValue ??
|
|
109
|
+
default: currentValue ?? true
|
|
110
110
|
});
|
|
111
111
|
const scope = await askScope();
|
|
112
112
|
if (scope === "back") return;
|
package/dist/index.js
CHANGED
|
@@ -34,7 +34,7 @@ program.command("init").description("Initialize coding-friend in current project
|
|
|
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-RLSM3UAF.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) => {
|
|
@@ -61,7 +61,7 @@ program.command("update").description("Update coding-friend plugin, CLI, and sta
|
|
|
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-
|
|
64
|
+
const { statusCommand } = await import("./status-WK3TBDN7.js");
|
|
65
65
|
await statusCommand();
|
|
66
66
|
});
|
|
67
67
|
var session = program.command("session").description("Save and load Claude Code sessions across machines");
|
|
@@ -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-
|
|
103
|
+
const { memoryStatusCommand } = await import("./memory-N6Q2ENBI.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-
|
|
107
|
+
const { memorySearchCommand } = await import("./memory-N6Q2ENBI.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-
|
|
113
|
+
const { memoryListCommand } = await import("./memory-N6Q2ENBI.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-
|
|
119
|
+
const { memoryInitCommand } = await import("./memory-N6Q2ENBI.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-
|
|
123
|
+
const { memoryConfigCommand } = await import("./memory-N6Q2ENBI.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-
|
|
127
|
+
const { memoryStartDaemonCommand } = await import("./memory-N6Q2ENBI.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-
|
|
131
|
+
const { memoryStopDaemonCommand } = await import("./memory-N6Q2ENBI.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-
|
|
135
|
+
const { memoryRebuildCommand } = await import("./memory-N6Q2ENBI.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-
|
|
139
|
+
const { memoryMcpCommand } = await import("./memory-N6Q2ENBI.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-
|
|
147
|
+
const { memoryRmCommand } = await import("./memory-N6Q2ENBI.js");
|
|
148
148
|
await memoryRmCommand(opts);
|
|
149
149
|
}
|
|
150
150
|
);
|
|
@@ -77,7 +77,9 @@ function printConfig(obj, otherConfig) {
|
|
|
77
77
|
for (const [key, value] of Object.entries(obj)) {
|
|
78
78
|
const overrides = otherConfig && key in otherConfig ? ` ${chalk.yellow("(overrides global)")}` : "";
|
|
79
79
|
if (typeof value === "object" && value !== null && !Array.isArray(value)) {
|
|
80
|
-
console.log(
|
|
80
|
+
console.log(
|
|
81
|
+
pad(key, CONFIG_KEY_COL, chalk.cyan) + chalk.dim("\u2500") + overrides
|
|
82
|
+
);
|
|
81
83
|
const nested = value;
|
|
82
84
|
const nestedOther = otherConfig && typeof otherConfig[key] === "object" ? otherConfig[key] : null;
|
|
83
85
|
for (const [subKey, subVal] of Object.entries(nested)) {
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# CF Memory Changelog
|
|
2
2
|
|
|
3
|
+
## v0.2.1 (2026-03-22)
|
|
4
|
+
|
|
5
|
+
- Fix flaky tier detection tests — mock `isDaemonRunning` to prevent local daemon from affecting test results [#d786f08](https://github.com/dinhanhthi/coding-friend/commit/d786f08)
|
|
6
|
+
|
|
3
7
|
## v0.2.0 (2026-03-21)
|
|
4
8
|
|
|
5
9
|
- Add `index_only` option to `memory_store` MCP tool — skip file writing when file already exists on disk, enabling clean separation between file creation and indexing [#7f56711](https://github.com/dinhanhthi/coding-friend/commit/7f56711)
|
package/lib/cf-memory/README.md
CHANGED
|
@@ -257,16 +257,16 @@ Users don't need to manually configure the MCP server. `cf init` includes a "CF
|
|
|
257
257
|
|
|
258
258
|
The `cf` CLI exposes memory commands that use this package:
|
|
259
259
|
|
|
260
|
-
| Command | Description
|
|
261
|
-
| -------------------------- |
|
|
262
|
-
| `cf memory status` | Show current tier, daemon status, memory count
|
|
263
|
-
| `cf memory search <query>` | Search memories from the terminal
|
|
264
|
-
| `cf memory list` | List all stored memories
|
|
265
|
-
| `cf memory start-daemon` | Start the MiniSearch daemon (Tier 2)
|
|
266
|
-
| `cf memory stop-daemon` | Stop the daemon
|
|
267
|
-
| `cf memory rebuild` | Rebuild search index (Tier 1 direct or via daemon)
|
|
260
|
+
| Command | Description |
|
|
261
|
+
| -------------------------- | -------------------------------------------------------------------------------------------------------------------- |
|
|
262
|
+
| `cf memory status` | Show current tier, daemon status, memory count |
|
|
263
|
+
| `cf memory search <query>` | Search memories from the terminal |
|
|
264
|
+
| `cf memory list` | List all stored memories |
|
|
265
|
+
| `cf memory start-daemon` | Start the MiniSearch daemon (Tier 2) |
|
|
266
|
+
| `cf memory stop-daemon` | Stop the daemon |
|
|
267
|
+
| `cf memory rebuild` | Rebuild search index (Tier 1 direct or via daemon) |
|
|
268
268
|
| `cf memory init` | Install Tier 1 deps + import existing memories into SQLite (see [prerequisites](#prerequisites-for-tier-1-on-linux)) |
|
|
269
|
-
| `cf memory mcp` | Print MCP server config for use in Claude Desktop / other clients
|
|
269
|
+
| `cf memory mcp` | Print MCP server config for use in Claude Desktop / other clients |
|
|
270
270
|
|
|
271
271
|
## Prerequisites for Tier 1 on Linux
|
|
272
272
|
|
|
@@ -24,6 +24,10 @@ describe("detectTier()", () => {
|
|
|
24
24
|
const sqliteSpy = vi
|
|
25
25
|
.spyOn(lazyInstall, "areSqliteDepsAvailable")
|
|
26
26
|
.mockReturnValue(false);
|
|
27
|
+
const daemonProcess = await import("../daemon/process.js");
|
|
28
|
+
const daemonSpy = vi
|
|
29
|
+
.spyOn(daemonProcess, "isDaemonRunning")
|
|
30
|
+
.mockResolvedValue(false);
|
|
27
31
|
try {
|
|
28
32
|
const tier = await detectTier();
|
|
29
33
|
// Without a daemon running and no SQLite deps, should detect Tier 3
|
|
@@ -32,6 +36,7 @@ describe("detectTier()", () => {
|
|
|
32
36
|
expect(tier.label).toContain("Tier 3");
|
|
33
37
|
} finally {
|
|
34
38
|
sqliteSpy.mockRestore();
|
|
39
|
+
daemonSpy.mockRestore();
|
|
35
40
|
}
|
|
36
41
|
});
|
|
37
42
|
|
|
@@ -58,11 +63,16 @@ describe("detectTier()", () => {
|
|
|
58
63
|
const sqliteSpy = vi
|
|
59
64
|
.spyOn(lazyInstall, "areSqliteDepsAvailable")
|
|
60
65
|
.mockReturnValue(false);
|
|
66
|
+
const daemonProcess = await import("../daemon/process.js");
|
|
67
|
+
const daemonSpy = vi
|
|
68
|
+
.spyOn(daemonProcess, "isDaemonRunning")
|
|
69
|
+
.mockResolvedValue(false);
|
|
61
70
|
try {
|
|
62
71
|
const tier = await detectTier("auto");
|
|
63
72
|
expect(tier.name).toBe("markdown");
|
|
64
73
|
} finally {
|
|
65
74
|
sqliteSpy.mockRestore();
|
|
75
|
+
daemonSpy.mockRestore();
|
|
66
76
|
}
|
|
67
77
|
});
|
|
68
78
|
|
|
@@ -114,6 +124,10 @@ describe("createBackendForTier()", () => {
|
|
|
114
124
|
const sqliteSpy = vi
|
|
115
125
|
.spyOn(lazyInstall, "areSqliteDepsAvailable")
|
|
116
126
|
.mockReturnValue(false);
|
|
127
|
+
const daemonProcess = await import("../daemon/process.js");
|
|
128
|
+
const daemonSpy = vi
|
|
129
|
+
.spyOn(daemonProcess, "isDaemonRunning")
|
|
130
|
+
.mockResolvedValue(false);
|
|
117
131
|
try {
|
|
118
132
|
const { backend, tier } = await createBackendForTier(testDir, "auto");
|
|
119
133
|
expect(tier.name).toBe("markdown");
|
|
@@ -121,6 +135,7 @@ describe("createBackendForTier()", () => {
|
|
|
121
135
|
await backend.close();
|
|
122
136
|
} finally {
|
|
123
137
|
sqliteSpy.mockRestore();
|
|
138
|
+
daemonSpy.mockRestore();
|
|
124
139
|
}
|
|
125
140
|
});
|
|
126
141
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "coding-friend-cli",
|
|
3
|
-
"version": "1.20.
|
|
3
|
+
"version": "1.20.1",
|
|
4
4
|
"description": "CLI for coding-friend — host learning docs, setup MCP server, initialize projects",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
10
|
"build": "tsup src/index.ts src/postinstall.ts --format esm --dts --clean",
|
|
11
|
-
"postinstall": "
|
|
11
|
+
"postinstall": "node -e \"import('./dist/postinstall.js').catch(()=>{})\"",
|
|
12
12
|
"prepublishOnly": "npm run build",
|
|
13
13
|
"dev": "tsx src/index.ts",
|
|
14
14
|
"watch": "tsup src/index.ts src/postinstall.ts --format esm --dts --watch",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"directory": "cli"
|
|
39
39
|
},
|
|
40
40
|
"engines": {
|
|
41
|
-
"node": ">=
|
|
41
|
+
"node": ">=20"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@inquirer/prompts": "^7.0.0",
|