claude-cli-advanced-starter-pack 1.8.0 → 1.8.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.
- package/package.json +1 -1
- package/src/commands/init.js +47 -288
package/package.json
CHANGED
package/src/commands/init.js
CHANGED
|
@@ -355,328 +355,87 @@ const AVAILABLE_COMMANDS = [
|
|
|
355
355
|
];
|
|
356
356
|
|
|
357
357
|
/**
|
|
358
|
-
* Generate the
|
|
358
|
+
* Generate the /menu command - launches CCASP Panel in new terminal
|
|
359
359
|
*/
|
|
360
360
|
function generateMenuCommand(projectName, installedCommands, installedAgents, installedSkills, installedHooks) {
|
|
361
361
|
const date = new Date().toISOString().split('T')[0];
|
|
362
362
|
|
|
363
|
-
//
|
|
364
|
-
|
|
363
|
+
// Build command list for reference
|
|
364
|
+
let commandList = '';
|
|
365
365
|
for (const cmdName of installedCommands) {
|
|
366
366
|
const cmd = AVAILABLE_COMMANDS.find((c) => c.name === cmdName);
|
|
367
367
|
if (cmd && cmd.name !== 'menu') {
|
|
368
|
-
|
|
369
|
-
commandsByCategory[cmd.category] = [];
|
|
370
|
-
}
|
|
371
|
-
commandsByCategory[cmd.category].push(cmd);
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
// Build category sections for the menu
|
|
376
|
-
let categoryMenuItems = '';
|
|
377
|
-
let categoryInstructions = '';
|
|
378
|
-
let keyIndex = 1;
|
|
379
|
-
const keyMap = {};
|
|
380
|
-
|
|
381
|
-
for (const [category, cmds] of Object.entries(commandsByCategory)) {
|
|
382
|
-
categoryMenuItems += `\n### ${category}\n`;
|
|
383
|
-
for (const cmd of cmds) {
|
|
384
|
-
const key = keyIndex <= 9 ? keyIndex.toString() : String.fromCharCode(65 + keyIndex - 10); // 1-9, then A-Z
|
|
385
|
-
keyMap[key] = cmd.name;
|
|
386
|
-
categoryMenuItems += `- **[${key}]** \`/${cmd.name}\` - ${cmd.description}\n`;
|
|
387
|
-
keyIndex++;
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
// Build agents section
|
|
392
|
-
let agentsSection = '';
|
|
393
|
-
if (installedAgents.length > 0) {
|
|
394
|
-
agentsSection = `\n### Agents\n`;
|
|
395
|
-
for (const agent of installedAgents) {
|
|
396
|
-
agentsSection += `- **${agent}** - Custom agent\n`;
|
|
368
|
+
commandList += `| /${cmd.name} | ${cmd.description} |\n`;
|
|
397
369
|
}
|
|
398
370
|
}
|
|
399
371
|
|
|
400
|
-
// Build skills section
|
|
401
|
-
let skillsSection = '';
|
|
402
|
-
if (installedSkills.length > 0) {
|
|
403
|
-
skillsSection = `\n### Skills\n`;
|
|
404
|
-
for (const skill of installedSkills) {
|
|
405
|
-
skillsSection += `- **${skill}** - Custom skill\n`;
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
// Build hooks section
|
|
410
|
-
let hooksSection = '';
|
|
411
|
-
if (installedHooks.length > 0) {
|
|
412
|
-
hooksSection = `\n### Active Hooks\n`;
|
|
413
|
-
for (const hook of installedHooks) {
|
|
414
|
-
hooksSection += `- **${hook}**\n`;
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
const ccaspVersion = getVersion();
|
|
419
|
-
|
|
420
372
|
return `---
|
|
421
|
-
description:
|
|
373
|
+
description: Launch CCASP Control Panel - Interactive menu in separate terminal
|
|
422
374
|
---
|
|
423
375
|
|
|
424
|
-
# ${projectName} -
|
|
425
|
-
|
|
426
|
-
## CRITICAL FIRST STEP: Check for Updates
|
|
427
|
-
|
|
428
|
-
**BEFORE doing anything else**, you MUST read the update state file:
|
|
429
|
-
|
|
430
|
-
\`\`\`
|
|
431
|
-
Read file: .claude/config/ccasp-state.json
|
|
432
|
-
\`\`\`
|
|
433
|
-
|
|
434
|
-
Use the Read tool NOW to read \`.claude/config/ccasp-state.json\`. If it doesn't exist, that's fine - proceed without update banner.
|
|
435
|
-
|
|
436
|
-
If the file exists and contains \`"updateAvailable": true\`, you MUST display the update banner BEFORE the menu.
|
|
437
|
-
|
|
438
|
-
Example state file contents:
|
|
439
|
-
\`\`\`javascript
|
|
440
|
-
{
|
|
441
|
-
"currentVersion": "1.0.5",
|
|
442
|
-
"latestVersion": "1.0.6",
|
|
443
|
-
"updateAvailable": true,
|
|
444
|
-
"updateHighlights": [...],
|
|
445
|
-
"updateFirstDisplayed": false
|
|
446
|
-
}
|
|
447
|
-
\`\`\`
|
|
448
|
-
|
|
449
|
-
## Dynamic Menu Header
|
|
450
|
-
|
|
451
|
-
Build the header based on update state. Replace \`{{VERSION}}\` and \`{{UPDATE_STATUS}}\` dynamically:
|
|
452
|
-
|
|
453
|
-
\`\`\`
|
|
454
|
-
╔═══════════════════════════════════════════════════════════════════════════════╗
|
|
455
|
-
║ ║
|
|
456
|
-
║ ╔═╗╦ ╔═╗╦ ╦╔╦╗╔═╗ ╔═╗╔╦╗╦ ╦╔═╗╔╗╔╔═╗╔═╗╔╦╗ ╔═╗╔╦╗╔═╗╦═╗╔╦╗╔═╗╦═╗ ║
|
|
457
|
-
║ ║ ║ ╠═╣║ ║ ║║║╣ ╠═╣ ║║╚╗╔╝╠═╣║║║║ ║╣ ║║ ╚═╗ ║ ╠═╣╠╦╝ ║ ║╣ ╠╦╝ ║
|
|
458
|
-
║ ╚═╝╩═╝╩ ╩╚═╝═╩╝╚═╝ ╩ ╩═╩╝ ╚╝ ╩ ╩╝╚╝╚═╝╚═╝═╩╝ ╚═╝ ╩ ╩ ╩╩╚═ ╩ ╚═╝╩╚═ ║
|
|
459
|
-
║ ║
|
|
460
|
-
║ ${projectName.padEnd(35)} v{{VERSION}} {{UPDATE_STATUS}} ║
|
|
461
|
-
║ ║
|
|
462
|
-
╠═══════════════════════════════════════════════════════════════════════════════╣
|
|
463
|
-
\`\`\`
|
|
464
|
-
|
|
465
|
-
**If update is available**, replace:
|
|
466
|
-
- \`{{VERSION}}\` with current version (e.g., "1.0.5")
|
|
467
|
-
- \`{{UPDATE_STATUS}}\` with \`[NEW UPDATE]\` in bold/highlighted
|
|
468
|
-
|
|
469
|
-
**If up to date**, replace:
|
|
470
|
-
- \`{{VERSION}}\` with current version
|
|
471
|
-
- \`{{UPDATE_STATUS}}\` with empty string
|
|
472
|
-
|
|
473
|
-
## Update Banner (Show When Update Available)
|
|
474
|
-
|
|
475
|
-
If \`updateAvailable: true\`, display this banner BEFORE the main menu:
|
|
476
|
-
|
|
477
|
-
\`\`\`
|
|
478
|
-
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
479
|
-
│ 📦 NEW UPDATE AVAILABLE: v{{currentVersion}} → v{{latestVersion}} │
|
|
480
|
-
├─────────────────────────────────────────────────────────────────────────────┤
|
|
481
|
-
│ What's New: │
|
|
482
|
-
│ {{#each updateHighlights}} │
|
|
483
|
-
│ • {{summary}} │
|
|
484
|
-
│ {{/each}} │
|
|
485
|
-
├─────────────────────────────────────────────────────────────────────────────┤
|
|
486
|
-
│ Press [N] to update now │ Press [U] for details │ Press any to dismiss │
|
|
487
|
-
└─────────────────────────────────────────────────────────────────────────────┘
|
|
488
|
-
\`\`\`
|
|
489
|
-
|
|
490
|
-
**IMPORTANT**: After displaying the update banner for the first time, update the state file:
|
|
491
|
-
\`updateFirstDisplayed: true\` - This prevents showing the full highlights again.
|
|
492
|
-
|
|
493
|
-
On subsequent displays (when \`updateFirstDisplayed: true\`), show a compact banner:
|
|
494
|
-
|
|
495
|
-
\`\`\`
|
|
496
|
-
┌──────────────────────────────────────────────────────────────┐
|
|
497
|
-
│ 📦 Update available: v{{currentVersion}} → v{{latestVersion}} │ [N] Update │
|
|
498
|
-
└──────────────────────────────────────────────────────────────┘
|
|
499
|
-
\`\`\`
|
|
500
|
-
|
|
501
|
-
## Main Menu Body
|
|
502
|
-
|
|
503
|
-
\`\`\`
|
|
504
|
-
║ ║
|
|
505
|
-
║ Quick Actions: ║
|
|
506
|
-
║ ───────────── ║
|
|
507
|
-
║ [T] Run Tests [G] GitHub Task [P] Phase Dev Plan ║
|
|
508
|
-
║ [A] Create Agent [H] Create Hook [S] Create Skill ║
|
|
509
|
-
║ [M] Explore MCP [C] Claude Audit [E] Explore Codebase ║
|
|
510
|
-
║ [⚡] Launch Panel Open control panel in new terminal window ║
|
|
511
|
-
║ ║
|
|
512
|
-
║ Project Resources: ║
|
|
513
|
-
║ ────────────────── ║
|
|
514
|
-
║ [1] View Agents [2] View Skills [3] View Hooks ║
|
|
515
|
-
║ [4] View Commands [5] Settings [6] Documentation ║
|
|
516
|
-
║ ║
|
|
517
|
-
║ Project Implementation: ║
|
|
518
|
-
║ ─────────────────────── ║
|
|
519
|
-
║ [I] /project-impl Agent-powered setup & configuration ║
|
|
520
|
-
║ ║
|
|
521
|
-
║ Navigation: ║
|
|
522
|
-
║ ─────────── ║
|
|
523
|
-
║ [U] Check for Updates [R] Refresh Menu [?] Help [Q] Exit ║
|
|
524
|
-
{{#if updateAvailable}}
|
|
525
|
-
║ [N] UPDATE NOW Run: npm update -g claude-cli-advanced-starter-pack ║
|
|
526
|
-
{{/if}}
|
|
527
|
-
║ ║
|
|
528
|
-
╚═══════════════════════════════════════════════════════════════════════════════╝
|
|
529
|
-
\`\`\`
|
|
530
|
-
|
|
531
|
-
## How to Use This Menu
|
|
532
|
-
|
|
533
|
-
When the user invokes \`/menu\`:
|
|
534
|
-
|
|
535
|
-
1. **Read update state**: Check \`.claude/config/ccasp-state.json\` for cached update info
|
|
536
|
-
2. **Build dynamic header**: Include version number and update status
|
|
537
|
-
3. **Show update banner**: If updates available, show banner with highlights (first time) or compact (subsequent)
|
|
538
|
-
4. **Display the menu**: Show the ASCII art menu with dynamic content
|
|
539
|
-
5. **Wait for input**: Accept single character or command name
|
|
540
|
-
|
|
541
|
-
### Key Bindings
|
|
542
|
-
|
|
543
|
-
| Key | Action | Command |
|
|
544
|
-
|-----|--------|---------|
|
|
545
|
-
| **T** | Run E2E Tests | \`/e2e-test\` |
|
|
546
|
-
| **G** | Create GitHub Task | \`/github-task\` |
|
|
547
|
-
| **P** | Create Phase Dev Plan | \`/phase-dev-plan\` |
|
|
548
|
-
| **A** | Create Agent | \`/create-agent\` |
|
|
549
|
-
| **H** | Create Hook | \`/create-hook\` |
|
|
550
|
-
| **S** | Create Skill | \`/create-skill\` |
|
|
551
|
-
| **M** | Explore MCP Servers | \`/explore-mcp\` |
|
|
552
|
-
| **C** | Claude Audit | \`/claude-audit\` |
|
|
553
|
-
| **E** | Explore Codebase | \`/codebase-explorer\` |
|
|
554
|
-
| **⚡** or **L** | Launch Panel | \`/ccasp-panel\` (opens in new terminal) |
|
|
555
|
-
| **1** | List project agents | Read \`.claude/agents/\` |
|
|
556
|
-
| **2** | List project skills | Read \`.claude/skills/\` |
|
|
557
|
-
| **3** | List active hooks | Read \`.claude/hooks/\` |
|
|
558
|
-
| **4** | List all commands | Read \`.claude/commands/INDEX.md\` |
|
|
559
|
-
| **5** | View/edit settings | Read \`.claude/settings.json\` |
|
|
560
|
-
| **6** | Open documentation | Read \`.claude/docs/\` |
|
|
561
|
-
| **I** | Project Implementation | \`/project-impl\` |
|
|
562
|
-
| **U** | Check for Updates | \`/update-check\` |
|
|
563
|
-
| **N** | Update Now | Run npm update (only shown when update available) |
|
|
564
|
-
| **R** | Refresh and redisplay menu | Re-invoke \`/menu\` |
|
|
565
|
-
| **?** | Show help | Display command descriptions |
|
|
566
|
-
| **Q** | Exit menu | End menu interaction |
|
|
567
|
-
|
|
568
|
-
## Installed Commands
|
|
569
|
-
${categoryMenuItems}
|
|
570
|
-
${agentsSection}
|
|
571
|
-
${skillsSection}
|
|
572
|
-
${hooksSection}
|
|
376
|
+
# ${projectName} - Menu
|
|
573
377
|
|
|
574
378
|
## Instructions for Claude
|
|
575
379
|
|
|
576
|
-
|
|
380
|
+
**EXECUTE IMMEDIATELY**: Launch the CCASP Control Panel in a new terminal window.
|
|
577
381
|
|
|
578
|
-
### Step 1:
|
|
382
|
+
### Step 1: Launch Panel
|
|
579
383
|
|
|
580
|
-
|
|
384
|
+
Use the Bash tool to run this command:
|
|
581
385
|
|
|
386
|
+
**Windows:**
|
|
582
387
|
\`\`\`bash
|
|
583
|
-
|
|
388
|
+
start powershell -NoExit -Command "ccasp panel"
|
|
584
389
|
\`\`\`
|
|
585
390
|
|
|
586
|
-
|
|
587
|
-
- \`currentVersion\`: Installed CCASP version
|
|
588
|
-
- \`latestVersion\`: Latest version on npm
|
|
589
|
-
- \`updateAvailable\`: Boolean indicating if update exists
|
|
590
|
-
- \`updateHighlights\`: Array of release summaries
|
|
591
|
-
- \`updateFirstDisplayed\`: Whether full highlights have been shown
|
|
592
|
-
- \`projectImplCompleted\`: Whether user has run /project-impl (default: false)
|
|
593
|
-
|
|
594
|
-
### Step 2: Build Dynamic Menu
|
|
595
|
-
|
|
596
|
-
Replace template variables in the menu:
|
|
597
|
-
- \`{{VERSION}}\` → currentVersion (e.g., "1.0.6")
|
|
598
|
-
- \`{{UPDATE_STATUS}}\` → "[NEW UPDATE]" if updateAvailable, else ""
|
|
599
|
-
|
|
600
|
-
### Step 3: Display Update Banner (If Applicable)
|
|
601
|
-
|
|
602
|
-
**First time showing update** (\`updateAvailable && !updateFirstDisplayed\`):
|
|
603
|
-
Show full banner with highlights, then update state:
|
|
604
|
-
|
|
391
|
+
**macOS:**
|
|
605
392
|
\`\`\`bash
|
|
606
|
-
|
|
393
|
+
osascript -e 'tell application "Terminal" to do script "ccasp panel"'
|
|
607
394
|
\`\`\`
|
|
608
395
|
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
Show compact banner only.
|
|
613
|
-
|
|
614
|
-
### Step 3b: Show Setup Recommendation (If Applicable)
|
|
615
|
-
|
|
616
|
-
If \`projectImplCompleted\` is \`false\` or missing, display this banner at the BOTTOM of the menu (after the closing box but before the input prompt):
|
|
617
|
-
|
|
618
|
-
\`\`\`
|
|
619
|
-
💡 Tip: Run /project-impl to configure your project (audit CLAUDE.md, detect tech stack, set up deployment)
|
|
396
|
+
**Linux:**
|
|
397
|
+
\`\`\`bash
|
|
398
|
+
gnome-terminal -- ccasp panel &
|
|
620
399
|
\`\`\`
|
|
621
400
|
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
### Step 4: Display Menu and Wait for Input
|
|
625
|
-
|
|
626
|
-
Ask: "What would you like to do? Enter a key:"
|
|
627
|
-
|
|
628
|
-
### Step 5: Handle User Selection
|
|
401
|
+
### Step 2: Confirm Launch
|
|
629
402
|
|
|
630
|
-
|
|
631
|
-
|-----|--------|
|
|
632
|
-
| **N** | **Update Now**: Run \`npm update -g claude-cli-advanced-starter-pack\` via Bash, then show: "Update complete! Restart Claude Code CLI to use new features." |
|
|
633
|
-
| **U** | Invoke \`/update-check\` for detailed update info and feature management |
|
|
634
|
-
| **I** | Invoke \`/project-impl\` for project implementation |
|
|
635
|
-
| **⚡** or **L** | **Launch Panel**: Run \`start powershell -NoExit -Command "ccasp panel"\` (Windows) or equivalent to open control panel in new terminal |
|
|
636
|
-
| **R** | Re-invoke \`/menu\` (refresh) |
|
|
637
|
-
| **Q** | End menu session |
|
|
638
|
-
| **1-6** | Read and display the corresponding resource |
|
|
639
|
-
| **Other** | Invoke the corresponding slash command |
|
|
640
|
-
|
|
641
|
-
### Example: Update Now Flow
|
|
403
|
+
After running the command, display this confirmation:
|
|
642
404
|
|
|
643
405
|
\`\`\`
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
│
|
|
653
|
-
│
|
|
654
|
-
│
|
|
655
|
-
│
|
|
656
|
-
│
|
|
657
|
-
│
|
|
658
|
-
│
|
|
659
|
-
│
|
|
660
|
-
│
|
|
661
|
-
|
|
406
|
+
✅ CCASP Control Panel launched in a new terminal window!
|
|
407
|
+
|
|
408
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
409
|
+
│ CCASP Control Panel (NEW WINDOW) │
|
|
410
|
+
├─────────────────────────────────────────────────────────────────┤
|
|
411
|
+
│ │
|
|
412
|
+
│ Agents & Skills: │
|
|
413
|
+
│ [A] Create Agent [H] Create Hook [S] Create Skill │
|
|
414
|
+
│ [M] Explore MCP [C] Claude Audit [E] Explore Code │
|
|
415
|
+
│ │
|
|
416
|
+
│ Quick Actions: │
|
|
417
|
+
│ [P] Phase Dev Plan [G] GitHub Task [T] Run E2E Tests │
|
|
418
|
+
│ [U] Update Check │
|
|
419
|
+
│ │
|
|
420
|
+
│ Controls: │
|
|
421
|
+
│ [Q] Quit [R] Refresh [X] Clear Queue [?] Help │
|
|
422
|
+
│ │
|
|
423
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
424
|
+
|
|
425
|
+
How to use:
|
|
426
|
+
1. Switch to the new PowerShell window with the panel
|
|
427
|
+
2. Press a single key to select a command (e.g., 'A' for Create Agent)
|
|
428
|
+
3. Return to this Claude Code session
|
|
429
|
+
4. Press Enter on an empty prompt - the command will execute automatically
|
|
662
430
|
\`\`\`
|
|
663
431
|
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
- The startup hook (\`ccasp-update-check.js\`) runs automatically on first prompt
|
|
667
|
-
- Checks npm registry with 1-hour cache
|
|
668
|
-
- Stores result in \`.claude/config/ccasp-state.json\`
|
|
669
|
-
- Menu reads this cached state (no network call needed)
|
|
432
|
+
## Direct Commands (Alternative)
|
|
670
433
|
|
|
671
|
-
|
|
434
|
+
If the panel doesn't work, you can invoke these commands directly:
|
|
672
435
|
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
- Hooks: \`.claude/hooks/*.js\` files
|
|
677
|
-
- Commands: \`.claude/commands/INDEX.md\`
|
|
678
|
-
- Settings: \`.claude/settings.json\` and \`.claude/settings.local.json\`
|
|
679
|
-
- Docs: \`.claude/docs/\` directory listing
|
|
436
|
+
| Command | Description |
|
|
437
|
+
|---------|-------------|
|
|
438
|
+
${commandList}
|
|
680
439
|
|
|
681
440
|
---
|
|
682
441
|
|