spets 0.2.2 → 0.2.4
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/index.js +13 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -104,8 +104,7 @@ async function installPlugin(name) {
|
|
|
104
104
|
installer();
|
|
105
105
|
}
|
|
106
106
|
function installClaudePlugin() {
|
|
107
|
-
const
|
|
108
|
-
const commandsDir = join(claudeDir, "commands");
|
|
107
|
+
const commandsDir = join(process.cwd(), ".claude", "commands");
|
|
109
108
|
mkdirSync(commandsDir, { recursive: true });
|
|
110
109
|
const skillPath = join(commandsDir, "spets.md");
|
|
111
110
|
writeFileSync(skillPath, getClaudeSkillContent());
|
|
@@ -148,13 +147,18 @@ function installGeminiPlugin() {
|
|
|
148
147
|
}
|
|
149
148
|
async function uninstallPlugin(name) {
|
|
150
149
|
if (name === "claude") {
|
|
151
|
-
const skillPath = join(
|
|
150
|
+
const skillPath = join(process.cwd(), ".claude", "commands", "spets.md");
|
|
151
|
+
const globalSkillPath = join(homedir(), ".claude", "commands", "spets.md");
|
|
152
152
|
const legacySkillPath = join(homedir(), ".claude", "commands", "sdd-do.md");
|
|
153
153
|
let uninstalled = false;
|
|
154
154
|
if (existsSync(skillPath)) {
|
|
155
155
|
rmSync(skillPath);
|
|
156
156
|
uninstalled = true;
|
|
157
157
|
}
|
|
158
|
+
if (existsSync(globalSkillPath)) {
|
|
159
|
+
rmSync(globalSkillPath);
|
|
160
|
+
uninstalled = true;
|
|
161
|
+
}
|
|
158
162
|
if (existsSync(legacySkillPath)) {
|
|
159
163
|
rmSync(legacySkillPath);
|
|
160
164
|
uninstalled = true;
|
|
@@ -241,13 +245,14 @@ async function uninstallPlugin(name) {
|
|
|
241
245
|
async function listPlugins() {
|
|
242
246
|
console.log("Available plugins:");
|
|
243
247
|
console.log("");
|
|
244
|
-
console.log(" claude - Claude Code /spets skill (
|
|
248
|
+
console.log(" claude - Claude Code /spets skill (project-level)");
|
|
245
249
|
console.log(" codex - Codex CLI $spets skill (project-level)");
|
|
246
250
|
console.log(" gemini - Gemini CLI spets skill (project-level)");
|
|
247
251
|
console.log("");
|
|
248
|
-
const
|
|
252
|
+
const claudeProjectPath = join(process.cwd(), ".claude", "commands", "spets.md");
|
|
253
|
+
const claudeGlobalPath = join(homedir(), ".claude", "commands", "spets.md");
|
|
249
254
|
const claudeLegacySkillPath = join(homedir(), ".claude", "commands", "sdd-do.md");
|
|
250
|
-
const claudeInstalled = existsSync(
|
|
255
|
+
const claudeInstalled = existsSync(claudeProjectPath) || existsSync(claudeGlobalPath) || existsSync(claudeLegacySkillPath);
|
|
251
256
|
const codexProjectPath = join(process.cwd(), ".codex", "skills", "spets", "SKILL.md");
|
|
252
257
|
const codexGlobalPath = join(homedir(), ".codex", "skills", "spets", "SKILL.md");
|
|
253
258
|
const codexInstalled = existsSync(codexProjectPath) || existsSync(codexGlobalPath);
|
|
@@ -259,7 +264,8 @@ async function listPlugins() {
|
|
|
259
264
|
const geminiLocation = existsSync(geminiProjectPath) ? "project" : existsSync(geminiLegacyCommandPath) ? "project" : existsSync(geminiLegacyGlobalPath) ? "global" : null;
|
|
260
265
|
console.log("Installed:");
|
|
261
266
|
const installed = [];
|
|
262
|
-
|
|
267
|
+
const claudeLocation = existsSync(claudeProjectPath) ? "project" : existsSync(claudeGlobalPath) ? "global" : "legacy";
|
|
268
|
+
if (claudeInstalled) installed.push(`claude (${claudeLocation})`);
|
|
263
269
|
if (codexInstalled) installed.push(`codex (${codexLocation})`);
|
|
264
270
|
if (geminiInstalled) installed.push(`gemini (${geminiLocation})`);
|
|
265
271
|
if (installed.length > 0) {
|