claude-cli-advanced-starter-pack 1.0.14 → 1.0.16
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/cli/menu.js +80 -0
- package/src/commands/init.js +39 -1
- package/src/data/releases.json +50 -0
package/package.json
CHANGED
package/src/cli/menu.js
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import chalk from 'chalk';
|
|
6
6
|
import inquirer from 'inquirer';
|
|
7
|
+
import { existsSync, readFileSync, writeFileSync, mkdirSync } from 'fs';
|
|
8
|
+
import { join, dirname } from 'path';
|
|
7
9
|
import { runSetup } from '../commands/setup.js';
|
|
8
10
|
import { runCreate } from '../commands/create.js';
|
|
9
11
|
import { runList } from '../commands/list.js';
|
|
@@ -22,6 +24,55 @@ import { hasTestingConfig } from '../testing/config.js';
|
|
|
22
24
|
import { showHelp } from '../commands/help.js';
|
|
23
25
|
import { hasValidConfig, getVersion, loadTechStack, saveTechStack } from '../utils.js';
|
|
24
26
|
|
|
27
|
+
/**
|
|
28
|
+
* Get bypass permissions status from settings.json
|
|
29
|
+
*/
|
|
30
|
+
function getBypassPermissionsStatus() {
|
|
31
|
+
const settingsPath = join(process.cwd(), '.claude', 'settings.json');
|
|
32
|
+
if (!existsSync(settingsPath)) {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
try {
|
|
36
|
+
const settings = JSON.parse(readFileSync(settingsPath, 'utf8'));
|
|
37
|
+
return settings.permissions?.defaultMode === 'bypassPermissions';
|
|
38
|
+
} catch {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Toggle bypass permissions in settings.json
|
|
45
|
+
*/
|
|
46
|
+
function toggleBypassPermissions() {
|
|
47
|
+
const settingsPath = join(process.cwd(), '.claude', 'settings.json');
|
|
48
|
+
let settings = {};
|
|
49
|
+
|
|
50
|
+
if (existsSync(settingsPath)) {
|
|
51
|
+
try {
|
|
52
|
+
settings = JSON.parse(readFileSync(settingsPath, 'utf8'));
|
|
53
|
+
} catch {
|
|
54
|
+
settings = {};
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
if (!settings.permissions) {
|
|
59
|
+
settings.permissions = {};
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const currentMode = settings.permissions.defaultMode;
|
|
63
|
+
const newMode = currentMode === 'bypassPermissions' ? 'acceptEdits' : 'bypassPermissions';
|
|
64
|
+
settings.permissions.defaultMode = newMode;
|
|
65
|
+
|
|
66
|
+
// Ensure directory exists
|
|
67
|
+
const dir = dirname(settingsPath);
|
|
68
|
+
if (!existsSync(dir)) {
|
|
69
|
+
mkdirSync(dir, { recursive: true });
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
writeFileSync(settingsPath, JSON.stringify(settings, null, 2), 'utf8');
|
|
73
|
+
return newMode === 'bypassPermissions';
|
|
74
|
+
}
|
|
75
|
+
|
|
25
76
|
/**
|
|
26
77
|
* ASCII Art Banner
|
|
27
78
|
*/
|
|
@@ -40,11 +91,22 @@ const BANNER = `
|
|
|
40
91
|
* Show Project Settings submenu
|
|
41
92
|
*/
|
|
42
93
|
export async function showProjectSettingsMenu() {
|
|
94
|
+
// Get current bypass status for display
|
|
95
|
+
const bypassEnabled = getBypassPermissionsStatus();
|
|
96
|
+
const bypassStatus = bypassEnabled ? chalk.green('ON') : chalk.red('OFF');
|
|
97
|
+
const bypassLine = ` [P] Bypass All Permissions [${bypassStatus}]`;
|
|
98
|
+
const bypassPadding = ' '.repeat(79 - bypassLine.replace(/\x1B\[[0-9;]*m/g, '').length - 1);
|
|
99
|
+
|
|
43
100
|
console.log('');
|
|
44
101
|
console.log(chalk.cyan('╔═══════════════════════════════════════════════════════════════════════════════╗'));
|
|
45
102
|
console.log(chalk.cyan('║') + chalk.bold(' PROJECT CONFIGURATION ') + chalk.cyan('║'));
|
|
46
103
|
console.log(chalk.cyan('╠═══════════════════════════════════════════════════════════════════════════════╣'));
|
|
47
104
|
console.log(chalk.cyan('║') + ' ' + chalk.cyan('║'));
|
|
105
|
+
console.log(chalk.cyan('║') + bypassLine + bypassPadding + chalk.cyan('║'));
|
|
106
|
+
console.log(chalk.cyan('║') + chalk.dim(' └─ Toggle auto-approve all tool calls (use with caution) ') + chalk.cyan('║'));
|
|
107
|
+
console.log(chalk.cyan('║') + ' ' + chalk.cyan('║'));
|
|
108
|
+
console.log(chalk.cyan('╠───────────────────────────────────────────────────────────────────────────────╣'));
|
|
109
|
+
console.log(chalk.cyan('║') + ' ' + chalk.cyan('║'));
|
|
48
110
|
console.log(chalk.cyan('║') + ' [1] GitHub Project Board ' + chalk.cyan('║'));
|
|
49
111
|
console.log(chalk.cyan('║') + chalk.dim(' └─ Connect to GitHub Projects v2 for issue tracking ') + chalk.cyan('║'));
|
|
50
112
|
console.log(chalk.cyan('║') + ' ' + chalk.cyan('║'));
|
|
@@ -71,6 +133,8 @@ export async function showProjectSettingsMenu() {
|
|
|
71
133
|
name: 'settingsAction',
|
|
72
134
|
message: 'Select a configuration area:',
|
|
73
135
|
choices: [
|
|
136
|
+
{ name: `P. Bypass All Permissions [${bypassEnabled ? 'ON' : 'OFF'}]`, value: 'bypass' },
|
|
137
|
+
new inquirer.Separator(),
|
|
74
138
|
{ name: '1. GitHub Project Board', value: 'github' },
|
|
75
139
|
{ name: '2. Deployment Platforms', value: 'deployment' },
|
|
76
140
|
{ name: '3. Tunnel Services', value: 'tunnel' },
|
|
@@ -86,6 +150,22 @@ export async function showProjectSettingsMenu() {
|
|
|
86
150
|
return;
|
|
87
151
|
}
|
|
88
152
|
|
|
153
|
+
// Handle bypass toggle
|
|
154
|
+
if (settingsAction === 'bypass') {
|
|
155
|
+
const newState = toggleBypassPermissions();
|
|
156
|
+
console.log('');
|
|
157
|
+
if (newState) {
|
|
158
|
+
console.log(chalk.green(' ✓ Bypass All Permissions: ON'));
|
|
159
|
+
console.log(chalk.yellow(' All tool calls will be auto-approved'));
|
|
160
|
+
} else {
|
|
161
|
+
console.log(chalk.green(' ✓ Bypass All Permissions: OFF'));
|
|
162
|
+
console.log(chalk.dim(' Using Accept Edits mode (prompts for Edit/Write/Bash)'));
|
|
163
|
+
}
|
|
164
|
+
console.log('');
|
|
165
|
+
await showProjectSettingsMenu();
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
|
|
89
169
|
// Load current tech-stack.json
|
|
90
170
|
const techStack = loadTechStack();
|
|
91
171
|
|
package/src/commands/init.js
CHANGED
|
@@ -49,11 +49,13 @@ const OPTIONAL_FEATURES = [
|
|
|
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.
|
|
52
|
+
description: 'Integration with Happy Coder mobile app for remote session control, checkpoint management, and mobile-optimized responses.',
|
|
53
53
|
commands: ['happy-start'],
|
|
54
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',
|
|
@@ -1846,6 +1848,42 @@ export async function runInit(options = {}) {
|
|
|
1846
1848
|
console.log(chalk.dim(' Run /menu → Project Settings after installation to complete setup.'));
|
|
1847
1849
|
}
|
|
1848
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
|
+
|
|
1849
1887
|
console.log('');
|
|
1850
1888
|
|
|
1851
1889
|
// Step 5: Select slash commands to install
|
package/src/data/releases.json
CHANGED
|
@@ -1,5 +1,55 @@
|
|
|
1
1
|
{
|
|
2
2
|
"releases": [
|
|
3
|
+
{
|
|
4
|
+
"version": "1.0.16",
|
|
5
|
+
"date": "2026-01-30",
|
|
6
|
+
"summary": "Feature: Bypass All Permissions toggle in Project Settings menu",
|
|
7
|
+
"highlights": [
|
|
8
|
+
"Quick toggle for Bypass All Permissions mode from /menu → Project Settings",
|
|
9
|
+
"Live status display shows current state (ON/OFF)",
|
|
10
|
+
"Toggles between bypassPermissions and acceptEdits modes",
|
|
11
|
+
"Updates .claude/settings.json directly"
|
|
12
|
+
],
|
|
13
|
+
"newFeatures": {
|
|
14
|
+
"commands": [],
|
|
15
|
+
"agents": [],
|
|
16
|
+
"skills": [],
|
|
17
|
+
"hooks": [],
|
|
18
|
+
"other": [
|
|
19
|
+
{
|
|
20
|
+
"name": "bypass-permissions-toggle",
|
|
21
|
+
"description": "Quick toggle in Project Settings to enable/disable auto-approve mode"
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
"breaking": [],
|
|
26
|
+
"deprecated": []
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"version": "1.0.15",
|
|
30
|
+
"date": "2026-01-30",
|
|
31
|
+
"summary": "Feature: Optional npm package installation for features (Happy Coder support)",
|
|
32
|
+
"highlights": [
|
|
33
|
+
"Features can now define optional npm packages to install globally",
|
|
34
|
+
"Happy Mode feature prompts to install happy-coder CLI during init",
|
|
35
|
+
"Graceful fallback with manual install instructions on failure",
|
|
36
|
+
"2-minute timeout for npm install operations"
|
|
37
|
+
],
|
|
38
|
+
"newFeatures": {
|
|
39
|
+
"commands": [],
|
|
40
|
+
"agents": [],
|
|
41
|
+
"skills": [],
|
|
42
|
+
"hooks": [],
|
|
43
|
+
"other": [
|
|
44
|
+
{
|
|
45
|
+
"name": "npm-package-install",
|
|
46
|
+
"description": "Features can specify npmPackage and npmInstallPrompt for optional global installs"
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
"breaking": [],
|
|
51
|
+
"deprecated": []
|
|
52
|
+
},
|
|
3
53
|
{
|
|
4
54
|
"version": "1.0.14",
|
|
5
55
|
"date": "2026-01-30",
|