@skunkceo/cli 2.0.1 → 2.0.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/bin/skunk.js +27 -24
- package/package.json +1 -1
package/bin/skunk.js
CHANGED
|
@@ -9,31 +9,28 @@ const SKILLS_REPO = 'skunkceo/openclaw-skills';
|
|
|
9
9
|
const SKILLS_BRANCH = 'main';
|
|
10
10
|
const OPENCLAW_DIR = path.join(process.env.HOME, '.openclaw', 'skills');
|
|
11
11
|
|
|
12
|
-
// Plugin registry - maps plugin names to
|
|
12
|
+
// Plugin registry - maps plugin names to slugs
|
|
13
|
+
// All downloads go through skunkglobal.com/api/plugin-updates/download
|
|
13
14
|
const PLUGIN_REGISTRY = {
|
|
14
15
|
'skunkcrm': {
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
slug: 'skunkcrm',
|
|
17
|
+
proSlug: 'skunkcrm-pro',
|
|
17
18
|
name: 'SkunkCRM',
|
|
18
|
-
slug: 'skunk-crm',
|
|
19
|
-
requiresLicense: false, // Pro requires license
|
|
20
19
|
},
|
|
21
20
|
'skunkforms': {
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
slug: 'skunkforms',
|
|
22
|
+
proSlug: 'skunkforms-pro',
|
|
24
23
|
name: 'SkunkForms',
|
|
25
|
-
slug: 'skunk-forms',
|
|
26
|
-
requiresLicense: false,
|
|
27
24
|
},
|
|
28
25
|
'skunkpages': {
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
slug: 'skunkpages',
|
|
27
|
+
proSlug: 'skunkpages-pro',
|
|
31
28
|
name: 'SkunkPages',
|
|
32
|
-
slug: 'skunk-pages',
|
|
33
|
-
requiresLicense: false,
|
|
34
29
|
},
|
|
35
30
|
};
|
|
36
31
|
|
|
32
|
+
const DOWNLOAD_BASE = 'https://skunkglobal.com/api/plugin-updates/download';
|
|
33
|
+
|
|
37
34
|
const colors = {
|
|
38
35
|
reset: '\x1b[0m',
|
|
39
36
|
bright: '\x1b[1m',
|
|
@@ -303,11 +300,27 @@ To install WordPress plugins, you need either:
|
|
|
303
300
|
return;
|
|
304
301
|
}
|
|
305
302
|
|
|
306
|
-
|
|
303
|
+
// Build download URL
|
|
304
|
+
const slug = isPro ? plugin.proSlug : plugin.slug;
|
|
305
|
+
let downloadUrl = `${DOWNLOAD_BASE}?slug=${slug}`;
|
|
306
|
+
|
|
307
|
+
// Add license key for Pro versions
|
|
308
|
+
if (isPro && license) {
|
|
309
|
+
downloadUrl += `&license_key=${license}`;
|
|
310
|
+
}
|
|
311
|
+
|
|
307
312
|
const displayName = isPro ? `${plugin.name} Pro` : plugin.name;
|
|
308
313
|
|
|
309
314
|
console.log(`Installing ${displayName}...`);
|
|
310
315
|
|
|
316
|
+
// Pro requires license
|
|
317
|
+
if (isPro && !license) {
|
|
318
|
+
warn('Pro version requires a license key.');
|
|
319
|
+
console.log(` skunk install plugin ${name} --license=YOUR_LICENSE_KEY\n`);
|
|
320
|
+
console.log(`${colors.dim}Get a license at: https://skunkglobal.com/pricing${colors.reset}`);
|
|
321
|
+
return;
|
|
322
|
+
}
|
|
323
|
+
|
|
311
324
|
// Build the command
|
|
312
325
|
let cmd;
|
|
313
326
|
if (hasStudio) {
|
|
@@ -316,22 +329,12 @@ To install WordPress plugins, you need either:
|
|
|
316
329
|
cmd = `wp plugin install "${downloadUrl}" --activate`;
|
|
317
330
|
}
|
|
318
331
|
|
|
319
|
-
// Add license if Pro and license provided
|
|
320
|
-
if (isPro && license) {
|
|
321
|
-
console.log(`${colors.dim}License key provided${colors.reset}`);
|
|
322
|
-
}
|
|
323
|
-
|
|
324
332
|
console.log(`${colors.dim}Running: ${cmd}${colors.reset}\n`);
|
|
325
333
|
|
|
326
334
|
try {
|
|
327
335
|
execSync(cmd, { stdio: 'inherit' });
|
|
328
336
|
success(`Installed ${displayName}`);
|
|
329
337
|
|
|
330
|
-
// If Pro and license provided, try to activate
|
|
331
|
-
if (isPro && license) {
|
|
332
|
-
console.log(`\n${colors.yellow}!${colors.reset} License activation may require manual setup in WordPress admin.`);
|
|
333
|
-
}
|
|
334
|
-
|
|
335
338
|
// Suggest installing the skill too
|
|
336
339
|
console.log(`\n${colors.dim}Tip: Install the AI skill to let your assistant manage ${plugin.name}:${colors.reset}`);
|
|
337
340
|
console.log(` skunk install skill ${pluginKey}\n`);
|