@peppermint-mcp/wizard 0.2.0 → 0.2.2
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/dist/cli.js +18 -8
- 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
|
|
150
|
+
alreadyInstalled,
|
|
143
151
|
needsRestart: false,
|
|
144
|
-
warnings
|
|
152
|
+
warnings
|
|
145
153
|
};
|
|
146
154
|
}
|
|
147
155
|
|
|
@@ -775,21 +783,22 @@ function removeLegacySkills(dryRun) {
|
|
|
775
783
|
function installSkills(dryRun) {
|
|
776
784
|
const bundlePath = getSkillsBundlePath();
|
|
777
785
|
const targetPath = getTargetPath();
|
|
786
|
+
const alreadyExists = existsSync7(join7(targetPath, "SKILL.md"));
|
|
778
787
|
if (!existsSync7(bundlePath)) {
|
|
779
|
-
return { installed: false, targetPath, error: "Skills bundle not found in package" };
|
|
788
|
+
return { installed: false, updated: false, targetPath, error: "Skills bundle not found in package" };
|
|
780
789
|
}
|
|
781
790
|
if (dryRun) {
|
|
782
|
-
return { installed: true, targetPath };
|
|
791
|
+
return { installed: true, updated: alreadyExists, targetPath };
|
|
783
792
|
}
|
|
784
793
|
try {
|
|
785
794
|
if (existsSync7(targetPath)) {
|
|
786
795
|
rmSync(targetPath, { recursive: true, force: true });
|
|
787
796
|
}
|
|
788
797
|
copyDirRecursive(bundlePath, targetPath);
|
|
789
|
-
return { installed: true, targetPath };
|
|
798
|
+
return { installed: true, updated: alreadyExists, targetPath };
|
|
790
799
|
} catch (err) {
|
|
791
800
|
const message = err instanceof Error ? err.message : "Failed to install skills";
|
|
792
|
-
return { installed: false, targetPath, error: message };
|
|
801
|
+
return { installed: false, updated: false, targetPath, error: message };
|
|
793
802
|
}
|
|
794
803
|
}
|
|
795
804
|
|
|
@@ -954,7 +963,7 @@ Check your internet connection and try again.`
|
|
|
954
963
|
p.log.info(` ${icon} ${host.name} ${pc.dim(result.message)}`);
|
|
955
964
|
results.push({ host, result });
|
|
956
965
|
}
|
|
957
|
-
const hasClaudeHost =
|
|
966
|
+
const hasClaudeHost = hosts.some(
|
|
958
967
|
(h) => h.id === "claude-code" || h.id === "claude-desktop"
|
|
959
968
|
);
|
|
960
969
|
if (hasClaudeHost) {
|
|
@@ -964,7 +973,8 @@ Check your internet connection and try again.`
|
|
|
964
973
|
}
|
|
965
974
|
const skillResult = installSkills(options.dryRun);
|
|
966
975
|
if (skillResult.installed) {
|
|
967
|
-
|
|
976
|
+
const verb = skillResult.updated ? "Updated" : "Installed";
|
|
977
|
+
p.log.info(` ${pc.green("\u2713")} ${verb} Peppermint skill ${pc.dim(skillResult.targetPath)}`);
|
|
968
978
|
} else if (skillResult.error) {
|
|
969
979
|
p.log.info(` ${pc.red("\u2717")} Skill install failed: ${pc.dim(skillResult.error)}`);
|
|
970
980
|
}
|