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