coding-friend-cli 1.12.0 → 1.12.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.
@@ -7,12 +7,13 @@ import {
7
7
  } from "./chunk-KJUGTLPQ.js";
8
8
  import {
9
9
  resolveScope
10
- } from "./chunk-EMAINEYB.js";
10
+ } from "./chunk-PYRGNY5P.js";
11
11
  import {
12
12
  commandExists,
13
13
  run,
14
+ runWithStderr,
14
15
  sleepSync
15
- } from "./chunk-UFGNO6CW.js";
16
+ } from "./chunk-X5WEODUD.js";
16
17
  import {
17
18
  claudeSettingsPath,
18
19
  readJson
@@ -156,24 +157,35 @@ async function updateCommand(opts) {
156
157
  if (scope) {
157
158
  updateArgs.push("--scope", scope);
158
159
  }
159
- const result = run("claude", updateArgs);
160
- if (result === null) {
160
+ const result = runWithStderr("claude", updateArgs);
161
+ if (result.exitCode !== 0) {
161
162
  log.error(
162
163
  "Plugin update failed. Try manually: claude plugin update coding-friend@coding-friend-marketplace"
163
164
  );
165
+ if (result.stderr) {
166
+ log.dim(`stderr: ${result.stderr}`);
167
+ }
164
168
  } else {
165
- log.success("Plugin updated!");
166
169
  let newVersion = currentVersion;
167
- for (let i = 0; i < 5; i++) {
170
+ for (let i = 0; i < 3; i++) {
168
171
  newVersion = getInstalledVersion();
169
172
  if (newVersion !== currentVersion) break;
170
- if (i < 4) sleepSync(1e3);
173
+ if (i < 2) sleepSync(1e3);
171
174
  }
172
175
  if (newVersion !== currentVersion) {
173
176
  log.success(`Plugin updated to ${chalk.green(`v${newVersion}`)}`);
174
177
  } else {
175
178
  log.warn(
176
- "Version in installed_plugins.json unchanged. Cache may still have been updated."
179
+ "Plugin command succeeded but version in installed_plugins.json is still unchanged."
180
+ );
181
+ if (result.stdout) {
182
+ log.dim(`stdout: ${result.stdout}`);
183
+ }
184
+ if (result.stderr) {
185
+ log.dim(`stderr: ${result.stderr}`);
186
+ }
187
+ log.dim(
188
+ "Try manually: claude plugin update coding-friend@coding-friend-marketplace"
177
189
  );
178
190
  }
179
191
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  run
3
- } from "./chunk-UFGNO6CW.js";
3
+ } from "./chunk-X5WEODUD.js";
4
4
  import {
5
5
  globalConfigPath,
6
6
  localConfigPath,
@@ -11,6 +11,23 @@ function run(cmd, args = [], opts) {
11
11
  return null;
12
12
  }
13
13
  }
14
+ function runWithStderr(cmd, args = [], opts) {
15
+ try {
16
+ const stdout = execFileSync(cmd, args, {
17
+ encoding: "utf-8",
18
+ cwd: opts?.cwd,
19
+ stdio: ["pipe", "pipe", "pipe"]
20
+ }).trim();
21
+ return { stdout, stderr: "", exitCode: 0 };
22
+ } catch (err) {
23
+ const e = err;
24
+ return {
25
+ stdout: (e.stdout ?? "").toString().trim(),
26
+ stderr: (e.stderr ?? "").toString().trim(),
27
+ exitCode: e.status ?? 1
28
+ };
29
+ }
30
+ }
14
31
  function streamExec(cmd, args, opts) {
15
32
  return new Promise((resolve, reject) => {
16
33
  const child = spawn(cmd, args, {
@@ -30,6 +47,7 @@ function commandExists(cmd) {
30
47
 
31
48
  export {
32
49
  run,
50
+ runWithStderr,
33
51
  streamExec,
34
52
  sleepSync,
35
53
  commandExists
@@ -23,10 +23,10 @@ import {
23
23
  getScopeLabel,
24
24
  injectBackChoice,
25
25
  showConfigHint
26
- } from "./chunk-EMAINEYB.js";
26
+ } from "./chunk-PYRGNY5P.js";
27
27
  import {
28
28
  run
29
- } from "./chunk-UFGNO6CW.js";
29
+ } from "./chunk-X5WEODUD.js";
30
30
  import {
31
31
  globalConfigPath,
32
32
  localConfigPath,
@@ -12,7 +12,7 @@ import {
12
12
  import {
13
13
  commandExists,
14
14
  run
15
- } from "./chunk-UFGNO6CW.js";
15
+ } from "./chunk-X5WEODUD.js";
16
16
  import {
17
17
  devStatePath,
18
18
  knownMarketplacesPath,
@@ -4,8 +4,8 @@ import {
4
4
  } from "./chunk-ZOOFPF5I.js";
5
5
  import {
6
6
  resolveScope
7
- } from "./chunk-EMAINEYB.js";
8
- import "./chunk-UFGNO6CW.js";
7
+ } from "./chunk-PYRGNY5P.js";
8
+ import "./chunk-X5WEODUD.js";
9
9
  import "./chunk-RWUTFVRB.js";
10
10
  import {
11
11
  log
@@ -4,8 +4,8 @@ import {
4
4
  } from "./chunk-ZOOFPF5I.js";
5
5
  import {
6
6
  resolveScope
7
- } from "./chunk-EMAINEYB.js";
8
- import "./chunk-UFGNO6CW.js";
7
+ } from "./chunk-PYRGNY5P.js";
8
+ import "./chunk-X5WEODUD.js";
9
9
  import "./chunk-RWUTFVRB.js";
10
10
  import {
11
11
  log
@@ -8,7 +8,7 @@ import "./chunk-PGLUEN7D.js";
8
8
  import {
9
9
  run,
10
10
  streamExec
11
- } from "./chunk-UFGNO6CW.js";
11
+ } from "./chunk-X5WEODUD.js";
12
12
  import "./chunk-RWUTFVRB.js";
13
13
  import {
14
14
  log
package/dist/index.js CHANGED
@@ -14,35 +14,35 @@ 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-FEOOFN4G.js");
17
+ const { installCommand } = await import("./install-5P2S6XVC.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-2SYDCOAP.js");
21
+ const { uninstallCommand } = await import("./uninstall-7SX73XM5.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-3N2NCMTU.js");
25
+ const { disableCommand } = await import("./disable-4CD623UW.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-EGG6LTXD.js");
29
+ const { enableCommand } = await import("./enable-QTUP4MMY.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-2LMIUWUY.js");
33
+ const { initCommand } = await import("./init-SIZ5RXE7.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-PTMK6XBN.js");
37
+ const { configCommand } = await import("./config-F6QRCOYP.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-XHBUWGAW.js");
41
+ const { hostCommand } = await import("./host-D3GAQ4BW.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-XE6NZRPD.js");
45
+ const { mcpCommand } = await import("./mcp-H42K6Y6T.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").action(async (opts) => {
@@ -54,7 +54,7 @@ program.command("statusline").description("Setup coding-friend statusline in Cla
54
54
  await statuslineCommand();
55
55
  });
56
56
  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) => {
57
- const { updateCommand } = await import("./update-4MNVBTI5.js");
57
+ const { updateCommand } = await import("./update-VZZ3SNCZ.js");
58
58
  await updateCommand(opts);
59
59
  });
60
60
  var session = program.command("session").description("Save and load Claude Code sessions across machines");
@@ -89,35 +89,35 @@ Dev subcommands:
89
89
  dev update [path] Update local dev plugin to latest version`
90
90
  );
91
91
  dev.command("on").description("Switch to local plugin source").argument("[path]", "path to local coding-friend repo (default: cwd)").action(async (path) => {
92
- const { devOnCommand } = await import("./dev-UBYW6NRX.js");
92
+ const { devOnCommand } = await import("./dev-DIWT3AAU.js");
93
93
  await devOnCommand(path);
94
94
  });
95
95
  dev.command("off").description("Switch back to remote marketplace").action(async () => {
96
- const { devOffCommand } = await import("./dev-UBYW6NRX.js");
96
+ const { devOffCommand } = await import("./dev-DIWT3AAU.js");
97
97
  await devOffCommand();
98
98
  });
99
99
  dev.command("status").description("Show current dev mode").action(async () => {
100
- const { devStatusCommand } = await import("./dev-UBYW6NRX.js");
100
+ const { devStatusCommand } = await import("./dev-DIWT3AAU.js");
101
101
  await devStatusCommand();
102
102
  });
103
103
  dev.command("sync").description(
104
104
  "Copy local source files to plugin cache (no version bump needed)"
105
105
  ).action(async () => {
106
- const { devSyncCommand } = await import("./dev-UBYW6NRX.js");
106
+ const { devSyncCommand } = await import("./dev-DIWT3AAU.js");
107
107
  await devSyncCommand();
108
108
  });
109
109
  dev.command("restart").description("Reinstall local dev plugin (off + on)").argument(
110
110
  "[path]",
111
111
  "path to local coding-friend repo (default: saved path or cwd)"
112
112
  ).action(async (path) => {
113
- const { devRestartCommand } = await import("./dev-UBYW6NRX.js");
113
+ const { devRestartCommand } = await import("./dev-DIWT3AAU.js");
114
114
  await devRestartCommand(path);
115
115
  });
116
116
  dev.command("update").description("Update local dev plugin to latest version (off + on)").argument(
117
117
  "[path]",
118
118
  "path to local coding-friend repo (default: saved path or cwd)"
119
119
  ).action(async (path) => {
120
- const { devUpdateCommand } = await import("./dev-UBYW6NRX.js");
120
+ const { devUpdateCommand } = await import("./dev-DIWT3AAU.js");
121
121
  await devUpdateCommand(path);
122
122
  });
123
123
  program.parse();
@@ -27,10 +27,10 @@ import {
27
27
  getScopeLabel,
28
28
  injectBackChoice,
29
29
  showConfigHint
30
- } from "./chunk-EMAINEYB.js";
30
+ } from "./chunk-PYRGNY5P.js";
31
31
  import {
32
32
  run
33
- } from "./chunk-UFGNO6CW.js";
33
+ } from "./chunk-X5WEODUD.js";
34
34
  import {
35
35
  claudeSettingsPath,
36
36
  globalConfigPath,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getLatestVersion,
3
3
  semverCompare
4
- } from "./chunk-YZ7IZ46F.js";
4
+ } from "./chunk-E76PLDNS.js";
5
5
  import {
6
6
  isMarketplaceRegistered,
7
7
  isPluginDisabled
@@ -15,11 +15,11 @@ import {
15
15
  } from "./chunk-KJUGTLPQ.js";
16
16
  import {
17
17
  resolveScope
18
- } from "./chunk-EMAINEYB.js";
18
+ } from "./chunk-PYRGNY5P.js";
19
19
  import {
20
20
  commandExists,
21
21
  run
22
- } from "./chunk-UFGNO6CW.js";
22
+ } from "./chunk-X5WEODUD.js";
23
23
  import {
24
24
  devStatePath
25
25
  } from "./chunk-RWUTFVRB.js";
@@ -7,7 +7,7 @@ import {
7
7
  import "./chunk-PGLUEN7D.js";
8
8
  import {
9
9
  run
10
- } from "./chunk-UFGNO6CW.js";
10
+ } from "./chunk-X5WEODUD.js";
11
11
  import "./chunk-RWUTFVRB.js";
12
12
  import {
13
13
  log
@@ -8,11 +8,11 @@ import {
8
8
  } from "./chunk-KJUGTLPQ.js";
9
9
  import {
10
10
  resolveScope
11
- } from "./chunk-EMAINEYB.js";
11
+ } from "./chunk-PYRGNY5P.js";
12
12
  import {
13
13
  commandExists,
14
14
  run
15
- } from "./chunk-UFGNO6CW.js";
15
+ } from "./chunk-X5WEODUD.js";
16
16
  import {
17
17
  claudeSettingsPath,
18
18
  devStatePath,
@@ -2,12 +2,12 @@ import {
2
2
  getLatestVersion,
3
3
  semverCompare,
4
4
  updateCommand
5
- } from "./chunk-YZ7IZ46F.js";
5
+ } from "./chunk-E76PLDNS.js";
6
6
  import "./chunk-QG6XYVJU.js";
7
7
  import "./chunk-PGLUEN7D.js";
8
8
  import "./chunk-KJUGTLPQ.js";
9
- import "./chunk-EMAINEYB.js";
10
- import "./chunk-UFGNO6CW.js";
9
+ import "./chunk-PYRGNY5P.js";
10
+ import "./chunk-X5WEODUD.js";
11
11
  import "./chunk-RWUTFVRB.js";
12
12
  import "./chunk-W5CD7WTX.js";
13
13
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coding-friend-cli",
3
- "version": "1.12.0",
3
+ "version": "1.12.1",
4
4
  "description": "CLI for coding-friend — host learning docs, setup MCP server, initialize projects",
5
5
  "type": "module",
6
6
  "bin": {