claude-cli-advanced-starter-pack 1.0.13 → 1.0.15

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-cli-advanced-starter-pack",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "description": "Advanced Claude Code CLI toolkit - agents, hooks, skills, MCP servers, phased development, and GitHub integration",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -42,25 +42,27 @@ const OPTIONAL_FEATURES = [
42
42
  label: 'Token Budget Management',
43
43
  description: 'Monitor and manage Claude API token usage with automatic compaction warnings, archive suggestions, and respawn thresholds. Includes hooks that track usage per session.',
44
44
  commands: ['context-audit'],
45
- hooks: ['token-budget-loader', 'context-guardian', 'tool-output-cacher'],
45
+ hooks: ['context-guardian'], // Only include hooks with templates
46
46
  default: false,
47
47
  requiresPostConfig: false,
48
48
  },
49
49
  {
50
50
  name: 'happyMode',
51
51
  label: 'Happy Engineering Integration',
52
- description: 'Integration with Happy Coder mobile app for remote session control, checkpoint management, and mobile-optimized responses. Requires Happy Coder app installed separately.',
52
+ description: 'Integration with Happy Coder mobile app for remote session control, checkpoint management, and mobile-optimized responses.',
53
53
  commands: ['happy-start'],
54
- hooks: ['happy-checkpoint-manager', 'happy-title-generator', 'happy-mode-detector'],
54
+ hooks: ['happy-checkpoint-manager'], // Only include hooks with templates
55
55
  default: false,
56
56
  requiresPostConfig: true,
57
+ npmPackage: 'happy-coder', // Optional npm package to install
58
+ npmInstallPrompt: 'Install Happy Coder CLI globally? (npm i -g happy-coder)',
57
59
  },
58
60
  {
59
61
  name: 'githubIntegration',
60
62
  label: 'GitHub Project Board Integration',
61
63
  description: 'Connect Claude to your GitHub Project Board for automated issue creation, progress tracking, and PR merge automation. Requires gh CLI authentication.',
62
64
  commands: ['github-update', 'github-task-start'],
63
- hooks: ['github-progress-hook', 'issue-completion-detector'],
65
+ hooks: ['github-progress-hook'], // Only include hooks with templates
64
66
  default: true,
65
67
  requiresPostConfig: true,
66
68
  },
@@ -1818,6 +1820,25 @@ export async function runInit(options = {}) {
1818
1820
  const enabledFeatures = OPTIONAL_FEATURES.filter((f) => selectedFeatures.includes(f.name));
1819
1821
  const featuresRequiringConfig = enabledFeatures.filter((f) => f.requiresPostConfig);
1820
1822
 
1823
+ // Collect feature-specific commands and hooks to deploy
1824
+ const featureCommands = [];
1825
+ const featureHooks = [];
1826
+ for (const feature of enabledFeatures) {
1827
+ featureCommands.push(...feature.commands);
1828
+ featureHooks.push(...feature.hooks);
1829
+ }
1830
+
1831
+ if (featureCommands.length > 0) {
1832
+ console.log('');
1833
+ console.log(chalk.green(` ✓ Selected features will add ${featureCommands.length} command(s):`));
1834
+ console.log(chalk.dim(` ${featureCommands.map(c => '/' + c).join(', ')}`));
1835
+ }
1836
+
1837
+ if (featureHooks.length > 0) {
1838
+ console.log(chalk.green(` ✓ Selected features will add ${featureHooks.length} hook(s):`));
1839
+ console.log(chalk.dim(` ${featureHooks.join(', ')}`));
1840
+ }
1841
+
1821
1842
  if (featuresRequiringConfig.length > 0) {
1822
1843
  console.log('');
1823
1844
  console.log(chalk.yellow(' ℹ The following features require configuration after installation:'));
@@ -1827,6 +1848,42 @@ export async function runInit(options = {}) {
1827
1848
  console.log(chalk.dim(' Run /menu → Project Settings after installation to complete setup.'));
1828
1849
  }
1829
1850
 
1851
+ // Check for optional npm package installs from selected features
1852
+ const featuresWithNpm = enabledFeatures.filter((f) => f.npmPackage);
1853
+ if (featuresWithNpm.length > 0) {
1854
+ console.log('');
1855
+ console.log(chalk.bold(' Optional Package Installation\n'));
1856
+
1857
+ for (const feature of featuresWithNpm) {
1858
+ const { installPackage } = await inquirer.prompt([
1859
+ {
1860
+ type: 'confirm',
1861
+ name: 'installPackage',
1862
+ message: feature.npmInstallPrompt || `Install ${feature.npmPackage} globally?`,
1863
+ default: true,
1864
+ },
1865
+ ]);
1866
+
1867
+ if (installPackage) {
1868
+ const npmSpinner = ora(`Installing ${feature.npmPackage}...`).start();
1869
+ try {
1870
+ const { execSync } = await import('child_process');
1871
+ execSync(`npm install -g ${feature.npmPackage}`, {
1872
+ encoding: 'utf8',
1873
+ stdio: ['pipe', 'pipe', 'pipe'],
1874
+ timeout: 120000, // 2 minutes timeout
1875
+ });
1876
+ npmSpinner.succeed(`Installed ${feature.npmPackage} globally`);
1877
+ } catch (error) {
1878
+ npmSpinner.fail(`Failed to install ${feature.npmPackage}`);
1879
+ console.log(chalk.dim(` Run manually: npm install -g ${feature.npmPackage}`));
1880
+ }
1881
+ } else {
1882
+ console.log(chalk.dim(` Skipped. Install later with: npm install -g ${feature.npmPackage}`));
1883
+ }
1884
+ }
1885
+ }
1886
+
1830
1887
  console.log('');
1831
1888
 
1832
1889
  // Step 5: Select slash commands to install
@@ -1878,15 +1935,21 @@ export async function runInit(options = {}) {
1878
1935
  },
1879
1936
  ]);
1880
1937
 
1881
- // Always include required commands
1938
+ // Always include required commands AND feature-specific commands
1882
1939
  const requiredCommands = AVAILABLE_COMMANDS.filter(c => c.required).map(c => c.name);
1883
- const finalCommands = [...new Set([...requiredCommands, ...selectedCommands])];
1940
+ const finalCommands = [...new Set([...requiredCommands, ...selectedCommands, ...featureCommands])];
1884
1941
 
1885
1942
  if (finalCommands.length === 0) {
1886
1943
  showWarning('No commands selected. Nothing to install.');
1887
1944
  return;
1888
1945
  }
1889
1946
 
1947
+ // Show what feature commands were auto-added
1948
+ const autoAddedCommands = featureCommands.filter(c => !selectedCommands.includes(c) && !requiredCommands.includes(c));
1949
+ if (autoAddedCommands.length > 0) {
1950
+ console.log(chalk.cyan(` ℹ Auto-including ${autoAddedCommands.length} feature command(s): ${autoAddedCommands.map(c => '/' + c).join(', ')}`));
1951
+ }
1952
+
1890
1953
  console.log('');
1891
1954
 
1892
1955
  // Step 6: Check for existing commands that would be overwritten
@@ -2181,6 +2244,45 @@ export async function runInit(options = {}) {
2181
2244
  console.log(chalk.cyan(`\n 📁 Backed up ${backedUpFiles.length} file(s) to .claude/backups/`));
2182
2245
  }
2183
2246
 
2247
+ // Step 6b: Deploy feature-specific hooks
2248
+ const deployedHooks = [];
2249
+ const failedHooks = [];
2250
+
2251
+ if (featureHooks.length > 0) {
2252
+ console.log(chalk.bold('\nStep 6b: Deploying feature hooks\n'));
2253
+
2254
+ for (const hookName of featureHooks) {
2255
+ try {
2256
+ const hookPath = join(hooksDir, `${hookName}.js`);
2257
+
2258
+ // Skip if already exists
2259
+ if (existsSync(hookPath)) {
2260
+ console.log(chalk.blue(` ○ hooks/${hookName}.js exists (preserved)`));
2261
+ continue;
2262
+ }
2263
+
2264
+ // Try to load from templates/hooks/ folder
2265
+ const templatePath = join(__dirname, '..', '..', 'templates', 'hooks', `${hookName}.template.js`);
2266
+ if (existsSync(templatePath)) {
2267
+ const hookContent = readFileSync(templatePath, 'utf8');
2268
+ writeFileSync(hookPath, hookContent, 'utf8');
2269
+ deployedHooks.push(hookName);
2270
+ console.log(chalk.green(` ✓ Created hooks/${hookName}.js`));
2271
+ } else {
2272
+ failedHooks.push({ name: hookName, error: 'No template found' });
2273
+ console.log(chalk.yellow(` ⚠ Skipped hooks/${hookName}.js (no template)`));
2274
+ }
2275
+ } catch (error) {
2276
+ failedHooks.push({ name: hookName, error: error.message });
2277
+ console.log(chalk.red(` ✗ Failed: hooks/${hookName}.js - ${error.message}`));
2278
+ }
2279
+ }
2280
+
2281
+ if (deployedHooks.length > 0) {
2282
+ console.log(chalk.green(`\n ✓ Deployed ${deployedHooks.length} feature hook(s)`));
2283
+ }
2284
+ }
2285
+
2184
2286
  // Step 7: Generate INDEX.md
2185
2287
  const indexPath = join(commandsDir, 'INDEX.md');
2186
2288
  const indexContent = generateIndexFile(installed, projectName);
@@ -2308,6 +2410,15 @@ export async function runInit(options = {}) {
2308
2410
  },
2309
2411
  // Track which features need post-install configuration
2310
2412
  _pendingConfiguration: featuresRequiringConfig.map((f) => f.name),
2413
+ // Track what was deployed for verification
2414
+ _deployment: {
2415
+ commands: installed,
2416
+ featureCommands: featureCommands.filter(c => installed.includes(c)),
2417
+ hooks: deployedHooks,
2418
+ featureHooks: featureHooks,
2419
+ enabledFeatures: selectedFeatures,
2420
+ timestamp: new Date().toISOString(),
2421
+ },
2311
2422
  };
2312
2423
 
2313
2424
  if (!existsSync(techStackPath)) {
@@ -1,5 +1,60 @@
1
1
  {
2
2
  "releases": [
3
+ {
4
+ "version": "1.0.15",
5
+ "date": "2026-01-30",
6
+ "summary": "Feature: Optional npm package installation for features (Happy Coder support)",
7
+ "highlights": [
8
+ "Features can now define optional npm packages to install globally",
9
+ "Happy Mode feature prompts to install happy-coder CLI during init",
10
+ "Graceful fallback with manual install instructions on failure",
11
+ "2-minute timeout for npm install operations"
12
+ ],
13
+ "newFeatures": {
14
+ "commands": [],
15
+ "agents": [],
16
+ "skills": [],
17
+ "hooks": [],
18
+ "other": [
19
+ {
20
+ "name": "npm-package-install",
21
+ "description": "Features can specify npmPackage and npmInstallPrompt for optional global installs"
22
+ }
23
+ ]
24
+ },
25
+ "breaking": [],
26
+ "deprecated": []
27
+ },
28
+ {
29
+ "version": "1.0.14",
30
+ "date": "2026-01-30",
31
+ "summary": "Fix: Complete feature deployment - hooks, commands, and auto-selection now work correctly",
32
+ "highlights": [
33
+ "Feature commands are now auto-included when a feature is selected",
34
+ "Feature hooks are now properly deployed during init",
35
+ "OPTIONAL_FEATURES cleaned up to only reference existing templates",
36
+ "tech-stack.json now tracks deployed commands and hooks for verification",
37
+ "Step 6b added to show feature hook deployment progress"
38
+ ],
39
+ "newFeatures": {
40
+ "commands": [],
41
+ "agents": [],
42
+ "skills": [],
43
+ "hooks": [],
44
+ "other": [
45
+ {
46
+ "name": "feature-auto-deployment",
47
+ "description": "When selecting a feature, its commands and hooks are automatically deployed"
48
+ },
49
+ {
50
+ "name": "deployment-tracking",
51
+ "description": "tech-stack.json now includes _deployment section tracking what was installed"
52
+ }
53
+ ]
54
+ },
55
+ "breaking": [],
56
+ "deprecated": []
57
+ },
3
58
  {
4
59
  "version": "1.0.13",
5
60
  "date": "2026-01-30",