makaron-cli 0.13.0 → 0.13.1

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,6 +1,6 @@
1
1
  {
2
2
  "name": "makaron-cli",
3
- "version": "0.11.5",
3
+ "version": "0.13.1",
4
4
  "description": "AI image editing, video generation, music creation, and marketplace skill workflows via CLI. Agents can self-register, install skills, create projects, and produce creative media.",
5
5
  "author": {
6
6
  "name": "Makaron AI",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "makaron-cli",
3
- "version": "0.11.5",
3
+ "version": "0.13.1",
4
4
  "description": "AI image editing, video generation, music creation, and marketplace skill workflows via CLI. Agents can self-register, install skills, create projects, and produce creative media.",
5
5
  "displayName": "Makaron",
6
6
  "shortDescription": "AI image/video/music creation from the terminal",
package/README.md CHANGED
@@ -95,7 +95,7 @@ npx makaron-cli chat --project auto --image img1.jpg --image img2.jpg --json -b
95
95
  npx makaron-cli chat --project auto --agent-model deepseek-v4-pro --image-model qwen "design a product poster"
96
96
  ```
97
97
 
98
- Model flags are role-specific: `--agent-model` controls reasoning and tool use, `--image-model` controls image generation/editing, and `--video-model` controls video generation. `--agent-model` accepts `auto|sonnet-4.6|sonnet-5|opus-4.8|grok-4.5|deepseek-v4-pro`. `MAKARON_AGENT_MODEL` can set the default for automation; the command flag takes precedence. The legacy `--model` flag remains temporarily supported with a deprecation warning.
98
+ Model flags are role-specific: `--agent-model` controls reasoning and tool use, `--image-model` controls image generation/editing, and `--video-model` controls video generation. `--agent-model` accepts `auto|gpt-5.6-terra|gpt-5.6-sol|gpt-5.6-luna|grok-4.5|deepseek-v4-pro`. `auto` currently uses GPT-5.6 Terra. `MAKARON_AGENT_MODEL` can set the default for automation; the command flag takes precedence. The legacy `--model` flag remains temporarily supported with a deprecation warning.
99
99
 
100
100
  Returns immediately:
101
101
  ```json
@@ -451,8 +451,23 @@ Admin commands require an API key with admin privileges. Ask your admin to run `
451
451
 
452
452
  ```bash
453
453
  npx makaron-cli admin skills
454
+ npx makaron-cli admin skills --json
454
455
  ```
455
456
 
457
+ The human-readable list includes assigned categories plus title/prompt locale completeness.
458
+
459
+ ### Manage marketplace categories
460
+
461
+ ```bash
462
+ npx makaron-cli admin skill-categories
463
+ npx makaron-cli admin skill-categories --json
464
+ npx makaron-cli admin skill-categories add '{"id":"portrait-effects","labels":{"en":"Portrait Effects","zh":"人像特效","zh-Hant":"人像特效","ja":"ポートレート効果"},"icon":"✨","sort_order":10}'
465
+ npx makaron-cli admin skill-categories update portrait-effects '{"icon":"📸"}'
466
+ npx makaron-cli admin skill-categories delete portrait-effects
467
+ ```
468
+
469
+ Deleting a category is blocked while any marketplace skill still uses it.
470
+
456
471
  ### Upload assets to Storage
457
472
 
458
473
  ```bash
@@ -475,9 +490,10 @@ Storage paths follow this convention:
475
490
 
476
491
  ```bash
477
492
  npx makaron-cli admin skills add '{
478
- "labels": {"zh": "中文名", "en": "English Name"},
493
+ "labels": {"en": "English Name", "zh": "中文名", "zh-Hant": "繁體名稱", "ja": "日本語名"},
479
494
  "image": "https://sdyrtztrjgmmpnirswxt.supabase.co/storage/v1/object/public/images/marketplace/covers/skill-name.jpg",
480
- "prompt": "Default prompt shown to users",
495
+ "prompts": {"en": "Default prompt", "zh": "默认提示词", "zh-Hant": "預設提示詞", "ja": "デフォルトプロンプト"},
496
+ "categories": ["portrait-effects"],
481
497
  "skill_path": "https://sdyrtztrjgmmpnirswxt.supabase.co/storage/v1/object/public/images/marketplace/skills/skill-name.zip",
482
498
  "image_count": 2,
483
499
  "sort_order": 10,
@@ -486,6 +502,8 @@ npx makaron-cli admin skills add '{
486
502
  }'
487
503
  ```
488
504
 
505
+ New skills require all four localized titles, all four localized default prompts, and at least one existing category. Partial `labels` or `prompts` updates are merged with existing locales, so updating one language does not erase the others.
506
+
489
507
  ### Update / delete a skill
490
508
 
491
509
  ```bash
@@ -520,7 +538,7 @@ npx makaron-cli admin fetch-skill https://www.makaron.app/s/4c4cbd57
520
538
  ```
521
539
  6. **Add to marketplace**:
522
540
  ```bash
523
- npx makaron-cli admin skills add '{"labels":{"zh":"...","en":"..."},"image":"<cover_url>","skill_path":"<zip_url>","before_images":["<before_url>"],"image_count":2,"sort_order":10,"is_active":true}'
541
+ npx makaron-cli admin skills add '{"labels":{"en":"...","zh":"...","zh-Hant":"...","ja":"..."},"prompts":{"en":"...","zh":"...","zh-Hant":"...","ja":"..."},"categories":["portrait-effects"],"image":"<cover_url>","skill_path":"<zip_url>","before_images":["<before_url>"],"image_count":2,"sort_order":10,"is_active":true}'
524
542
  ```
525
543
  7. **Verify** — visit https://www.makaron.app/home and confirm the skill appears, can be clicked, and works
526
544
 
package/bin/makaron.mjs CHANGED
@@ -27,7 +27,7 @@ const APP_URL = process.env.MAKARON_APP_URL || DEFAULT_URL;
27
27
  const NPM_PACKAGE_NAME = 'makaron-cli';
28
28
  const UPDATE_CHECK_INTERVAL_MS = 24 * 60 * 60 * 1000;
29
29
  const UPDATE_CHECK_TIMEOUT_MS = 400;
30
- const AGENT_MODELS = ['auto', 'sonnet-4.6', 'sonnet-5', 'opus-4.8', 'grok-4.5', 'deepseek-v4-pro'];
30
+ const AGENT_MODELS = ['auto', 'gpt-5.6-terra', 'gpt-5.6-sol', 'gpt-5.6-luna', 'grok-4.5', 'deepseek-v4-pro'];
31
31
 
32
32
  // Public anon key (safe to embed — only enables auth, not data access)
33
33
  const SUPABASE_URL = 'https://sdyrtztrjgmmpnirswxt.supabase.co';
@@ -292,7 +292,7 @@ Options:
292
292
  --skill <id|label|name> Use an installed skill or auto-install a matched marketplace skill.
293
293
  --image-model <name> Image model: gemini, gemini-lite, qwen, openai, pony, or wai.
294
294
  --video-model <name> Preferred video model: seedance-fast, seedance-mini, seedance, kling, grok, or google-omni.
295
- --agent-model <name> Agent model: auto, sonnet-4.6, sonnet-5, opus-4.8, grok-4.5, or deepseek-v4-pro.
295
+ --agent-model <name> Agent model: auto, gpt-5.6-terra, gpt-5.6-sol, gpt-5.6-luna, grok-4.5, or deepseek-v4-pro.
296
296
  --video-resolution <res> Video resolution: auto, 480p, 720p, 1080p, or 4k.
297
297
  --background, -b Submit and print a runId.
298
298
  --json Output structured JSON.
@@ -990,6 +990,17 @@ function timeSince(date) {
990
990
 
991
991
  // ─── Skill Marketplace ──────────────────────────────────────────────────────
992
992
 
993
+ const MARKETPLACE_LOCALES = ['en', 'zh', 'zh-Hant', 'ja'];
994
+
995
+ function localizedValues(value) {
996
+ if (!value || typeof value !== 'object' || Array.isArray(value)) return [];
997
+ return Object.values(value).filter(item => typeof item === 'string' && item.trim());
998
+ }
999
+
1000
+ function localizedCoverage(value) {
1001
+ return MARKETPLACE_LOCALES.filter(locale => typeof value?.[locale] === 'string' && value[locale].trim()).length;
1002
+ }
1003
+
993
1004
  function getSkillLabel(skill) {
994
1005
  return skill.labels?.en || skill.labels?.zh || skill.label || skill.name || skill.id;
995
1006
  }
@@ -1032,15 +1043,15 @@ async function fetchMarketplaceSkills(baseUrl, opts = {}) {
1032
1043
  }
1033
1044
 
1034
1045
  function marketplaceSearchText(skill) {
1046
+ const localized = [...localizedValues(skill.labels), ...localizedValues(skill.prompts)];
1035
1047
  return [
1036
1048
  skill.id,
1037
1049
  skill.label,
1038
- skill.labels?.en,
1039
- skill.labels?.zh,
1050
+ ...localized,
1040
1051
  skill.prompt,
1052
+ ...(Array.isArray(skill.categories) ? skill.categories : []),
1041
1053
  slugifySkill(skill.label),
1042
- slugifySkill(skill.labels?.en),
1043
- slugifySkill(skill.labels?.zh),
1054
+ ...localized.map(slugifySkill),
1044
1055
  ].filter(Boolean).join(' ').toLowerCase();
1045
1056
  }
1046
1057
 
@@ -1048,9 +1059,10 @@ function marketplaceSkillTokens(skill) {
1048
1059
  return [
1049
1060
  skill.id,
1050
1061
  skill.label,
1051
- skill.labels?.en,
1052
- skill.labels?.zh,
1062
+ ...localizedValues(skill.labels),
1063
+ ...localizedValues(skill.prompts),
1053
1064
  skill.prompt,
1065
+ ...(Array.isArray(skill.categories) ? skill.categories : []),
1054
1066
  ].filter(Boolean).map(value => String(value).toLowerCase());
1055
1067
  }
1056
1068
 
@@ -1098,8 +1110,13 @@ function printMarketplaceSkill(skill) {
1098
1110
  console.log(`${skill.label}`);
1099
1111
  console.log(`ID: ${skill.id}`);
1100
1112
  console.log(`Type: ${skill.hasSkill ? 'installable skill' : 'prompt template'}`);
1101
- if (skill.labels?.zh && skill.labels.zh !== skill.label) console.log(`ZH: ${skill.labels.zh}`);
1102
- if (skill.prompt) console.log(`Prompt: ${skill.prompt}`);
1113
+ for (const locale of MARKETPLACE_LOCALES) {
1114
+ const label = skill.labels?.[locale];
1115
+ if (label && label !== skill.label) console.log(`${locale}: ${label}`);
1116
+ }
1117
+ if (Array.isArray(skill.categories) && skill.categories.length) console.log(`Categories: ${skill.categories.join(', ')}`);
1118
+ console.log(`i18n: titles ${localizedCoverage(skill.labels)}/4 · prompts ${localizedCoverage(skill.prompts)}/4`);
1119
+ if (skill.prompts?.en || skill.prompt) console.log(`Prompt (en): ${skill.prompts?.en || skill.prompt}`);
1103
1120
  if (skill.image) console.log(`Cover: ${skill.image}`);
1104
1121
  if (skill.hasSkill) console.log(`Install: makaron skills install ${skill.id}`);
1105
1122
  }
@@ -1571,8 +1588,8 @@ Commands:
1571
1588
  admin Admin commands (skills, upload, set-admin)
1572
1589
 
1573
1590
  Model selection:
1574
- --agent-model <name> Reasoning/tool model: auto, sonnet-4.6, sonnet-5,
1575
- opus-4.8, grok-4.5, or deepseek-v4-pro
1591
+ --agent-model <name> Reasoning/tool model: auto, gpt-5.6-terra, gpt-5.6-sol,
1592
+ gpt-5.6-luna, grok-4.5, or deepseek-v4-pro
1576
1593
  --image-model <name> Image model: gemini, gemini-lite, qwen, openai,
1577
1594
  pony, or wai
1578
1595
  --video-model <name> Video model: seedance-fast, seedance-mini, seedance,
@@ -1580,7 +1597,7 @@ Model selection:
1580
1597
 
1581
1598
  Examples:
1582
1599
  makaron chat --project auto --agent-model deepseek-v4-pro "plan a launch poster"
1583
- makaron chat --project <id> --agent-model sonnet-5 --image-model qwen "make it cinematic"
1600
+ makaron chat --project <id> --agent-model gpt-5.6-terra --image-model qwen "make it cinematic"
1584
1601
  makaron chat --project <id> --video-model seedance-fast "turn this into a short video"
1585
1602
 
1586
1603
  Run makaron <command> --help for command-specific options.
@@ -1719,7 +1736,8 @@ Use with chat:
1719
1736
  music status <taskId> Check music status
1720
1737
  `);
1721
1738
  } else if (topic === 'admin') {
1722
- if (subtopic === 'skills') console.log('Usage: makaron admin skills [add|update|delete] ...');
1739
+ if (subtopic === 'skills') console.log('Usage: makaron admin skills [--json|add|update|delete] ...');
1740
+ else if (subtopic === 'skill-categories') console.log('Usage: makaron admin skill-categories [--json|add|update|delete] ...');
1723
1741
  else if (subtopic === 'upload') console.log('Usage: makaron admin upload <local-file> <storage-path>');
1724
1742
  else if (subtopic === 'fetch-skill') console.log('Usage: makaron admin fetch-skill <share-code|url>');
1725
1743
  else if (subtopic === 'set-admin') console.log('Usage: makaron admin set-admin <email>');
@@ -1728,6 +1746,10 @@ Use with chat:
1728
1746
  admin skills add '<json>' Add a new skill
1729
1747
  admin skills update <id> '<json>' Update a skill
1730
1748
  admin skills delete <id> Delete a skill
1749
+ admin skill-categories List marketplace categories
1750
+ admin skill-categories add '<json>' Add a category
1751
+ admin skill-categories update <id> '<json>'
1752
+ admin skill-categories delete <id> Delete a category
1731
1753
  admin upload <file> <storage-path> Upload file to Storage
1732
1754
  admin fetch-skill <code|url> Download skill from share link
1733
1755
  admin set-admin <email> Grant admin access to a user
@@ -2492,18 +2514,23 @@ if (!command || command === '--help' || command === '-h' || command === 'help')
2492
2514
  const sub = args[1];
2493
2515
 
2494
2516
  if (sub === 'skills') {
2495
- const action = args[2]; // add, update, delete, or none (list)
2517
+ const action = args[2] === '--json' ? null : args[2]; // add, update, delete, or none (list)
2496
2518
  if (!action) {
2497
2519
  // List all skills
2498
2520
  const res = await fetch(`${baseUrl}/api/admin/home-skills`, { headers });
2499
2521
  if (!res.ok) { console.error(`Error ${res.status}:`, await res.text()); process.exit(1); }
2500
2522
  const skills = await res.json();
2523
+ if (args.includes('--json')) {
2524
+ console.log(JSON.stringify(skills, null, 2));
2525
+ process.exit(0);
2526
+ }
2501
2527
  console.log(`📋 ${skills.length} skills\n`);
2502
2528
  for (const s of skills) {
2503
2529
  const label = s.labels?.en || s.labels?.zh || '(no label)';
2504
2530
  const active = s.is_active ? '✅' : '❌';
2505
2531
  const hasZip = s.skill_path ? '📦' : ' ';
2506
- console.log(` ${active} ${hasZip} ${String(s.sort_order).padStart(3)} ${s.id} ${label}`);
2532
+ const categories = Array.isArray(s.categories) && s.categories.length ? s.categories.join(',') : 'uncategorized';
2533
+ console.log(` ${active} ${hasZip} ${String(s.sort_order).padStart(3)} ${s.id} ${label} [${categories}] title ${localizedCoverage(s.labels)}/4 · prompt ${localizedCoverage(s.prompts)}/4`);
2507
2534
  }
2508
2535
  } else if (action === 'add') {
2509
2536
  const json = args.slice(3).join(' ');
@@ -2541,6 +2568,59 @@ if (!command || command === '--help' || command === '-h' || command === 'help')
2541
2568
  process.exit(1);
2542
2569
  }
2543
2570
 
2571
+ } else if (sub === 'skill-categories') {
2572
+ const action = args[2] === '--json' ? null : args[2];
2573
+ if (!action) {
2574
+ const res = await fetch(`${baseUrl}/api/admin/skill-categories`, { headers });
2575
+ if (!res.ok) { console.error(`Error ${res.status}:`, await res.text()); process.exit(1); }
2576
+ const categories = await res.json();
2577
+ if (args.includes('--json')) {
2578
+ console.log(JSON.stringify(categories, null, 2));
2579
+ process.exit(0);
2580
+ }
2581
+ console.log(`📂 ${categories.length} skill categories\n`);
2582
+ for (const category of categories) {
2583
+ const label = category.labels?.en || category.labels?.zh || category.id;
2584
+ const active = category.is_active ? '✅' : '❌';
2585
+ const icon = category.icon || ' ';
2586
+ console.log(` ${active} ${icon} ${String(category.sort_order).padStart(3)} ${category.id} ${label} title ${localizedCoverage(category.labels)}/4`);
2587
+ }
2588
+ } else if (action === 'add') {
2589
+ const json = args.slice(3).join(' ');
2590
+ if (!json) { console.error('Usage: makaron admin skill-categories add \'{"id":"...","labels":{...}}\''); process.exit(1); }
2591
+ let body;
2592
+ try { body = JSON.parse(json); } catch { console.error('Invalid JSON'); process.exit(1); }
2593
+ const res = await fetch(`${baseUrl}/api/admin/skill-categories`, {
2594
+ method: 'POST', headers: { 'Content-Type': 'application/json', ...headers }, body: JSON.stringify(body),
2595
+ });
2596
+ if (!res.ok) { console.error(`Error ${res.status}:`, await res.text()); process.exit(1); }
2597
+ const data = await res.json();
2598
+ console.log(`✅ Skill category created: ${data.id}`);
2599
+ } else if (action === 'update') {
2600
+ const id = args[3];
2601
+ const json = args.slice(4).join(' ');
2602
+ if (!id || !json) { console.error('Usage: makaron admin skill-categories update <id> \'{"field":"value"}\''); process.exit(1); }
2603
+ let body;
2604
+ try { body = JSON.parse(json); } catch { console.error('Invalid JSON'); process.exit(1); }
2605
+ body.id = id;
2606
+ const res = await fetch(`${baseUrl}/api/admin/skill-categories`, {
2607
+ method: 'PUT', headers: { 'Content-Type': 'application/json', ...headers }, body: JSON.stringify(body),
2608
+ });
2609
+ if (!res.ok) { console.error(`Error ${res.status}:`, await res.text()); process.exit(1); }
2610
+ console.log(`✅ Skill category ${id} updated`);
2611
+ } else if (action === 'delete') {
2612
+ const id = args[3];
2613
+ if (!id) { console.error('Usage: makaron admin skill-categories delete <id>'); process.exit(1); }
2614
+ const res = await fetch(`${baseUrl}/api/admin/skill-categories`, {
2615
+ method: 'DELETE', headers: { 'Content-Type': 'application/json', ...headers }, body: JSON.stringify({ id }),
2616
+ });
2617
+ if (!res.ok) { console.error(`Error ${res.status}:`, await res.text()); process.exit(1); }
2618
+ console.log(`✅ Skill category ${id} deleted`);
2619
+ } else {
2620
+ console.error(`Unknown action: ${action}. Use: add, update, delete, or omit to list.`);
2621
+ process.exit(1);
2622
+ }
2623
+
2544
2624
  } else if (sub === 'upload') {
2545
2625
  const filePath = args[2];
2546
2626
  const storagePath = args[3];
@@ -2600,6 +2680,10 @@ if (!command || command === '--help' || command === '-h' || command === 'help')
2600
2680
  admin skills add '<json>' Add a new skill
2601
2681
  admin skills update <id> '<json>' Update a skill
2602
2682
  admin skills delete <id> Delete a skill
2683
+ admin skill-categories List marketplace categories
2684
+ admin skill-categories add '<json>' Add a category
2685
+ admin skill-categories update <id> '<json>'
2686
+ admin skill-categories delete <id> Delete a category
2603
2687
  admin upload <file> <storage-path> Upload file to Storage
2604
2688
  admin fetch-skill <code|url> Download skill from share link
2605
2689
  admin set-admin <email> Grant admin access to a user
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "makaron-cli",
3
- "version": "0.13.0",
3
+ "version": "0.13.1",
4
4
  "description": "Talk to Makaron Agent from the terminal — create projects, edit images, generate videos",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -82,7 +82,7 @@ npx makaron-cli chat --project auto --image img1.jpg --image img2.jpg --json -b
82
82
  npx makaron-cli chat --project auto --agent-model deepseek-v4-pro --image-model qwen "design a product poster"
83
83
  ```
84
84
 
85
- Model flags are role-specific: `--agent-model` controls reasoning and tool use, `--image-model` controls image generation/editing, and `--video-model` controls video generation. `--agent-model` accepts `auto|sonnet-4.6|sonnet-5|opus-4.8|grok-4.5|deepseek-v4-pro`. `MAKARON_AGENT_MODEL` can set the default for automation; the command flag takes precedence. The legacy `--model` flag remains temporarily supported with a deprecation warning.
85
+ Model flags are role-specific: `--agent-model` controls reasoning and tool use, `--image-model` controls image generation/editing, and `--video-model` controls video generation. `--agent-model` accepts `auto|gpt-5.6-terra|gpt-5.6-sol|gpt-5.6-luna|grok-4.5|deepseek-v4-pro`. `auto` currently uses GPT-5.6 Terra. `MAKARON_AGENT_MODEL` can set the default for automation; the command flag takes precedence. The legacy `--model` flag remains temporarily supported with a deprecation warning.
86
86
 
87
87
  Returns immediately:
88
88
  ```json
@@ -126,7 +126,9 @@ npx makaron-cli chat --project auto \
126
126
  -b "make this with the selected skill"
127
127
  ```
128
128
 
129
- `--skill` accepts an installed skill name, a marketplace UUID, or a unique marketplace label. If a marketplace skill is matched, the CLI installs or reuses it and sends `[Active skill: <installed-skill-name>]` to Makaron Agent. Do not call admin skill commands for ordinary users. There is intentionally no user-facing CLI delete command for marketplace skills.
129
+ `--skill` accepts an installed skill name, a marketplace UUID, or a unique marketplace label. Marketplace search matches every localized title, every localized default prompt, and category ids. If a marketplace skill is matched, the CLI installs or reuses it and sends `[Active skill: <installed-skill-name>]` to Makaron Agent. Do not call admin skill commands for ordinary users. There is intentionally no user-facing CLI delete command for marketplace skills.
130
+
131
+ For an explicitly authorized marketplace administrator, `admin skills` shows category assignment and 4-locale title/prompt completeness, while `admin skill-categories` supports list/add/update/delete. New skills must include `en`, `zh`, `zh-Hant`, and `ja` in both `labels` and `prompts`, plus at least one existing `categories` id. Partial localized updates are safely merged server-side.
130
132
 
131
133
  ### With additional images (existing project)
132
134