coding-friend-cli 1.9.1 → 1.11.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.
@@ -1,11 +1,14 @@
1
1
  import {
2
2
  isMarketplaceRegistered,
3
3
  isPluginInstalled
4
- } from "./chunk-HFLBFX6J.js";
4
+ } from "./chunk-E2XX5MIM.js";
5
+ import {
6
+ resolveScope
7
+ } from "./chunk-GJLNN6X5.js";
5
8
  import {
6
9
  hasShellCompletion,
7
10
  removeShellCompletion
8
- } from "./chunk-7N64TDZ6.js";
11
+ } from "./chunk-4JL3SR5V.js";
9
12
  import {
10
13
  commandExists,
11
14
  run
@@ -18,7 +21,7 @@ import {
18
21
  marketplaceClonePath,
19
22
  readJson,
20
23
  writeJson
21
- } from "./chunk-TPRZHSFS.js";
24
+ } from "./chunk-ZS7BLEYT.js";
22
25
  import {
23
26
  log
24
27
  } from "./chunk-W5CD7WTX.js";
@@ -76,7 +79,43 @@ function displayDetection(d) {
76
79
  function nothingToRemove(d) {
77
80
  return !d.pluginInstalled && !d.marketplaceRegistered && !d.cacheExists && !d.cloneExists && !d.statuslineConfigured && !d.shellCompletionExists && !d.globalConfigExists;
78
81
  }
79
- async function uninstallCommand() {
82
+ async function uninstallScoped(scope) {
83
+ const proceed = await confirm({
84
+ message: `Uninstall Coding Friend from ${chalk.cyan(scope)} scope?`,
85
+ default: false
86
+ });
87
+ if (!proceed) {
88
+ log.info("Uninstall cancelled.");
89
+ return;
90
+ }
91
+ log.step(`Uninstalling plugin from ${scope} scope...`);
92
+ const result = run("claude", [
93
+ "plugin",
94
+ "uninstall",
95
+ PLUGIN_ID,
96
+ "--scope",
97
+ scope
98
+ ]);
99
+ if (result === null) {
100
+ const fallback = run("claude", [
101
+ "plugin",
102
+ "uninstall",
103
+ PLUGIN_NAME,
104
+ "--scope",
105
+ scope
106
+ ]);
107
+ if (fallback === null) {
108
+ log.warn(
109
+ "Could not uninstall plugin (may not be installed at this scope)."
110
+ );
111
+ return;
112
+ }
113
+ }
114
+ log.success(`Plugin uninstalled from ${scope} scope.`);
115
+ console.log();
116
+ log.dim("Restart Claude Code to complete the uninstall.");
117
+ }
118
+ async function uninstallCommand(opts = {}) {
80
119
  console.log(`
81
120
  === \u{1F44B} ${chalk.red("Coding Friend Uninstall")} \u{1F44B} ===`);
82
121
  if (!commandExists("claude")) {
@@ -86,12 +125,17 @@ async function uninstallCommand() {
86
125
  );
87
126
  return;
88
127
  }
89
- const detection = detect();
90
- if (detection.devModeActive) {
128
+ if (existsSync(devStatePath())) {
91
129
  log.warn("Dev mode is currently active.");
92
130
  log.dim(`Run ${chalk.bold("cf dev off")} first, then try again.`);
93
131
  return;
94
132
  }
133
+ const scope = await resolveScope(opts);
134
+ if (scope === "project" || scope === "local") {
135
+ await uninstallScoped(scope);
136
+ return;
137
+ }
138
+ const detection = detect();
95
139
  if (nothingToRemove(detection)) {
96
140
  log.info("Nothing to uninstall \u2014 Coding Friend is not installed.");
97
141
  return;
@@ -2,12 +2,13 @@ import {
2
2
  getLatestVersion,
3
3
  semverCompare,
4
4
  updateCommand
5
- } from "./chunk-VYMXERKM.js";
6
- import "./chunk-BPLN4LDL.js";
7
- import "./chunk-7N64TDZ6.js";
5
+ } from "./chunk-RN5UYDIT.js";
6
+ import "./chunk-HYLS67T7.js";
7
+ import "./chunk-GJLNN6X5.js";
8
+ import "./chunk-4JL3SR5V.js";
8
9
  import "./chunk-PGLUEN7D.js";
9
10
  import "./chunk-UFGNO6CW.js";
10
- import "./chunk-TPRZHSFS.js";
11
+ import "./chunk-ZS7BLEYT.js";
11
12
  import "./chunk-W5CD7WTX.js";
12
13
  export {
13
14
  getLatestVersion,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coding-friend-cli",
3
- "version": "1.9.1",
3
+ "version": "1.11.0",
4
4
  "description": "CLI for coding-friend — host learning docs, setup MCP server, initialize projects",
5
5
  "type": "module",
6
6
  "bin": {