Lines 74-114javascript
74 .description('Show private mode status')
76 const o = await checkOllama();
77 const q = await checkQdrant();
79 console.log(chalk.hex('#3B82F6').bold('🔒 Private Mode Status\n'));
80 console.log(`${o ? chalk.green('✓') : chalk.red('✗')} Ollama ${o ? chalk.green('running') : chalk.red('not running')}`);
81 console.log(`${q ? chalk.green('✓') : chalk.red('✗')} Qdrant ${q ? chalk.green('reachable') : chalk.red('not reachable')}`);
82 console.log(chalk.gray(`\n API URL: ${process.env.ZDRAVO_API_URL || 'https://www.zdravo.ai (cloud mode)'}`));
83 console.log(chalk.gray(` OLLAMA_BASE_URL: ${process.env.OLLAMA_BASE_URL || 'http://localhost:11434'}`));
88 .description('Switch current session to local-only mode')
90 const key = 'ZDRAVO_API_URL';
91 const val = LOCAL_API;
92 console.log(chalk.green(`✓ Export ${key}=${val}`));
93 console.log(chalk.gray(`\n Bash/Zsh: export ${key}=${val}`));
94 console.log(chalk.gray(` Fish: set -x ${key} ${val}`));
95 console.log(chalk.gray(` PowerShell: $env:${key}="${val}"\n`));
96 console.log(chalk.yellow(' Or add to ~/.bashrc / ~/.zshrc for persistence.\n'));
100 .description('Health check for private-only stack')
101 .action(async () => {
102 console.log(chalk.hex('#3B82F6').bold('\n🔒 Private Stack Diagnostics\n'));
103 const o = await checkOllama();
104 const q = await checkQdrant();
105 console.log(`${o ? chalk.green('✓') : chalk.red('✗')} Ollama`);
106 console.log(`${q ? chalk.green('✓') : chalk.red('✗')} Qdrant`);
107 console.log(chalk.gray(`\n Expected API: ${LOCAL_API}\n`));
110async function checkOllama() {
112 const res = await fetch(`${OLLAMA_URL}/api/tags`, { signal: AbortSignal.timeout(3000) });