@peppermint-mcp/wizard 0.2.0 → 0.2.3

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.
Files changed (2) hide show
  1. package/dist/cli.js +21 -8
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -128,20 +128,28 @@ import { promisify as promisify2 } from "util";
128
128
  var exec2 = promisify2(execFile2);
129
129
  async function detectCodex() {
130
130
  let version;
131
+ const warnings = [];
131
132
  try {
132
133
  const { stdout } = await exec2("codex", ["--version"], { timeout: 5e3 });
133
134
  version = stdout.trim().split("\n")[0];
134
135
  } catch {
135
136
  return null;
136
137
  }
138
+ let alreadyInstalled = false;
139
+ try {
140
+ const { stdout } = await exec2("codex", ["mcp", "list"], { timeout: 1e4 });
141
+ alreadyInstalled = stdout.includes("peppermint-memory") || stdout.includes("peppermint");
142
+ } catch {
143
+ warnings.push("Could not check existing MCP config");
144
+ }
137
145
  return {
138
146
  id: "codex",
139
147
  name: "Codex CLI",
140
148
  version,
141
149
  installMethod: "cli",
142
- alreadyInstalled: false,
150
+ alreadyInstalled,
143
151
  needsRestart: false,
144
- warnings: []
152
+ warnings
145
153
  };
146
154
  }
147
155
 
@@ -382,6 +390,9 @@ async function installClaudeCode(serverUrl, apiKey, dryRun) {
382
390
  };
383
391
  } catch (err) {
384
392
  const message = err instanceof Error ? err.message : "claude mcp add failed";
393
+ if (message.includes("already exists")) {
394
+ return { success: true, message: "peppermint-memory already configured", needsRestart: false };
395
+ }
385
396
  return { success: false, message, needsRestart: false };
386
397
  }
387
398
  }
@@ -775,21 +786,22 @@ function removeLegacySkills(dryRun) {
775
786
  function installSkills(dryRun) {
776
787
  const bundlePath = getSkillsBundlePath();
777
788
  const targetPath = getTargetPath();
789
+ const alreadyExists = existsSync7(join7(targetPath, "SKILL.md"));
778
790
  if (!existsSync7(bundlePath)) {
779
- return { installed: false, targetPath, error: "Skills bundle not found in package" };
791
+ return { installed: false, updated: false, targetPath, error: "Skills bundle not found in package" };
780
792
  }
781
793
  if (dryRun) {
782
- return { installed: true, targetPath };
794
+ return { installed: true, updated: alreadyExists, targetPath };
783
795
  }
784
796
  try {
785
797
  if (existsSync7(targetPath)) {
786
798
  rmSync(targetPath, { recursive: true, force: true });
787
799
  }
788
800
  copyDirRecursive(bundlePath, targetPath);
789
- return { installed: true, targetPath };
801
+ return { installed: true, updated: alreadyExists, targetPath };
790
802
  } catch (err) {
791
803
  const message = err instanceof Error ? err.message : "Failed to install skills";
792
- return { installed: false, targetPath, error: message };
804
+ return { installed: false, updated: false, targetPath, error: message };
793
805
  }
794
806
  }
795
807
 
@@ -954,7 +966,7 @@ Check your internet connection and try again.`
954
966
  p.log.info(` ${icon} ${host.name} ${pc.dim(result.message)}`);
955
967
  results.push({ host, result });
956
968
  }
957
- const hasClaudeHost = selectedHosts.some(
969
+ const hasClaudeHost = hosts.some(
958
970
  (h) => h.id === "claude-code" || h.id === "claude-desktop"
959
971
  );
960
972
  if (hasClaudeHost) {
@@ -964,7 +976,8 @@ Check your internet connection and try again.`
964
976
  }
965
977
  const skillResult = installSkills(options.dryRun);
966
978
  if (skillResult.installed) {
967
- p.log.info(` ${pc.green("\u2713")} Peppermint skill ${pc.dim(skillResult.targetPath)}`);
979
+ const verb = skillResult.updated ? "Updated" : "Installed";
980
+ p.log.info(` ${pc.green("\u2713")} ${verb} Peppermint skill ${pc.dim(skillResult.targetPath)}`);
968
981
  } else if (skillResult.error) {
969
982
  p.log.info(` ${pc.red("\u2717")} Skill install failed: ${pc.dim(skillResult.error)}`);
970
983
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peppermint-mcp/wizard",
3
- "version": "0.2.0",
3
+ "version": "0.2.3",
4
4
  "description": "One-command installer for Peppermint MCP across AI coding hosts",
5
5
  "type": "module",
6
6
  "bin": {