claude-flow-novice 2.2.4 → 2.2.5
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 +9 -8
- package/scripts/.claude-flow/metrics/agent-metrics.json +1 -0
- package/scripts/.claude-flow/metrics/performance.json +9 -0
- package/scripts/.claude-flow/metrics/task-metrics.json +10 -0
- package/scripts/CLEANUP_OPTIMIZATION_REPORT.json +312 -0
- package/scripts/CLEANUP_PERFORMANCE_OPTIMIZATION.md +387 -0
- package/scripts/CLEANUP_QUICK_START.md +268 -0
- package/scripts/CLEANUP_TEST_RESULTS.md +205 -0
- package/scripts/README.md +339 -0
- package/scripts/ace-query.sh +384 -0
- package/scripts/agent-token-analysis.js +430 -0
- package/scripts/auto-setup.js +332 -0
- package/scripts/build/README.md +167 -0
- package/scripts/build/build-config.js +27 -0
- package/scripts/build/build-prompt-copier.sh +30 -0
- package/scripts/build/performance-monitor.js +869 -0
- package/scripts/build/prepare-publish.js +150 -0
- package/scripts/build/typescript-fixer.js +621 -0
- package/scripts/build/unified-builder.sh +428 -0
- package/scripts/build/update-bin-version.js +32 -0
- package/scripts/build/validate-agents.js +238 -0
- package/scripts/build-index.js +43 -0
- package/scripts/build-orchestrator.js +320 -0
- package/scripts/check-routing-stats.cjs +122 -0
- package/scripts/ci-validation.js +375 -0
- package/scripts/cleanup-blocking-coordination.sh +420 -0
- package/scripts/cleanup-idle-sessions.sh +59 -0
- package/scripts/collect-build-metrics.js +65 -0
- package/scripts/demo/README.md +79 -0
- package/scripts/demo/autoscaling-demo-simplified.js +963 -0
- package/scripts/demo/comprehensive-dashboard-test.js +693 -0
- package/scripts/demo/confidence-log.js +87 -0
- package/scripts/demo/confidence-report.js +82 -0
- package/scripts/demo/demo-multi-swarm-coordination.js +325 -0
- package/scripts/demo/demo-production-deployment.js +399 -0
- package/scripts/demo/demo-visualization-system.js +149 -0
- package/scripts/demo/performance-analysis.cjs +71 -0
- package/scripts/demo/performance-analysis.js +71 -0
- package/scripts/demo/test-autoscaling-demo.js +314 -0
- package/scripts/dependency-optimizer.js +349 -0
- package/scripts/dependency-security-assessment.js +331 -0
- package/scripts/deploy-sdk.sh +176 -0
- package/scripts/deployment-readiness-report.json +179 -0
- package/scripts/dev/README.md +264 -0
- package/scripts/dev/claude-flow-wrapper.sh +35 -0
- package/scripts/dev/claude-monitor.py +419 -0
- package/scripts/dev/claude-sparc.sh +562 -0
- package/scripts/dev/claude-wrapper.sh +17 -0
- package/scripts/dev/demo-phase3-compliance.js +172 -0
- package/scripts/dev/demo-task-system.ts +224 -0
- package/scripts/dev/deployment-validator.js +315 -0
- package/scripts/dev/spawn-claude-terminal.sh +32 -0
- package/scripts/dev/start-portal.sh +506 -0
- package/scripts/dev/start-web-ui.js +15 -0
- package/scripts/dev/stop-portal.sh +311 -0
- package/scripts/dev/validate-examples.ts +288 -0
- package/scripts/dev/validate-phase2.cjs +451 -0
- package/scripts/dev/validate-phase2.js +785 -0
- package/scripts/dev/validate-phase3.cjs +208 -0
- package/scripts/dev/validate-security-remediation.js +1 -0
- package/scripts/ecosystem.config.cjs +90 -0
- package/scripts/fix-js-extensions.js +167 -0
- package/scripts/generate-basic-types.js +73 -0
- package/scripts/generate-changelog.js +318 -0
- package/scripts/git-hooks/pre-commit.sh +143 -0
- package/scripts/health-checks.js +634 -0
- package/scripts/hook-wrapper.sh +54 -0
- package/scripts/install/README.md +375 -0
- package/scripts/install/REDIS_SETUP_VALIDATION.json +245 -0
- package/scripts/install/check-prerequisites.js +303 -0
- package/scripts/install/config-wizard.js +606 -0
- package/scripts/install/dependency-checker.js +385 -0
- package/scripts/install/health-check.js +765 -0
- package/scripts/install/install.js +256 -0
- package/scripts/install/installation-benchmark.js +461 -0
- package/scripts/install/quick-install.js +720 -0
- package/scripts/install/quick-start-wizard.js +295 -0
- package/scripts/install/redis-cli.js +289 -0
- package/scripts/install/redis-install-guides.md +407 -0
- package/scripts/install/redis-setup.js +559 -0
- package/scripts/install/redis-test.js +278 -0
- package/scripts/install/service-manager.js +672 -0
- package/scripts/install/setup.js +832 -0
- package/scripts/install/uninstall.js +526 -0
- package/scripts/install/update.js +461 -0
- package/scripts/install-pre-commit-hook.sh +127 -0
- package/scripts/legacy/README.md +272 -0
- package/scripts/legacy/batch-fix-ts.sh +54 -0
- package/scripts/legacy/build-migration.sh +105 -0
- package/scripts/legacy/build-monitor.js +209 -0
- package/scripts/legacy/build-with-filter.sh +84 -0
- package/scripts/legacy/build-workaround.sh +71 -0
- package/scripts/legacy/fix-ts-advanced.js +358 -0
- package/scripts/legacy/fix-ts-final.sh +50 -0
- package/scripts/legacy/fix-ts-targeted.sh +49 -0
- package/scripts/legacy/fix-typescript-errors.js +305 -0
- package/scripts/legacy/force-build.sh +63 -0
- package/scripts/legacy/optimize-performance.js +400 -0
- package/scripts/legacy/performance-monitor.js +263 -0
- package/scripts/legacy/performance-monitoring.js +532 -0
- package/scripts/legacy/performance-test-runner.js +645 -0
- package/scripts/legacy/quick-fix-ts.js +281 -0
- package/scripts/legacy/safe-build.sh +63 -0
- package/scripts/memory-monitor-coordinator.js +322 -0
- package/scripts/migrate-to-sdk.sh +520 -0
- package/scripts/migration/QUICK-START.md +189 -0
- package/scripts/migration/QUICK-START.md.backup-1760135091363 +189 -0
- package/scripts/migration/README.md +464 -0
- package/scripts/migration/TASK-1.3.2-COMPLETION-REPORT.md +500 -0
- package/scripts/migration/TASK-1.3.2-COMPLETION-REPORT.md.backup-1760135091348 +500 -0
- package/scripts/migration/UPDATE-PATHS-README.md +464 -0
- package/scripts/migration/UPDATE-PATHS-README.md.backup-1760135091337 +464 -0
- package/scripts/migration/example-patterns.json +19 -0
- package/scripts/migration/install-arm64.js +78 -0
- package/scripts/migration/install.js +83 -0
- package/scripts/migration/migrate-hooks.js +173 -0
- package/scripts/migration/migration-examples.ts +318 -0
- package/scripts/migration/reorganize-workspace.js +504 -0
- package/scripts/migration/test-update-paths.js +359 -0
- package/scripts/migration/update-paths.js +664 -0
- package/scripts/migration/validate-migration.js +647 -0
- package/scripts/monitor-loop.sh +65 -0
- package/scripts/monitor-memory.sh +47 -0
- package/scripts/monitor-migration.js +339 -0
- package/scripts/monitor.py +43 -0
- package/scripts/monitoring/README.md +178 -0
- package/scripts/monitoring/alert-monitor.sh +220 -0
- package/scripts/monitoring/analyze-resources.sh +199 -0
- package/scripts/monitoring/dashboards/rate-limiting-dashboard.json +211 -0
- package/scripts/monitoring/dynamic-monitor.sh +85 -0
- package/scripts/monitoring/launch-stability-test.sh +184 -0
- package/scripts/monitoring/monitor-test.sh +93 -0
- package/scripts/monitoring/pre-test-validation.sh +208 -0
- package/scripts/monitoring/quick-test-alerting.sh +118 -0
- package/scripts/monitoring/quick-test-rate-limiting.sh +206 -0
- package/scripts/monitoring/rate-limiting-monitor.sh +380 -0
- package/scripts/monitoring/resource-monitor.sh +126 -0
- package/scripts/monitoring/stability-monitor.js +429 -0
- package/scripts/monitoring/test-monitor-quick.sh +54 -0
- package/scripts/monitoring/view-alerts.sh +307 -0
- package/scripts/npm-metrics-collector.js +482 -0
- package/scripts/npm-package-validation.cjs +299 -0
- package/scripts/optimization/build-optimizer.js +438 -0
- package/scripts/optimization/config-validator.js +761 -0
- package/scripts/optimization/test-optimization.js +432 -0
- package/scripts/optimization/unified-activation.js +839 -0
- package/scripts/optimize-package-swarm.js +54 -0
- package/scripts/performance/ACTIVATION_COMMANDS.md +292 -0
- package/scripts/performance/sqlite-enhanced-activation.sh +583 -0
- package/scripts/performance/test-enhanced-backend.sh +504 -0
- package/scripts/performance-monitor.js +644 -0
- package/scripts/performance-test-runner.js +698 -0
- package/scripts/post-deployment-monitoring.js +350 -0
- package/scripts/post-edit-pipeline.js +2091 -0
- package/scripts/post-install-claude-md.js +78 -0
- package/scripts/postinstall.js +79 -0
- package/scripts/pre-publish-validation.cjs +212 -0
- package/scripts/pre-publish-validation.js +429 -0
- package/scripts/redis-lua/cleanup-blocking-coordination.lua +198 -0
- package/scripts/release-announcement.js +425 -0
- package/scripts/release-notification.js +248 -0
- package/scripts/release-rollback.js +376 -0
- package/scripts/release-validation.js +460 -0
- package/scripts/rollback-sdk.sh +66 -0
- package/scripts/run-production-validation.ts +590 -0
- package/scripts/run-stability-validation.sh +687 -0
- package/scripts/security/README.md +339 -0
- package/scripts/security/deployment-validation.cjs +279 -0
- package/scripts/security/envelope-encryption-confidence-report.cjs +422 -0
- package/scripts/security/install-git-hooks.sh +132 -0
- package/scripts/security/install-git-secrets.sh +295 -0
- package/scripts/security/rotate-api-keys.js +469 -0
- package/scripts/security/ruv-swarm-safe.js +74 -0
- package/scripts/security/security-audit.cjs +538 -0
- package/scripts/security/setup-redis-auth.sh +397 -0
- package/scripts/security/validate-envelope-encryption.cjs +340 -0
- package/scripts/security-scan.js +492 -0
- package/scripts/src/web/frontend/.claude-flow/metrics/agent-metrics.json +1 -0
- package/scripts/src/web/frontend/.claude-flow/metrics/performance.json +9 -0
- package/scripts/src/web/frontend/.claude-flow/metrics/task-metrics.json +10 -0
- package/scripts/switch-api.sh +158 -0
- package/scripts/sync-agents.js +290 -0
- package/scripts/test/50-agent-test.js +625 -0
- package/scripts/test/NEW_STABILITY_TEST_GUIDE.md +407 -0
- package/scripts/test/README.md +236 -0
- package/scripts/test/STABILITY_TEST_EXAMPLE.md +347 -0
- package/scripts/test/STABILITY_TEST_README.md +480 -0
- package/scripts/test/agent-worker.js +309 -0
- package/scripts/test/ai-coordination-test.js +650 -0
- package/scripts/test/ai-mesh-coordination-test.js +416 -0
- package/scripts/test/check-links.ts +274 -0
- package/scripts/test/check-performance-regression.ts +168 -0
- package/scripts/test/cli-agent-coordination-test.js +313 -0
- package/scripts/test/coordinator-multilingual-test.js +396 -0
- package/scripts/test/coordinator-transparency-demo.js +585 -0
- package/scripts/test/coverage-report.ts +692 -0
- package/scripts/test/generate-swarm-tests.js +633 -0
- package/scripts/test/integration-test-validation.cjs +253 -0
- package/scripts/test/load-test-swarm.js +576 -0
- package/scripts/test/mesh-coordination-zero-overlap-test.js +740 -0
- package/scripts/test/multilingual-hello-world-test.js +390 -0
- package/scripts/test/quick-multilingual-demo.js +464 -0
- package/scripts/test/real-agent-test.js +312 -0
- package/scripts/test/run-phase3-compliance-tests.js +427 -0
- package/scripts/test/run-stability-test-examples.sh +292 -0
- package/scripts/test/stability-results/stability-metrics.jsonl +83 -0
- package/scripts/test/stability-results/stability-test-report.json +128 -0
- package/scripts/test/stability-results/stability-test.log +1827 -0
- package/scripts/test/stability-test-50-agents.js +734 -0
- package/scripts/test/test-batch-tasks.ts +29 -0
- package/scripts/test/test-byzantine-resolution.js +246 -0
- package/scripts/test/test-claude-spawn-options.sh +63 -0
- package/scripts/test/test-cli-wizard.js +331 -0
- package/scripts/test/test-comprehensive.js +401 -0
- package/scripts/test/test-coordination-features.ts +238 -0
- package/scripts/test/test-fallback-systems.js +276 -0
- package/scripts/test/test-init-command.ts +302 -0
- package/scripts/test/test-mcp.ts +251 -0
- package/scripts/test/test-runner.ts +568 -0
- package/scripts/test/test-swarm-integration.sh +92 -0
- package/scripts/test/test-swarm.ts +142 -0
- package/scripts/test/validation-summary.ts +408 -0
- package/scripts/test-cleanup-performance.sh +416 -0
- package/scripts/test-dashboard-auth.cjs +203 -0
- package/scripts/test-docker-deployment.sh +207 -0
- package/scripts/test-npm-package.cjs +167 -0
- package/scripts/test-provider-routing.cjs +226 -0
- package/scripts/test-routing-telemetry.cjs +147 -0
- package/scripts/test-runner.cjs +154 -0
- package/scripts/test-zai-10k.cjs +81 -0
- package/scripts/test-zai-api.cjs +191 -0
- package/scripts/test-zai-diagnostic.cjs +151 -0
- package/scripts/test-zai-final.cjs +128 -0
- package/scripts/test-zai-with-env.cjs +85 -0
- package/scripts/utils/README.md +261 -0
- package/scripts/utils/clean-build-artifacts.sh +94 -0
- package/scripts/utils/cleanup-root.sh +69 -0
- package/scripts/utils/fix-cliffy-imports.js +307 -0
- package/scripts/utils/fix-duplicate-imports.js +114 -0
- package/scripts/utils/fix-error-handling.cjs +70 -0
- package/scripts/utils/fix-import-paths.js +104 -0
- package/scripts/utils/fix-imports.js +116 -0
- package/scripts/utils/fix-shebang.js +78 -0
- package/scripts/utils/fix-test-modules.js +27 -0
- package/scripts/utils/fix-timezone-issue-246.js +200 -0
- package/scripts/utils/fix-ts-comprehensive.py +182 -0
- package/scripts/utils/fix-ts-targeted-batch.js +250 -0
- package/scripts/utils/remove-benchmark-conflicts.sh +140 -0
- package/scripts/utils/simple-test-fixer.js +190 -0
- package/scripts/utils/validate-metrics-structure.cjs +144 -0
- package/scripts/validate-agent-hooks.js +506 -0
- package/scripts/validate-changelog.js +241 -0
- package/scripts/validate-coordination-cli.js +69 -0
- package/scripts/validate-coordination-toggle-integration.cjs +501 -0
- package/scripts/validate-docker-infrastructure.sh +502 -0
- package/scripts/validate-entry-points.js +300 -0
- package/scripts/validate-stage3-performance.ts +377 -0
- package/scripts/validate-template-bundling.js +180 -0
- package/scripts/validation/README.md +33 -0
- package/scripts/validation/acl-security-validation.cjs +214 -0
- package/scripts/validation/acl-security-validation.js +402 -0
- package/scripts/validation/byzantine-verification.js +407 -0
- package/scripts/validation/final-phase-2-consensus.cjs +219 -0
- package/scripts/validation/final-security-validation.js +791 -0
- package/scripts/validation/final-wasm-validation.cjs +840 -0
- package/scripts/validation/integration-test-analysis.js +105 -0
- package/scripts/validation/phase-0-comprehensive-validation.js +474 -0
- package/scripts/validation/phase-0-consensus-report.js +139 -0
- package/scripts/validation/phase-0-final-report.js +112 -0
- package/scripts/validation/phase-0-redis-consensus-report.js +129 -0
- package/scripts/validation/phase-0-validation-improved.js +490 -0
- package/scripts/validation/phase-0-validation-test.js +65 -0
- package/scripts/validation/phase-1-consensus-report.cjs +342 -0
- package/scripts/validation/phase-1-consensus-validation.cjs +551 -0
- package/scripts/validation/phase-1-consensus-validation.js +551 -0
- package/scripts/validation/phase-2-consensus-report.cjs +186 -0
- package/scripts/validation/phase-2-validation.cjs +171 -0
- package/scripts/validation/phase-2-validation.js +171 -0
- package/scripts/validation/phase-4-consensus-report.js +181 -0
- package/scripts/validation/phase-4-final-validation.js +351 -0
- package/scripts/validation/phase-5-consensus-report.cjs +113 -0
- package/scripts/validation/phase-5-consensus-report.js +113 -0
- package/scripts/validation/security-analysis.js +49 -0
- package/scripts/validation/security-validation.js +492 -0
- package/scripts/validation/simple-security-validation.js +464 -0
- package/scripts/verify-installation.js +112 -0
- package/scripts/verify-mcp-server.js +86 -0
- package/scripts/verify-sdk-phase1.cjs +293 -0
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Quick-Start Interactive Wizard
|
|
5
|
+
*
|
|
6
|
+
* Streamlined setup wizard with smart defaults and minimal prompts
|
|
7
|
+
* Target: <5 minutes setup time including Redis installation
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import inquirer from 'inquirer';
|
|
11
|
+
import chalk from 'chalk';
|
|
12
|
+
import ora from 'ora';
|
|
13
|
+
import QuickInstaller from './quick-install.js';
|
|
14
|
+
|
|
15
|
+
class QuickStartWizard {
|
|
16
|
+
constructor(options = {}) {
|
|
17
|
+
this.skipIntro = options.skipIntro || false;
|
|
18
|
+
this.autoAccept = options.autoAccept || false;
|
|
19
|
+
this.verbose = options.verbose || false;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
async run() {
|
|
23
|
+
if (!this.skipIntro) {
|
|
24
|
+
this.displayIntro();
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
try {
|
|
28
|
+
// Step 1: Minimal configuration questions (auto-defaults)
|
|
29
|
+
const config = await this.collectConfiguration();
|
|
30
|
+
|
|
31
|
+
// Step 2: Confirmation (optional with auto-accept)
|
|
32
|
+
if (!this.autoAccept) {
|
|
33
|
+
const confirmed = await this.confirmInstallation(config);
|
|
34
|
+
if (!confirmed) {
|
|
35
|
+
console.log(chalk.yellow('\n👋 Installation cancelled. Run again when ready.\n'));
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Step 3: Execute quick installation
|
|
41
|
+
const installer = new QuickInstaller({
|
|
42
|
+
quickStart: true,
|
|
43
|
+
skipRedis: config.skipRedis,
|
|
44
|
+
verbose: this.verbose
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
console.log(chalk.cyan('\n⚡ Starting quick installation...\n'));
|
|
48
|
+
const success = await installer.install();
|
|
49
|
+
|
|
50
|
+
if (success) {
|
|
51
|
+
this.displaySuccessMessage(config);
|
|
52
|
+
} else {
|
|
53
|
+
this.displayFailureMessage();
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return success;
|
|
57
|
+
} catch (error) {
|
|
58
|
+
console.error(chalk.red(`\n❌ Wizard error: ${error.message}`));
|
|
59
|
+
if (this.verbose) {
|
|
60
|
+
console.error(chalk.gray(`\nStack trace:\n${error.stack}`));
|
|
61
|
+
}
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
displayIntro() {
|
|
67
|
+
console.clear();
|
|
68
|
+
console.log(chalk.blue.bold('\n⚡ Claude Flow Novice - Quick Start Wizard\n'));
|
|
69
|
+
console.log(chalk.gray('Setup your AI agent orchestration environment in under 5 minutes\n'));
|
|
70
|
+
console.log(chalk.cyan('This wizard will:'));
|
|
71
|
+
console.log(chalk.gray(' 1. Check dependencies (Node.js, npm)'));
|
|
72
|
+
console.log(chalk.gray(' 2. Install Redis automatically (Docker or native)'));
|
|
73
|
+
console.log(chalk.gray(' 3. Configure your environment with smart defaults'));
|
|
74
|
+
console.log(chalk.gray(' 4. Deploy templates and validate installation\n'));
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
async collectConfiguration() {
|
|
78
|
+
console.log(chalk.cyan('🔧 Configuration\n'));
|
|
79
|
+
|
|
80
|
+
// Use smart defaults with minimal prompts
|
|
81
|
+
const questions = [
|
|
82
|
+
{
|
|
83
|
+
type: 'confirm',
|
|
84
|
+
name: 'autoInstallRedis',
|
|
85
|
+
message: 'Automatically install Redis?',
|
|
86
|
+
default: true,
|
|
87
|
+
when: () => !this.autoAccept
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
type: 'list',
|
|
91
|
+
name: 'redisMethod',
|
|
92
|
+
message: 'Preferred Redis installation method:',
|
|
93
|
+
choices: [
|
|
94
|
+
{ name: 'Docker (fastest, recommended)', value: 'docker' },
|
|
95
|
+
{ name: 'Native (platform-specific)', value: 'native' },
|
|
96
|
+
{ name: 'Skip (I already have Redis)', value: 'skip' }
|
|
97
|
+
],
|
|
98
|
+
default: 'docker',
|
|
99
|
+
when: (answers) => answers.autoInstallRedis !== false && !this.autoAccept
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
type: 'confirm',
|
|
103
|
+
name: 'useDefaults',
|
|
104
|
+
message: 'Use default configuration for all other settings?',
|
|
105
|
+
default: true,
|
|
106
|
+
when: () => !this.autoAccept
|
|
107
|
+
}
|
|
108
|
+
];
|
|
109
|
+
|
|
110
|
+
const answers = await inquirer.prompt(questions);
|
|
111
|
+
|
|
112
|
+
// Apply smart defaults
|
|
113
|
+
const config = {
|
|
114
|
+
autoInstallRedis: this.autoAccept ? true : answers.autoInstallRedis !== false,
|
|
115
|
+
redisMethod: this.autoAccept ? 'docker' : (answers.redisMethod || 'docker'),
|
|
116
|
+
skipRedis: this.autoAccept ? false : (answers.redisMethod === 'skip'),
|
|
117
|
+
useDefaults: this.autoAccept ? true : (answers.useDefaults !== false),
|
|
118
|
+
features: {
|
|
119
|
+
swarmOrchestration: true,
|
|
120
|
+
memoryPersistence: true,
|
|
121
|
+
autoSpawn: true
|
|
122
|
+
},
|
|
123
|
+
redis: {
|
|
124
|
+
host: 'localhost',
|
|
125
|
+
port: 6379
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
// Advanced configuration (only if not using defaults)
|
|
130
|
+
if (!config.useDefaults && !this.autoAccept) {
|
|
131
|
+
const advanced = await this.collectAdvancedConfiguration();
|
|
132
|
+
Object.assign(config, advanced);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
return config;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
async collectAdvancedConfiguration() {
|
|
139
|
+
console.log(chalk.cyan('\n⚙️ Advanced Configuration\n'));
|
|
140
|
+
|
|
141
|
+
const questions = [
|
|
142
|
+
{
|
|
143
|
+
type: 'number',
|
|
144
|
+
name: 'maxAgents',
|
|
145
|
+
message: 'Maximum agents per swarm:',
|
|
146
|
+
default: 10,
|
|
147
|
+
validate: (input) => (input > 0 && input <= 100) || 'Must be between 1 and 100'
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
type: 'number',
|
|
151
|
+
name: 'redisPort',
|
|
152
|
+
message: 'Redis port:',
|
|
153
|
+
default: 6379,
|
|
154
|
+
validate: (input) => (input > 1024 && input < 65536) || 'Must be between 1024 and 65535'
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
type: 'checkbox',
|
|
158
|
+
name: 'features',
|
|
159
|
+
message: 'Additional features:',
|
|
160
|
+
choices: [
|
|
161
|
+
{ name: 'Performance monitoring', value: 'monitoring', checked: false },
|
|
162
|
+
{ name: 'Neural learning', value: 'neural', checked: false },
|
|
163
|
+
{ name: 'Git integration', value: 'git', checked: true }
|
|
164
|
+
]
|
|
165
|
+
}
|
|
166
|
+
];
|
|
167
|
+
|
|
168
|
+
const answers = await inquirer.prompt(questions);
|
|
169
|
+
|
|
170
|
+
return {
|
|
171
|
+
maxAgents: answers.maxAgents || 10,
|
|
172
|
+
redis: {
|
|
173
|
+
host: 'localhost',
|
|
174
|
+
port: answers.redisPort || 6379
|
|
175
|
+
},
|
|
176
|
+
features: {
|
|
177
|
+
swarmOrchestration: true,
|
|
178
|
+
memoryPersistence: true,
|
|
179
|
+
autoSpawn: true,
|
|
180
|
+
monitoring: answers.features?.includes('monitoring') || false,
|
|
181
|
+
neural: answers.features?.includes('neural') || false,
|
|
182
|
+
git: answers.features?.includes('git') || true
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
async confirmInstallation(config) {
|
|
188
|
+
console.log(chalk.cyan('\n📋 Installation Summary:\n'));
|
|
189
|
+
|
|
190
|
+
console.log(chalk.gray('Configuration:'));
|
|
191
|
+
console.log(` Redis: ${config.skipRedis ? 'Skip (using existing)' : `Auto-install (${config.redisMethod})`}`);
|
|
192
|
+
console.log(` Max agents: ${config.maxAgents || 10}`);
|
|
193
|
+
console.log(` Features: Swarm orchestration, Memory persistence, Auto-spawn`);
|
|
194
|
+
|
|
195
|
+
if (config.features?.monitoring) {
|
|
196
|
+
console.log(` Optional: Performance monitoring`);
|
|
197
|
+
}
|
|
198
|
+
if (config.features?.neural) {
|
|
199
|
+
console.log(` Optional: Neural learning`);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
console.log(chalk.gray('\nEstimated time: 2-5 minutes'));
|
|
203
|
+
console.log();
|
|
204
|
+
|
|
205
|
+
const { confirmed } = await inquirer.prompt([
|
|
206
|
+
{
|
|
207
|
+
type: 'confirm',
|
|
208
|
+
name: 'confirmed',
|
|
209
|
+
message: 'Proceed with installation?',
|
|
210
|
+
default: true
|
|
211
|
+
}
|
|
212
|
+
]);
|
|
213
|
+
|
|
214
|
+
return confirmed;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
displaySuccessMessage(config) {
|
|
218
|
+
console.log('\n' + chalk.green.bold('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'));
|
|
219
|
+
console.log(chalk.green.bold('✅ Installation Complete!'));
|
|
220
|
+
console.log(chalk.green.bold('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n'));
|
|
221
|
+
|
|
222
|
+
console.log(chalk.cyan('🚀 Quick Start Commands:\n'));
|
|
223
|
+
console.log(chalk.white(' Check status:'));
|
|
224
|
+
console.log(chalk.gray(' $ npx claude-flow-novice status\n'));
|
|
225
|
+
console.log(chalk.white(' Start your first swarm:'));
|
|
226
|
+
console.log(chalk.gray(' $ npx claude-flow-novice swarm "Create a REST API"\n'));
|
|
227
|
+
console.log(chalk.white(' List available agents:'));
|
|
228
|
+
console.log(chalk.gray(' $ npx claude-flow-novice agents list\n'));
|
|
229
|
+
|
|
230
|
+
console.log(chalk.cyan('📚 Documentation:\n'));
|
|
231
|
+
console.log(chalk.gray(' • CLAUDE.md - Main configuration file'));
|
|
232
|
+
console.log(chalk.gray(' • .claude/settings.json - System settings'));
|
|
233
|
+
console.log(chalk.gray(' • memory/ - Agent memory storage'));
|
|
234
|
+
console.log(chalk.gray(' • coordination/ - Swarm coordination\n'));
|
|
235
|
+
|
|
236
|
+
console.log(chalk.cyan('💡 Next Steps:\n'));
|
|
237
|
+
console.log(chalk.gray(' 1. Review CLAUDE.md for detailed instructions'));
|
|
238
|
+
console.log(chalk.gray(' 2. Test Redis connection: redis-cli ping'));
|
|
239
|
+
console.log(chalk.gray(' 3. Start your first swarm with a simple task\n'));
|
|
240
|
+
|
|
241
|
+
if (!config.skipRedis && config.redisMethod === 'docker') {
|
|
242
|
+
console.log(chalk.yellow('⚠️ Redis Running in Docker:\n'));
|
|
243
|
+
console.log(chalk.gray(' • Container name: claude-flow-redis'));
|
|
244
|
+
console.log(chalk.gray(' • Stop: docker stop claude-flow-redis'));
|
|
245
|
+
console.log(chalk.gray(' • Start: docker start claude-flow-redis'));
|
|
246
|
+
console.log(chalk.gray(' • Remove: docker rm claude-flow-redis\n'));
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
displayFailureMessage() {
|
|
251
|
+
console.log('\n' + chalk.red.bold('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'));
|
|
252
|
+
console.log(chalk.red.bold('❌ Installation Failed'));
|
|
253
|
+
console.log(chalk.red.bold('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n'));
|
|
254
|
+
|
|
255
|
+
console.log(chalk.cyan('🔧 Troubleshooting:\n'));
|
|
256
|
+
|
|
257
|
+
console.log(chalk.yellow('Common Issues:\n'));
|
|
258
|
+
console.log(chalk.gray(' 1. Node.js version'));
|
|
259
|
+
console.log(chalk.white(' Ensure Node.js v20+ is installed'));
|
|
260
|
+
console.log(chalk.gray(' Check: node --version\n'));
|
|
261
|
+
|
|
262
|
+
console.log(chalk.gray(' 2. Redis installation'));
|
|
263
|
+
console.log(chalk.white(' Try Docker method: docker run -d -p 6379:6379 redis:alpine'));
|
|
264
|
+
console.log(chalk.gray(' Or install manually for your platform\n'));
|
|
265
|
+
|
|
266
|
+
console.log(chalk.gray(' 3. Permissions'));
|
|
267
|
+
console.log(chalk.white(' Ensure write permissions in current directory'));
|
|
268
|
+
console.log(chalk.gray(' Try: sudo chown -R $USER:$USER .\n'));
|
|
269
|
+
|
|
270
|
+
console.log(chalk.cyan('📞 Get Help:\n'));
|
|
271
|
+
console.log(chalk.gray(' • GitHub Issues: https://github.com/masharratt/claude-flow-novice/issues'));
|
|
272
|
+
console.log(chalk.gray(' • Documentation: https://github.com/masharratt/claude-flow-novice#readme'));
|
|
273
|
+
console.log(chalk.gray(' • Re-run wizard: npx claude-flow-novice init --quick-start\n'));
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
// CLI execution
|
|
278
|
+
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
279
|
+
const args = process.argv.slice(2);
|
|
280
|
+
const options = {
|
|
281
|
+
skipIntro: args.includes('--skip-intro'),
|
|
282
|
+
autoAccept: args.includes('--auto-accept') || args.includes('-y'),
|
|
283
|
+
verbose: args.includes('--verbose') || args.includes('-v')
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
const wizard = new QuickStartWizard(options);
|
|
287
|
+
wizard.run().then(success => {
|
|
288
|
+
process.exit(success ? 0 : 1);
|
|
289
|
+
}).catch(error => {
|
|
290
|
+
console.error(chalk.red(`\n❌ Fatal error: ${error.message}`));
|
|
291
|
+
process.exit(1);
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
export default QuickStartWizard;
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Claude Flow Novice - Redis CLI Wrapper
|
|
5
|
+
*
|
|
6
|
+
* Unified command-line interface for Redis setup, testing, and management
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { program } from 'commander';
|
|
10
|
+
import chalk from 'chalk';
|
|
11
|
+
import RedisSetup from './redis-setup.js';
|
|
12
|
+
import RedisConnectionTest from './redis-test.js';
|
|
13
|
+
import { readFileSync } from 'fs';
|
|
14
|
+
import { join, dirname } from 'path';
|
|
15
|
+
import { fileURLToPath } from 'url';
|
|
16
|
+
|
|
17
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
18
|
+
const __dirname = dirname(__filename);
|
|
19
|
+
|
|
20
|
+
// Load package.json for version
|
|
21
|
+
let version = '1.0.0';
|
|
22
|
+
try {
|
|
23
|
+
const pkg = JSON.parse(readFileSync(join(__dirname, '../../package.json'), 'utf8'));
|
|
24
|
+
version = pkg.version;
|
|
25
|
+
} catch (error) {
|
|
26
|
+
// Use default version
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
program
|
|
30
|
+
.name('redis-cli-wrapper')
|
|
31
|
+
.description('Redis setup and management for Claude Flow Novice')
|
|
32
|
+
.version(version);
|
|
33
|
+
|
|
34
|
+
// Setup command
|
|
35
|
+
program
|
|
36
|
+
.command('setup')
|
|
37
|
+
.description('Install and configure Redis')
|
|
38
|
+
.option('--skip-install', 'Skip automatic installation')
|
|
39
|
+
.option('--port <port>', 'Redis port (default: 6379)', '6379')
|
|
40
|
+
.option('--host <host>', 'Redis host (default: localhost)', 'localhost')
|
|
41
|
+
.option('--password <password>', 'Redis password (optional)')
|
|
42
|
+
.option('--max-memory <size>', 'Maximum memory (default: 256mb)', '256mb')
|
|
43
|
+
.option('--no-persistence', 'Disable persistence')
|
|
44
|
+
.action(async (options) => {
|
|
45
|
+
try {
|
|
46
|
+
const setup = new RedisSetup({
|
|
47
|
+
skipInstallation: options.skipInstall,
|
|
48
|
+
port: parseInt(options.port),
|
|
49
|
+
host: options.host,
|
|
50
|
+
password: options.password,
|
|
51
|
+
maxMemory: options.maxMemory,
|
|
52
|
+
persistence: options.persistence
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
const success = await setup.setup();
|
|
56
|
+
process.exit(success ? 0 : 1);
|
|
57
|
+
} catch (error) {
|
|
58
|
+
console.error(chalk.red('Setup failed:'), error.message);
|
|
59
|
+
process.exit(1);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
// Test command
|
|
64
|
+
program
|
|
65
|
+
.command('test')
|
|
66
|
+
.description('Test Redis connection and functionality')
|
|
67
|
+
.option('--host <host>', 'Redis host (default: localhost)', 'localhost')
|
|
68
|
+
.option('--port <port>', 'Redis port (default: 6379)', '6379')
|
|
69
|
+
.option('--password <password>', 'Redis password (optional)')
|
|
70
|
+
.action(async (options) => {
|
|
71
|
+
try {
|
|
72
|
+
const tester = new RedisConnectionTest({
|
|
73
|
+
host: options.host,
|
|
74
|
+
port: parseInt(options.port),
|
|
75
|
+
password: options.password
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
const results = await tester.runAllTests();
|
|
79
|
+
const exitCode = results.connectivity && results.errors.length === 0 ? 0 : 1;
|
|
80
|
+
process.exit(exitCode);
|
|
81
|
+
} catch (error) {
|
|
82
|
+
console.error(chalk.red('Test failed:'), error.message);
|
|
83
|
+
process.exit(1);
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
// Status command
|
|
88
|
+
program
|
|
89
|
+
.command('status')
|
|
90
|
+
.description('Check Redis server status')
|
|
91
|
+
.action(async () => {
|
|
92
|
+
try {
|
|
93
|
+
const { execSync } = await import('child_process');
|
|
94
|
+
|
|
95
|
+
console.log(chalk.blue.bold('🔍 Redis Status\n'));
|
|
96
|
+
|
|
97
|
+
// Check if Redis is running
|
|
98
|
+
try {
|
|
99
|
+
const response = execSync('redis-cli ping', { encoding: 'utf8', timeout: 5000 }).trim();
|
|
100
|
+
|
|
101
|
+
if (response === 'PONG') {
|
|
102
|
+
console.log(chalk.green('✅ Redis is running\n'));
|
|
103
|
+
|
|
104
|
+
// Get server info
|
|
105
|
+
try {
|
|
106
|
+
const info = execSync('redis-cli INFO server', { encoding: 'utf8', timeout: 5000 });
|
|
107
|
+
|
|
108
|
+
// Parse version
|
|
109
|
+
const versionMatch = info.match(/redis_version:([^\r\n]+)/);
|
|
110
|
+
const version = versionMatch ? versionMatch[1].trim() : 'unknown';
|
|
111
|
+
|
|
112
|
+
// Parse uptime
|
|
113
|
+
const uptimeMatch = info.match(/uptime_in_seconds:([^\r\n]+)/);
|
|
114
|
+
const uptime = uptimeMatch ? parseInt(uptimeMatch[1].trim()) : 0;
|
|
115
|
+
const uptimeHours = Math.floor(uptime / 3600);
|
|
116
|
+
const uptimeMinutes = Math.floor((uptime % 3600) / 60);
|
|
117
|
+
|
|
118
|
+
console.log(chalk.cyan('Server Information:'));
|
|
119
|
+
console.log(` Version: ${version}`);
|
|
120
|
+
console.log(` Uptime: ${uptimeHours}h ${uptimeMinutes}m\n`);
|
|
121
|
+
|
|
122
|
+
// Get memory info
|
|
123
|
+
const memInfo = execSync('redis-cli INFO memory', { encoding: 'utf8', timeout: 5000 });
|
|
124
|
+
const usedMemMatch = memInfo.match(/used_memory_human:([^\r\n]+)/);
|
|
125
|
+
const usedMem = usedMemMatch ? usedMemMatch[1].trim() : 'unknown';
|
|
126
|
+
|
|
127
|
+
console.log(chalk.cyan('Memory:'));
|
|
128
|
+
console.log(` Used: ${usedMem}\n`);
|
|
129
|
+
|
|
130
|
+
// Get database stats
|
|
131
|
+
const dbInfo = execSync('redis-cli INFO keyspace', { encoding: 'utf8', timeout: 5000 });
|
|
132
|
+
console.log(chalk.cyan('Databases:'));
|
|
133
|
+
|
|
134
|
+
const dbMatches = dbInfo.matchAll(/db(\d+):keys=(\d+),expires=(\d+)/g);
|
|
135
|
+
let hasData = false;
|
|
136
|
+
for (const match of dbMatches) {
|
|
137
|
+
hasData = true;
|
|
138
|
+
console.log(` db${match[1]}: ${match[2]} keys (${match[3]} with expiration)`);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
if (!hasData) {
|
|
142
|
+
console.log(' (no data stored)');
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
process.exit(0);
|
|
146
|
+
} catch (infoError) {
|
|
147
|
+
console.log(chalk.yellow('⚠️ Could not retrieve detailed server information'));
|
|
148
|
+
process.exit(1);
|
|
149
|
+
}
|
|
150
|
+
} else {
|
|
151
|
+
console.log(chalk.red('❌ Redis responded unexpectedly'));
|
|
152
|
+
process.exit(1);
|
|
153
|
+
}
|
|
154
|
+
} catch (error) {
|
|
155
|
+
console.log(chalk.red('❌ Redis is not running'));
|
|
156
|
+
console.log(chalk.yellow('\nTo start Redis:'));
|
|
157
|
+
console.log(' • macOS: brew services start redis');
|
|
158
|
+
console.log(' • Linux: sudo systemctl start redis-server');
|
|
159
|
+
console.log(' • Windows: redis-server or net start redis\n');
|
|
160
|
+
process.exit(1);
|
|
161
|
+
}
|
|
162
|
+
} catch (error) {
|
|
163
|
+
console.error(chalk.red('Error checking status:'), error.message);
|
|
164
|
+
process.exit(1);
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
// Start command
|
|
169
|
+
program
|
|
170
|
+
.command('start')
|
|
171
|
+
.description('Start Redis server')
|
|
172
|
+
.action(async () => {
|
|
173
|
+
try {
|
|
174
|
+
const { execSync, platform } = await import('child_process');
|
|
175
|
+
const os = await import('os');
|
|
176
|
+
|
|
177
|
+
console.log(chalk.blue.bold('🚀 Starting Redis Server\n'));
|
|
178
|
+
|
|
179
|
+
const platformType = os.platform();
|
|
180
|
+
|
|
181
|
+
if (platformType === 'darwin') {
|
|
182
|
+
execSync('brew services start redis', { stdio: 'inherit' });
|
|
183
|
+
console.log(chalk.green('\n✅ Redis started via Homebrew services'));
|
|
184
|
+
} else if (platformType === 'win32') {
|
|
185
|
+
try {
|
|
186
|
+
execSync('net start redis', { stdio: 'inherit' });
|
|
187
|
+
console.log(chalk.green('\n✅ Redis started as Windows service'));
|
|
188
|
+
} catch (error) {
|
|
189
|
+
console.log(chalk.yellow('Starting Redis directly...'));
|
|
190
|
+
execSync('start redis-server', { stdio: 'inherit' });
|
|
191
|
+
console.log(chalk.green('\n✅ Redis started'));
|
|
192
|
+
}
|
|
193
|
+
} else {
|
|
194
|
+
execSync('sudo systemctl start redis-server', { stdio: 'inherit' });
|
|
195
|
+
console.log(chalk.green('\n✅ Redis started via systemd'));
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
process.exit(0);
|
|
199
|
+
} catch (error) {
|
|
200
|
+
console.error(chalk.red('Failed to start Redis:'), error.message);
|
|
201
|
+
process.exit(1);
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
|
|
205
|
+
// Stop command
|
|
206
|
+
program
|
|
207
|
+
.command('stop')
|
|
208
|
+
.description('Stop Redis server')
|
|
209
|
+
.action(async () => {
|
|
210
|
+
try {
|
|
211
|
+
const { execSync, platform } = await import('child_process');
|
|
212
|
+
const os = await import('os');
|
|
213
|
+
|
|
214
|
+
console.log(chalk.blue.bold('🛑 Stopping Redis Server\n'));
|
|
215
|
+
|
|
216
|
+
const platformType = os.platform();
|
|
217
|
+
|
|
218
|
+
if (platformType === 'darwin') {
|
|
219
|
+
execSync('brew services stop redis', { stdio: 'inherit' });
|
|
220
|
+
console.log(chalk.green('\n✅ Redis stopped'));
|
|
221
|
+
} else if (platformType === 'win32') {
|
|
222
|
+
execSync('net stop redis', { stdio: 'inherit' });
|
|
223
|
+
console.log(chalk.green('\n✅ Redis stopped'));
|
|
224
|
+
} else {
|
|
225
|
+
execSync('sudo systemctl stop redis-server', { stdio: 'inherit' });
|
|
226
|
+
console.log(chalk.green('\n✅ Redis stopped'));
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
process.exit(0);
|
|
230
|
+
} catch (error) {
|
|
231
|
+
console.error(chalk.red('Failed to stop Redis:'), error.message);
|
|
232
|
+
process.exit(1);
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
|
|
236
|
+
// Restart command
|
|
237
|
+
program
|
|
238
|
+
.command('restart')
|
|
239
|
+
.description('Restart Redis server')
|
|
240
|
+
.action(async () => {
|
|
241
|
+
try {
|
|
242
|
+
const { execSync, platform } = await import('child_process');
|
|
243
|
+
const os = await import('os');
|
|
244
|
+
|
|
245
|
+
console.log(chalk.blue.bold('🔄 Restarting Redis Server\n'));
|
|
246
|
+
|
|
247
|
+
const platformType = os.platform();
|
|
248
|
+
|
|
249
|
+
if (platformType === 'darwin') {
|
|
250
|
+
execSync('brew services restart redis', { stdio: 'inherit' });
|
|
251
|
+
console.log(chalk.green('\n✅ Redis restarted'));
|
|
252
|
+
} else if (platformType === 'win32') {
|
|
253
|
+
try {
|
|
254
|
+
execSync('net stop redis && net start redis', { stdio: 'inherit' });
|
|
255
|
+
} catch (error) {
|
|
256
|
+
console.log(chalk.yellow('Restarting Redis directly...'));
|
|
257
|
+
execSync('taskkill /F /IM redis-server.exe && start redis-server', { stdio: 'inherit' });
|
|
258
|
+
}
|
|
259
|
+
console.log(chalk.green('\n✅ Redis restarted'));
|
|
260
|
+
} else {
|
|
261
|
+
execSync('sudo systemctl restart redis-server', { stdio: 'inherit' });
|
|
262
|
+
console.log(chalk.green('\n✅ Redis restarted'));
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
process.exit(0);
|
|
266
|
+
} catch (error) {
|
|
267
|
+
console.error(chalk.red('Failed to restart Redis:'), error.message);
|
|
268
|
+
process.exit(1);
|
|
269
|
+
}
|
|
270
|
+
});
|
|
271
|
+
|
|
272
|
+
// Guide command
|
|
273
|
+
program
|
|
274
|
+
.command('guide')
|
|
275
|
+
.description('Display installation guide')
|
|
276
|
+
.action(() => {
|
|
277
|
+
try {
|
|
278
|
+
const guidePath = join(__dirname, 'redis-install-guides.md');
|
|
279
|
+
const guide = readFileSync(guidePath, 'utf8');
|
|
280
|
+
console.log(guide);
|
|
281
|
+
process.exit(0);
|
|
282
|
+
} catch (error) {
|
|
283
|
+
console.error(chalk.red('Guide not found:'), error.message);
|
|
284
|
+
console.log(chalk.yellow('\nVisit: https://redis.io/docs/getting-started/'));
|
|
285
|
+
process.exit(1);
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
|
|
289
|
+
program.parse();
|