@lanonasis/cli 3.6.3 → 3.6.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.
Files changed (41) hide show
  1. package/dist/commands/api-keys.d.ts +1 -2
  2. package/dist/commands/api-keys.js +78 -73
  3. package/dist/commands/auth.js +167 -160
  4. package/dist/commands/completion.js +39 -31
  5. package/dist/commands/config.js +201 -162
  6. package/dist/commands/enhanced-memory.js +17 -11
  7. package/dist/commands/guide.js +88 -79
  8. package/dist/commands/init.js +20 -14
  9. package/dist/commands/mcp.js +173 -142
  10. package/dist/commands/memory.js +83 -77
  11. package/dist/commands/organization.js +21 -15
  12. package/dist/commands/topics.js +58 -52
  13. package/dist/core/achievements.js +26 -19
  14. package/dist/core/architecture.js +59 -42
  15. package/dist/core/dashboard.js +81 -71
  16. package/dist/core/error-handler.js +39 -30
  17. package/dist/core/power-mode.js +53 -46
  18. package/dist/core/progress.js +44 -35
  19. package/dist/core/welcome.js +64 -56
  20. package/dist/enhanced-cli.js +58 -49
  21. package/dist/index-simple.js +112 -74
  22. package/dist/index.js +68 -63
  23. package/dist/mcp/access-control.js +17 -13
  24. package/dist/mcp/client/enhanced-client.js +23 -16
  25. package/dist/mcp/enhanced-server.js +14 -10
  26. package/dist/mcp/logger.js +6 -2
  27. package/dist/mcp/memory-state.js +17 -13
  28. package/dist/mcp/schemas/tool-schemas.d.ts +28 -28
  29. package/dist/mcp/schemas/tool-schemas.js +126 -122
  30. package/dist/mcp/server/lanonasis-server.js +51 -44
  31. package/dist/mcp/transports/transport-manager.js +25 -18
  32. package/dist/mcp/vector-store.js +10 -6
  33. package/dist/mcp-server.js +21 -17
  34. package/dist/utils/api.js +30 -21
  35. package/dist/utils/config.js +61 -15
  36. package/dist/utils/formatting.js +14 -6
  37. package/dist/utils/mcp-client.js +132 -77
  38. package/package.json +17 -92
  39. package/dist/completions/bash-completion.sh +0 -88
  40. package/dist/completions/fish-completion.fish +0 -132
  41. package/dist/completions/zsh-completion.zsh +0 -196
@@ -1,27 +1,33 @@
1
+ "use strict";
1
2
  /**
2
3
  * Enhanced Memory Commands - mem0-inspired advanced operations
3
4
  * Simplified working version
4
5
  */
5
- import chalk from 'chalk';
6
- import ora from 'ora';
7
- import { getMCPClient } from '../utils/mcp-client.js';
8
- import { CLIConfig } from '../utils/config.js';
9
- export function enhancedMemoryCommands(program) {
6
+ var __importDefault = (this && this.__importDefault) || function (mod) {
7
+ return (mod && mod.__esModule) ? mod : { "default": mod };
8
+ };
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.enhancedMemoryCommands = enhancedMemoryCommands;
11
+ const chalk_1 = __importDefault(require("chalk"));
12
+ const ora_1 = __importDefault(require("ora"));
13
+ const mcp_client_js_1 = require("../utils/mcp-client.js");
14
+ const config_js_1 = require("../utils/config.js");
15
+ function enhancedMemoryCommands(program) {
10
16
  const memory = program.command('memory-enhanced').description('Enhanced memory operations');
11
17
  memory.command('bulk-pause')
12
18
  .description('Pause multiple memories by criteria')
13
19
  .option('--category <category>', 'Category to pause')
14
20
  .action(async (_options) => {
15
- const spinner = ora('Processing bulk pause...').start();
21
+ const spinner = (0, ora_1.default)('Processing bulk pause...').start();
16
22
  try {
17
- const client = getMCPClient();
23
+ const client = (0, mcp_client_js_1.getMCPClient)();
18
24
  if (!client.isConnectedToServer()) {
19
- const config = new CLIConfig();
25
+ const config = new config_js_1.CLIConfig();
20
26
  await client.connect({ useRemote: !!config.get('token') });
21
27
  }
22
28
  // Simplified implementation
23
29
  spinner.succeed('Bulk pause operation completed');
24
- console.log(chalk.green('✓ Enhanced memory operations are available'));
30
+ console.log(chalk_1.default.green('✓ Enhanced memory operations are available'));
25
31
  }
26
32
  catch (error) {
27
33
  spinner.fail(`Operation failed: ${error instanceof Error ? error.message : 'Unknown error'}`);
@@ -30,7 +36,7 @@ export function enhancedMemoryCommands(program) {
30
36
  memory.command('analytics')
31
37
  .description('Show memory analytics')
32
38
  .action(async () => {
33
- console.log(chalk.cyan('📊 Memory Analytics'));
34
- console.log(chalk.green('✓ Enhanced analytics features are available'));
39
+ console.log(chalk_1.default.cyan('📊 Memory Analytics'));
40
+ console.log(chalk_1.default.green('✓ Enhanced analytics features are available'));
35
41
  });
36
42
  }
@@ -1,23 +1,31 @@
1
- import chalk from 'chalk';
2
- import inquirer from 'inquirer';
3
- import { CLIConfig } from '../utils/config.js';
4
- import { apiClient } from '../utils/api.js';
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.UserGuidanceSystem = void 0;
7
+ exports.guideCommand = guideCommand;
8
+ exports.quickStartCommand = quickStartCommand;
9
+ const chalk_1 = __importDefault(require("chalk"));
10
+ const inquirer_1 = __importDefault(require("inquirer"));
11
+ const config_js_1 = require("../utils/config.js");
12
+ const api_js_1 = require("../utils/api.js");
5
13
  // Color scheme
6
14
  const colors = {
7
- primary: chalk.blue.bold,
8
- success: chalk.green,
9
- warning: chalk.yellow,
10
- error: chalk.red,
11
- info: chalk.cyan,
12
- accent: chalk.magenta,
13
- muted: chalk.gray,
14
- highlight: chalk.white.bold
15
+ primary: chalk_1.default.blue.bold,
16
+ success: chalk_1.default.green,
17
+ warning: chalk_1.default.yellow,
18
+ error: chalk_1.default.red,
19
+ info: chalk_1.default.cyan,
20
+ accent: chalk_1.default.magenta,
21
+ muted: chalk_1.default.gray,
22
+ highlight: chalk_1.default.white.bold
15
23
  };
16
- export class UserGuidanceSystem {
24
+ class UserGuidanceSystem {
17
25
  config;
18
26
  steps = [];
19
27
  constructor() {
20
- this.config = new CLIConfig();
28
+ this.config = new config_js_1.CLIConfig();
21
29
  this.initializeSteps();
22
30
  }
23
31
  initializeSteps() {
@@ -64,7 +72,7 @@ export class UserGuidanceSystem {
64
72
  ];
65
73
  }
66
74
  async runGuidedSetup() {
67
- console.log(chalk.blue.bold('🚀 Welcome to Onasis-Core CLI Setup Guide'));
75
+ console.log(chalk_1.default.blue.bold('🚀 Welcome to Onasis-Core CLI Setup Guide'));
68
76
  console.log(colors.info('═'.repeat(50)));
69
77
  console.log();
70
78
  console.log(colors.highlight('This guided setup will help you get started with enterprise-grade'));
@@ -72,7 +80,7 @@ export class UserGuidanceSystem {
72
80
  console.log();
73
81
  // Check current status
74
82
  await this.assessCurrentStatus();
75
- const { proceedWithGuide } = await inquirer.prompt([
83
+ const { proceedWithGuide } = await inquirer_1.default.prompt([
76
84
  {
77
85
  type: 'confirm',
78
86
  name: 'proceedWithGuide',
@@ -81,14 +89,14 @@ export class UserGuidanceSystem {
81
89
  }
82
90
  ]);
83
91
  if (!proceedWithGuide) {
84
- console.log(chalk.yellow('Setup cancelled. You can run this guide anytime with:'));
85
- console.log(chalk.cyan(' lanonasis guide'));
92
+ console.log(chalk_1.default.yellow('Setup cancelled. You can run this guide anytime with:'));
93
+ console.log(chalk_1.default.cyan(' lanonasis guide'));
86
94
  return;
87
95
  }
88
96
  // Run through steps
89
97
  for (const step of this.steps) {
90
98
  if (step.completed) {
91
- console.log(chalk.green(`✅ ${step.title} (already completed)`));
99
+ console.log(chalk_1.default.green(`✅ ${step.title} (already completed)`));
92
100
  continue;
93
101
  }
94
102
  await this.executeStep(step);
@@ -96,35 +104,35 @@ export class UserGuidanceSystem {
96
104
  await this.showCompletionSummary();
97
105
  }
98
106
  async assessCurrentStatus() {
99
- console.log(chalk.yellow('📋 Checking current setup status...'));
107
+ console.log(chalk_1.default.yellow('📋 Checking current setup status...'));
100
108
  console.log();
101
109
  // Check configuration
102
110
  const configExists = await this.config.exists();
103
111
  if (configExists) {
104
112
  this.markStepCompleted('initialization');
105
- console.log(chalk.green('✅ Configuration found'));
113
+ console.log(chalk_1.default.green('✅ Configuration found'));
106
114
  }
107
115
  else {
108
- console.log(chalk.gray('⏳ Configuration needs setup'));
116
+ console.log(chalk_1.default.gray('⏳ Configuration needs setup'));
109
117
  }
110
118
  // Check authentication
111
119
  const isAuthenticated = await this.config.isAuthenticated();
112
120
  const hasVendorKey = this.config.hasVendorKey();
113
121
  if (isAuthenticated || hasVendorKey) {
114
122
  this.markStepCompleted('authentication');
115
- console.log(chalk.green(`✅ Authentication configured (${hasVendorKey ? 'vendor key' : 'JWT token'})`));
123
+ console.log(chalk_1.default.green(`✅ Authentication configured (${hasVendorKey ? 'vendor key' : 'JWT token'})`));
116
124
  }
117
125
  else {
118
- console.log(chalk.gray('⏳ Authentication needs setup'));
126
+ console.log(chalk_1.default.gray('⏳ Authentication needs setup'));
119
127
  }
120
128
  // Check connection
121
129
  try {
122
- await apiClient.get('/health');
130
+ await api_js_1.apiClient.get('/health');
123
131
  this.markStepCompleted('verification');
124
- console.log(chalk.green('✅ Service connection verified'));
132
+ console.log(chalk_1.default.green('✅ Service connection verified'));
125
133
  }
126
134
  catch {
127
- console.log(chalk.gray('⏳ Service connection needs verification'));
135
+ console.log(chalk_1.default.gray('⏳ Service connection needs verification'));
128
136
  }
129
137
  console.log();
130
138
  }
@@ -135,12 +143,12 @@ export class UserGuidanceSystem {
135
143
  }
136
144
  }
137
145
  async executeStep(step) {
138
- console.log(chalk.blue.bold(`🔧 ${step.title}`));
146
+ console.log(chalk_1.default.blue.bold(`🔧 ${step.title}`));
139
147
  console.log(colors.info('─'.repeat(30)));
140
- console.log(chalk.white(step.description));
148
+ console.log(chalk_1.default.white(step.description));
141
149
  console.log();
142
150
  if (step.optional) {
143
- const { proceed } = await inquirer.prompt([
151
+ const { proceed } = await inquirer_1.default.prompt([
144
152
  {
145
153
  type: 'confirm',
146
154
  name: 'proceed',
@@ -149,7 +157,7 @@ export class UserGuidanceSystem {
149
157
  }
150
158
  ]);
151
159
  if (!proceed) {
152
- console.log(chalk.yellow('⏭️ Skipped'));
160
+ console.log(chalk_1.default.yellow('⏭️ Skipped'));
153
161
  console.log();
154
162
  return;
155
163
  }
@@ -158,12 +166,12 @@ export class UserGuidanceSystem {
158
166
  try {
159
167
  await step.action();
160
168
  step.completed = true;
161
- console.log(chalk.green(`✅ ${step.title} completed successfully`));
169
+ console.log(chalk_1.default.green(`✅ ${step.title} completed successfully`));
162
170
  }
163
171
  catch (error) {
164
- console.log(chalk.red(`❌ ${step.title} failed`));
165
- console.log(chalk.gray(error instanceof Error ? error.message : String(error)));
166
- const { retry } = await inquirer.prompt([
172
+ console.log(chalk_1.default.red(`❌ ${step.title} failed`));
173
+ console.log(chalk_1.default.gray(error instanceof Error ? error.message : String(error)));
174
+ const { retry } = await inquirer_1.default.prompt([
167
175
  {
168
176
  type: 'confirm',
169
177
  name: 'retry',
@@ -180,7 +188,7 @@ export class UserGuidanceSystem {
180
188
  }
181
189
  async initializeConfig() {
182
190
  console.log(colors.info('Initializing CLI configuration...'));
183
- const { apiUrl, outputFormat } = await inquirer.prompt([
191
+ const { apiUrl, outputFormat } = await inquirer_1.default.prompt([
184
192
  {
185
193
  type: 'input',
186
194
  name: 'apiUrl',
@@ -202,9 +210,9 @@ export class UserGuidanceSystem {
202
210
  }
203
211
  async setupAuthentication() {
204
212
  console.log(colors.info('Setting up authentication...'));
205
- console.log(chalk.gray('Choose the authentication method that best fits your use case:'));
213
+ console.log(chalk_1.default.gray('Choose the authentication method that best fits your use case:'));
206
214
  console.log();
207
- const { authMethod } = await inquirer.prompt([
215
+ const { authMethod } = await inquirer_1.default.prompt([
208
216
  {
209
217
  type: 'list',
210
218
  name: 'authMethod',
@@ -232,17 +240,17 @@ export class UserGuidanceSystem {
232
240
  const { loginCommand } = await import('./auth.js');
233
241
  switch (authMethod) {
234
242
  case 'vendor_key':
235
- console.log(chalk.yellow('📝 Vendor keys provide secure, programmatic access'));
236
- console.log(chalk.gray('Find it in your dashboard under API Keys.'));
243
+ console.log(chalk_1.default.yellow('📝 Vendor keys provide secure, programmatic access'));
244
+ console.log(chalk_1.default.gray('Find it in your dashboard under API Keys.'));
237
245
  console.log();
238
246
  break;
239
247
  case 'oauth':
240
- console.log(chalk.yellow('🌐 OAuth provides secure browser-based authentication'));
241
- console.log(chalk.gray('Your browser will open for authentication'));
248
+ console.log(chalk_1.default.yellow('🌐 OAuth provides secure browser-based authentication'));
249
+ console.log(chalk_1.default.gray('Your browser will open for authentication'));
242
250
  console.log();
243
251
  break;
244
252
  case 'credentials':
245
- console.log(chalk.yellow('📧 Direct authentication with your account'));
253
+ console.log(chalk_1.default.yellow('📧 Direct authentication with your account'));
246
254
  console.log();
247
255
  break;
248
256
  }
@@ -252,10 +260,10 @@ export class UserGuidanceSystem {
252
260
  async verifyConnection() {
253
261
  console.log(colors.info('Verifying connection to Onasis-Core services...'));
254
262
  try {
255
- const health = await apiClient.get('/health');
263
+ const health = await api_js_1.apiClient.get('/health');
256
264
  console.log(colors.success('✅ Connection verified successfully'));
257
- console.log(chalk.gray(`Server status: ${health.status}`));
258
- console.log(chalk.gray(`Server version: ${health.version}`));
265
+ console.log(chalk_1.default.gray(`Server status: ${health.status}`));
266
+ console.log(chalk_1.default.gray(`Server version: ${health.version}`));
259
267
  }
260
268
  catch (error) {
261
269
  throw new Error(`Connection verification failed: ${error instanceof Error ? error.message : 'Unknown error'}`);
@@ -263,9 +271,9 @@ export class UserGuidanceSystem {
263
271
  }
264
272
  async createFirstMemory() {
265
273
  console.log(colors.info('Creating your first memory entry...'));
266
- console.log(chalk.gray('Memories are the core of the MaaS platform - they store and organize information'));
274
+ console.log(chalk_1.default.gray('Memories are the core of the MaaS platform - they store and organize information'));
267
275
  console.log();
268
- const { createSample } = await inquirer.prompt([
276
+ const { createSample } = await inquirer_1.default.prompt([
269
277
  {
270
278
  type: 'confirm',
271
279
  name: 'createSample',
@@ -275,18 +283,18 @@ export class UserGuidanceSystem {
275
283
  ]);
276
284
  if (createSample) {
277
285
  try {
278
- const memory = await apiClient.createMemory({
286
+ const memory = await api_js_1.apiClient.createMemory({
279
287
  title: 'Welcome to Onasis-Core',
280
288
  content: 'This is your first memory in the Onasis-Core MaaS platform. You can store, search, and organize information efficiently using memories.',
281
289
  memory_type: 'reference',
282
290
  tags: ['welcome', 'getting-started', 'onasis-core']
283
291
  });
284
292
  console.log(colors.success('✅ Sample memory created successfully'));
285
- console.log(chalk.gray(`Memory ID: ${memory.id}`));
293
+ console.log(chalk_1.default.gray(`Memory ID: ${memory.id}`));
286
294
  console.log();
287
295
  console.log(colors.info('💡 Try these commands to explore:'));
288
- console.log(chalk.cyan(' lanonasis memory list'));
289
- console.log(chalk.cyan(' lanonasis memory search "welcome"'));
296
+ console.log(chalk_1.default.cyan(' lanonasis memory list'));
297
+ console.log(chalk_1.default.cyan(' lanonasis memory search "welcome"'));
290
298
  }
291
299
  catch (error) {
292
300
  throw new Error(`Failed to create sample memory: ${error instanceof Error ? error.message : 'Unknown error'}`);
@@ -294,7 +302,7 @@ export class UserGuidanceSystem {
294
302
  }
295
303
  else {
296
304
  console.log(colors.info('💡 You can create memories anytime with:'));
297
- console.log(chalk.cyan(' lanonasis memory create --title "My Title" --content "Content"'));
305
+ console.log(chalk_1.default.cyan(' lanonasis memory create --title "My Title" --content "Content"'));
298
306
  }
299
307
  }
300
308
  async exploreFeatures() {
@@ -322,10 +330,10 @@ export class UserGuidanceSystem {
322
330
  command: 'lanonasis memory search "your query"'
323
331
  }
324
332
  ];
325
- console.log(chalk.yellow('📚 Available Features:'));
333
+ console.log(chalk_1.default.yellow('📚 Available Features:'));
326
334
  features.forEach((feature, index) => {
327
335
  console.log(`${index + 1}. ${colors.accent(feature.name)}: ${feature.description}`);
328
- console.log(` ${chalk.cyan(feature.command)}`);
336
+ console.log(` ${chalk_1.default.cyan(feature.command)}`);
329
337
  console.log();
330
338
  });
331
339
  console.log(colors.info('💡 Run any command with --help to learn more'));
@@ -333,7 +341,7 @@ export class UserGuidanceSystem {
333
341
  async setupProductivity() {
334
342
  console.log(colors.info('🚀 Productivity Setup'));
335
343
  console.log();
336
- const { shell } = await inquirer.prompt([
344
+ const { shell } = await inquirer_1.default.prompt([
337
345
  {
338
346
  type: 'list',
339
347
  name: 'shell',
@@ -347,34 +355,34 @@ export class UserGuidanceSystem {
347
355
  }
348
356
  ]);
349
357
  if (shell !== 'skip') {
350
- console.log(chalk.yellow(`📝 Shell Completion Setup (${shell}):`));
358
+ console.log(chalk_1.default.yellow(`📝 Shell Completion Setup (${shell}):`));
351
359
  console.log();
352
360
  switch (shell) {
353
361
  case 'bash':
354
362
  console.log(colors.info('Add to your ~/.bashrc:'));
355
- console.log(chalk.cyan(' source <(lanonasis --completion bash)'));
363
+ console.log(chalk_1.default.cyan(' source <(lanonasis --completion bash)'));
356
364
  break;
357
365
  case 'zsh':
358
366
  console.log(colors.info('Add to your ~/.zshrc:'));
359
- console.log(chalk.cyan(' source <(lanonasis --completion zsh)'));
367
+ console.log(chalk_1.default.cyan(' source <(lanonasis --completion zsh)'));
360
368
  break;
361
369
  case 'fish':
362
370
  console.log(colors.info('Add to your ~/.config/fish/config.fish:'));
363
- console.log(chalk.cyan(' lanonasis --completion fish | source'));
371
+ console.log(chalk_1.default.cyan(' lanonasis --completion fish | source'));
364
372
  break;
365
373
  }
366
374
  console.log();
367
375
  console.log(colors.success('✅ Completions will provide tab completion for all commands'));
368
376
  }
369
377
  console.log();
370
- console.log(chalk.yellow('🔗 Useful Aliases:'));
378
+ console.log(chalk_1.default.yellow('🔗 Useful Aliases:'));
371
379
  console.log(colors.info('You can also use these command aliases:'));
372
- console.log(chalk.cyan(' onasis # Same as lanonasis (Golden Contract compliant)'));
373
- console.log(chalk.cyan(' memory # Direct memory management'));
374
- console.log(chalk.cyan(' maas # MaaS-focused interface'));
380
+ console.log(chalk_1.default.cyan(' onasis # Same as lanonasis (Golden Contract compliant)'));
381
+ console.log(chalk_1.default.cyan(' memory # Direct memory management'));
382
+ console.log(chalk_1.default.cyan(' maas # MaaS-focused interface'));
375
383
  }
376
384
  async showCompletionSummary() {
377
- console.log(chalk.blue.bold('🎉 Setup Complete!'));
385
+ console.log(chalk_1.default.blue.bold('🎉 Setup Complete!'));
378
386
  console.log(colors.info('═'.repeat(30)));
379
387
  console.log();
380
388
  const completedSteps = this.steps.filter(s => s.completed);
@@ -385,23 +393,24 @@ export class UserGuidanceSystem {
385
393
  console.log(colors.info(`📚 Plus ${completedSteps.filter(s => s.optional).length} optional steps`));
386
394
  }
387
395
  console.log();
388
- console.log(chalk.yellow('🚀 You\'re ready to use Onasis-Core CLI!'));
396
+ console.log(chalk_1.default.yellow('🚀 You\'re ready to use Onasis-Core CLI!'));
389
397
  console.log();
390
398
  console.log(colors.info('Next steps:'));
391
- console.log(chalk.cyan(' lanonasis health # Check system status'));
392
- console.log(chalk.cyan(' lanonasis memory list # View your memories'));
393
- console.log(chalk.cyan(' lanonasis --help # Explore all commands'));
399
+ console.log(chalk_1.default.cyan(' lanonasis health # Check system status'));
400
+ console.log(chalk_1.default.cyan(' lanonasis memory list # View your memories'));
401
+ console.log(chalk_1.default.cyan(' lanonasis --help # Explore all commands'));
394
402
  console.log();
395
- console.log(chalk.gray('💡 Need help? Visit: https://docs.lanonasis.com/cli'));
396
- console.log(chalk.gray('🌐 Dashboard: https://api.lanonasis.com/dashboard'));
403
+ console.log(chalk_1.default.gray('💡 Need help? Visit: https://docs.lanonasis.com/cli'));
404
+ console.log(chalk_1.default.gray('🌐 Dashboard: https://api.lanonasis.com/dashboard'));
397
405
  }
398
406
  }
399
- export async function guideCommand() {
407
+ exports.UserGuidanceSystem = UserGuidanceSystem;
408
+ async function guideCommand() {
400
409
  const guide = new UserGuidanceSystem();
401
410
  await guide.runGuidedSetup();
402
411
  }
403
- export async function quickStartCommand() {
404
- console.log(chalk.blue.bold('⚡ Onasis-Core CLI Quick Start'));
412
+ async function quickStartCommand() {
413
+ console.log(chalk_1.default.blue.bold('⚡ Onasis-Core CLI Quick Start'));
405
414
  console.log(colors.info('═'.repeat(30)));
406
415
  console.log();
407
416
  const essentialCommands = [
@@ -433,14 +442,14 @@ export async function quickStartCommand() {
433
442
  essentialCommands.forEach(category => {
434
443
  console.log(colors.accent(`📁 ${category.category}:`));
435
444
  category.commands.forEach(({ cmd, desc }) => {
436
- console.log(` ${chalk.cyan(cmd)}`);
437
- console.log(` ${chalk.gray(desc)}`);
445
+ console.log(` ${chalk_1.default.cyan(cmd)}`);
446
+ console.log(` ${chalk_1.default.gray(desc)}`);
438
447
  console.log();
439
448
  });
440
449
  });
441
450
  console.log(colors.info('💡 Pro Tips:'));
442
- console.log(chalk.gray(' • Use --help with any command for detailed options'));
443
- console.log(chalk.gray(' • Set up shell completions: lanonasis completion'));
444
- console.log(chalk.gray(' • Use --verbose for detailed operation logs'));
451
+ console.log(chalk_1.default.gray(' • Use --help with any command for detailed options'));
452
+ console.log(chalk_1.default.gray(' • Set up shell completions: lanonasis completion'));
453
+ console.log(chalk_1.default.gray(' • Use --verbose for detailed operation logs'));
445
454
  console.log();
446
455
  }
@@ -1,14 +1,20 @@
1
- import chalk from 'chalk';
2
- import inquirer from 'inquirer';
3
- import { CLIConfig } from '../utils/config.js';
4
- export async function initCommand(options) {
5
- const config = new CLIConfig();
6
- console.log(chalk.blue.bold('🚀 Initializing MaaS CLI'));
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.initCommand = initCommand;
7
+ const chalk_1 = __importDefault(require("chalk"));
8
+ const inquirer_1 = __importDefault(require("inquirer"));
9
+ const config_js_1 = require("../utils/config.js");
10
+ async function initCommand(options) {
11
+ const config = new config_js_1.CLIConfig();
12
+ console.log(chalk_1.default.blue.bold('🚀 Initializing MaaS CLI'));
7
13
  console.log();
8
14
  // Check if config already exists
9
15
  const configExists = await config.exists();
10
16
  if (configExists && !options.force) {
11
- const answer = await inquirer.prompt([
17
+ const answer = await inquirer_1.default.prompt([
12
18
  {
13
19
  type: 'confirm',
14
20
  name: 'overwrite',
@@ -17,12 +23,12 @@ export async function initCommand(options) {
17
23
  }
18
24
  ]);
19
25
  if (!answer.overwrite) {
20
- console.log(chalk.yellow('Initialization cancelled'));
26
+ console.log(chalk_1.default.yellow('Initialization cancelled'));
21
27
  return;
22
28
  }
23
29
  }
24
30
  // Get configuration
25
- const answers = await inquirer.prompt([
31
+ const answers = await inquirer_1.default.prompt([
26
32
  {
27
33
  type: 'input',
28
34
  name: 'apiUrl',
@@ -43,10 +49,10 @@ export async function initCommand(options) {
43
49
  await config.init();
44
50
  await config.setApiUrl(answers.apiUrl);
45
51
  console.log();
46
- console.log(chalk.green('✓ CLI initialized successfully'));
47
- console.log(chalk.gray(`Configuration saved to: ${config.getConfigPath()}`));
52
+ console.log(chalk_1.default.green('✓ CLI initialized successfully'));
53
+ console.log(chalk_1.default.gray(`Configuration saved to: ${config.getConfigPath()}`));
48
54
  console.log();
49
- console.log(chalk.yellow('Next steps:'));
50
- console.log(chalk.white(' memory login # Authenticate with your account'));
51
- console.log(chalk.white(' memory --help # Show available commands'));
55
+ console.log(chalk_1.default.yellow('Next steps:'));
56
+ console.log(chalk_1.default.white(' memory login # Authenticate with your account'));
57
+ console.log(chalk_1.default.white(' memory --help # Show available commands'));
52
58
  }