@yancyyu/openhermit 1.6.23 → 1.6.24
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/hermit.mjs +5 -2
- package/package.json +1 -1
package/bin/hermit.mjs
CHANGED
|
@@ -414,13 +414,16 @@ function commandExists(command) {
|
|
|
414
414
|
function ensureClaudeCodeCliIfNeeded(raw) {
|
|
415
415
|
if (!configRequiresClaudeCode(raw) || commandExists('claude')) return;
|
|
416
416
|
|
|
417
|
-
console.log('[openHermit] Claude Code CLI not found
|
|
417
|
+
console.log('[openHermit] Claude Code CLI not found.');
|
|
418
|
+
console.log('[openHermit] Installing @anthropic-ai/claude-code globally. This may take a few minutes...');
|
|
419
|
+
console.log('[openHermit] Running: npm install -g @anthropic-ai/claude-code@latest --prefer-online');
|
|
418
420
|
try {
|
|
419
421
|
execSync('npm install -g @anthropic-ai/claude-code@latest --prefer-online', {
|
|
420
422
|
stdio: 'inherit',
|
|
421
423
|
shell: true,
|
|
422
424
|
});
|
|
423
425
|
} catch (err) {
|
|
426
|
+
console.error('[openHermit] Claude Code CLI install command failed.');
|
|
424
427
|
console.error('[openHermit] Failed to install Claude Code CLI automatically.');
|
|
425
428
|
console.error('[openHermit] Please install it manually: npm install -g @anthropic-ai/claude-code@latest');
|
|
426
429
|
throw err;
|
|
@@ -429,7 +432,7 @@ function ensureClaudeCodeCliIfNeeded(raw) {
|
|
|
429
432
|
if (!commandExists('claude')) {
|
|
430
433
|
throw new Error('Claude Code CLI was installed but `claude` is still not available in PATH');
|
|
431
434
|
}
|
|
432
|
-
console.log('[openHermit] Claude Code CLI installed.');
|
|
435
|
+
console.log('[openHermit] Claude Code CLI installed and available in PATH.');
|
|
433
436
|
}
|
|
434
437
|
|
|
435
438
|
function readCcConnectConfigState() {
|