@lanonasis/cli 1.5.1 → 1.5.2

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.
@@ -0,0 +1,446 @@
1
+ import chalk from 'chalk';
2
+ import inquirer from 'inquirer';
3
+ import { CLIConfig } from '../utils/config.js';
4
+ import { apiClient } from '../utils/api.js';
5
+ // Color scheme
6
+ 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
+ };
16
+ export class UserGuidanceSystem {
17
+ config;
18
+ steps = [];
19
+ constructor() {
20
+ this.config = new CLIConfig();
21
+ this.initializeSteps();
22
+ }
23
+ initializeSteps() {
24
+ this.steps = [
25
+ {
26
+ id: 'initialization',
27
+ title: 'Initialize Configuration',
28
+ description: 'Set up your CLI configuration and preferences',
29
+ action: this.initializeConfig.bind(this)
30
+ },
31
+ {
32
+ id: 'authentication',
33
+ title: 'Authentication Setup',
34
+ description: 'Connect to your Onasis-Core account using preferred method',
35
+ action: this.setupAuthentication.bind(this)
36
+ },
37
+ {
38
+ id: 'verification',
39
+ title: 'Connection Verification',
40
+ description: 'Verify your connection to Onasis-Core services',
41
+ action: this.verifyConnection.bind(this)
42
+ },
43
+ {
44
+ id: 'first_memory',
45
+ title: 'Create Your First Memory',
46
+ description: 'Learn how to store and retrieve information',
47
+ action: this.createFirstMemory.bind(this),
48
+ optional: true
49
+ },
50
+ {
51
+ id: 'explore_features',
52
+ title: 'Explore Advanced Features',
53
+ description: 'Discover topics, MCP integration, and advanced workflows',
54
+ action: this.exploreFeatures.bind(this),
55
+ optional: true
56
+ },
57
+ {
58
+ id: 'productivity_tips',
59
+ title: 'Productivity Setup',
60
+ description: 'Set up shell completions and aliases for efficient usage',
61
+ action: this.setupProductivity.bind(this),
62
+ optional: true
63
+ }
64
+ ];
65
+ }
66
+ async runGuidedSetup() {
67
+ console.log(chalk.blue.bold('🚀 Welcome to Onasis-Core CLI Setup Guide'));
68
+ console.log(colors.info('═'.repeat(50)));
69
+ console.log();
70
+ console.log(colors.highlight('This guided setup will help you get started with enterprise-grade'));
71
+ console.log(colors.highlight('Memory as a Service and API management capabilities.'));
72
+ console.log();
73
+ // Check current status
74
+ await this.assessCurrentStatus();
75
+ const { proceedWithGuide } = await inquirer.prompt([
76
+ {
77
+ type: 'confirm',
78
+ name: 'proceedWithGuide',
79
+ message: 'Would you like to proceed with the guided setup?',
80
+ default: true
81
+ }
82
+ ]);
83
+ if (!proceedWithGuide) {
84
+ console.log(chalk.yellow('Setup cancelled. You can run this guide anytime with:'));
85
+ console.log(chalk.cyan(' lanonasis guide'));
86
+ return;
87
+ }
88
+ // Run through steps
89
+ for (const step of this.steps) {
90
+ if (step.completed) {
91
+ console.log(chalk.green(`✅ ${step.title} (already completed)`));
92
+ continue;
93
+ }
94
+ await this.executeStep(step);
95
+ }
96
+ await this.showCompletionSummary();
97
+ }
98
+ async assessCurrentStatus() {
99
+ console.log(chalk.yellow('📋 Checking current setup status...'));
100
+ console.log();
101
+ // Check configuration
102
+ const configExists = await this.config.exists();
103
+ if (configExists) {
104
+ this.markStepCompleted('initialization');
105
+ console.log(chalk.green('✅ Configuration found'));
106
+ }
107
+ else {
108
+ console.log(chalk.gray('⏳ Configuration needs setup'));
109
+ }
110
+ // Check authentication
111
+ const isAuthenticated = await this.config.isAuthenticated();
112
+ const hasVendorKey = this.config.hasVendorKey();
113
+ if (isAuthenticated || hasVendorKey) {
114
+ this.markStepCompleted('authentication');
115
+ console.log(chalk.green(`✅ Authentication configured (${hasVendorKey ? 'vendor key' : 'JWT token'})`));
116
+ }
117
+ else {
118
+ console.log(chalk.gray('⏳ Authentication needs setup'));
119
+ }
120
+ // Check connection
121
+ try {
122
+ await apiClient.get('/health');
123
+ this.markStepCompleted('verification');
124
+ console.log(chalk.green('✅ Service connection verified'));
125
+ }
126
+ catch {
127
+ console.log(chalk.gray('⏳ Service connection needs verification'));
128
+ }
129
+ console.log();
130
+ }
131
+ markStepCompleted(stepId) {
132
+ const step = this.steps.find(s => s.id === stepId);
133
+ if (step) {
134
+ step.completed = true;
135
+ }
136
+ }
137
+ async executeStep(step) {
138
+ console.log(chalk.blue.bold(`🔧 ${step.title}`));
139
+ console.log(colors.info('─'.repeat(30)));
140
+ console.log(chalk.white(step.description));
141
+ console.log();
142
+ if (step.optional) {
143
+ const { proceed } = await inquirer.prompt([
144
+ {
145
+ type: 'confirm',
146
+ name: 'proceed',
147
+ message: `Execute this optional step: ${step.title}?`,
148
+ default: true
149
+ }
150
+ ]);
151
+ if (!proceed) {
152
+ console.log(chalk.yellow('⏭️ Skipped'));
153
+ console.log();
154
+ return;
155
+ }
156
+ }
157
+ if (step.action) {
158
+ try {
159
+ await step.action();
160
+ step.completed = true;
161
+ console.log(chalk.green(`✅ ${step.title} completed successfully`));
162
+ }
163
+ 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([
167
+ {
168
+ type: 'confirm',
169
+ name: 'retry',
170
+ message: 'Would you like to retry this step?',
171
+ default: true
172
+ }
173
+ ]);
174
+ if (retry) {
175
+ await this.executeStep(step); // Recursive retry
176
+ }
177
+ }
178
+ }
179
+ console.log();
180
+ }
181
+ async initializeConfig() {
182
+ console.log(colors.info('Initializing CLI configuration...'));
183
+ const { apiUrl, outputFormat } = await inquirer.prompt([
184
+ {
185
+ type: 'input',
186
+ name: 'apiUrl',
187
+ message: 'API URL (press Enter for default):',
188
+ default: 'https://api.lanonasis.com/api/v1'
189
+ },
190
+ {
191
+ type: 'list',
192
+ name: 'outputFormat',
193
+ message: 'Preferred output format:',
194
+ choices: ['table', 'json', 'yaml', 'csv'],
195
+ default: 'table'
196
+ }
197
+ ]);
198
+ await this.config.init();
199
+ await this.config.setApiUrl(apiUrl);
200
+ await this.config.setAndSave('defaultOutputFormat', outputFormat);
201
+ console.log(colors.success('Configuration initialized successfully'));
202
+ }
203
+ async setupAuthentication() {
204
+ console.log(colors.info('Setting up authentication...'));
205
+ console.log(chalk.gray('Choose the authentication method that best fits your use case:'));
206
+ console.log();
207
+ const { authMethod } = await inquirer.prompt([
208
+ {
209
+ type: 'list',
210
+ name: 'authMethod',
211
+ message: 'Choose authentication method:',
212
+ choices: [
213
+ {
214
+ name: '🔑 Vendor Key (Recommended for API integration)',
215
+ value: 'vendor_key',
216
+ short: 'Vendor Key'
217
+ },
218
+ {
219
+ name: '🌐 OAuth (Browser-based authentication)',
220
+ value: 'oauth',
221
+ short: 'OAuth'
222
+ },
223
+ {
224
+ name: '📧 Username/Password (Direct credentials)',
225
+ value: 'credentials',
226
+ short: 'Credentials'
227
+ }
228
+ ]
229
+ }
230
+ ]);
231
+ // Import and call the login command with the chosen method
232
+ const { loginCommand } = await import('./auth.js');
233
+ switch (authMethod) {
234
+ case 'vendor_key':
235
+ console.log(chalk.yellow('📝 Vendor keys provide secure, programmatic access'));
236
+ console.log(chalk.gray('Format: pk_xxxxx.sk_xxxxx'));
237
+ console.log();
238
+ break;
239
+ case 'oauth':
240
+ console.log(chalk.yellow('🌐 OAuth provides secure browser-based authentication'));
241
+ console.log(chalk.gray('Your browser will open for authentication'));
242
+ console.log();
243
+ break;
244
+ case 'credentials':
245
+ console.log(chalk.yellow('📧 Direct authentication with your account'));
246
+ console.log();
247
+ break;
248
+ }
249
+ // This will be handled by the enhanced auth command
250
+ await loginCommand({});
251
+ }
252
+ async verifyConnection() {
253
+ console.log(colors.info('Verifying connection to Onasis-Core services...'));
254
+ try {
255
+ const health = await apiClient.get('/health');
256
+ 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}`));
259
+ }
260
+ catch (error) {
261
+ throw new Error(`Connection verification failed: ${error instanceof Error ? error.message : 'Unknown error'}`);
262
+ }
263
+ }
264
+ async createFirstMemory() {
265
+ 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'));
267
+ console.log();
268
+ const { createSample } = await inquirer.prompt([
269
+ {
270
+ type: 'confirm',
271
+ name: 'createSample',
272
+ message: 'Create a sample memory to get started?',
273
+ default: true
274
+ }
275
+ ]);
276
+ if (createSample) {
277
+ try {
278
+ const memory = await apiClient.createMemory({
279
+ title: 'Welcome to Onasis-Core',
280
+ content: 'This is your first memory in the Onasis-Core MaaS platform. You can store, search, and organize information efficiently using memories.',
281
+ memory_type: 'reference',
282
+ tags: ['welcome', 'getting-started', 'onasis-core']
283
+ });
284
+ console.log(colors.success('✅ Sample memory created successfully'));
285
+ console.log(chalk.gray(`Memory ID: ${memory.id}`));
286
+ console.log();
287
+ 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"'));
290
+ }
291
+ catch (error) {
292
+ throw new Error(`Failed to create sample memory: ${error instanceof Error ? error.message : 'Unknown error'}`);
293
+ }
294
+ }
295
+ else {
296
+ console.log(colors.info('💡 You can create memories anytime with:'));
297
+ console.log(chalk.cyan(' lanonasis memory create --title "My Title" --content "Content"'));
298
+ }
299
+ }
300
+ async exploreFeatures() {
301
+ console.log(colors.info('🎯 Advanced Features Overview'));
302
+ console.log();
303
+ const features = [
304
+ {
305
+ name: 'Topics',
306
+ description: 'Organize memories into categories',
307
+ command: 'lanonasis topic create --name "My Project"'
308
+ },
309
+ {
310
+ name: 'MCP Integration',
311
+ description: 'Model Context Protocol for AI interactions',
312
+ command: 'lanonasis mcp status'
313
+ },
314
+ {
315
+ name: 'API Key Management',
316
+ description: 'Create and manage API keys for integrations',
317
+ command: 'lanonasis api-keys list'
318
+ },
319
+ {
320
+ name: 'Memory Search',
321
+ description: 'Semantic search across all memories',
322
+ command: 'lanonasis memory search "your query"'
323
+ }
324
+ ];
325
+ console.log(chalk.yellow('📚 Available Features:'));
326
+ features.forEach((feature, index) => {
327
+ console.log(`${index + 1}. ${colors.accent(feature.name)}: ${feature.description}`);
328
+ console.log(` ${chalk.cyan(feature.command)}`);
329
+ console.log();
330
+ });
331
+ console.log(colors.info('💡 Run any command with --help to learn more'));
332
+ }
333
+ async setupProductivity() {
334
+ console.log(colors.info('🚀 Productivity Setup'));
335
+ console.log();
336
+ const { shell } = await inquirer.prompt([
337
+ {
338
+ type: 'list',
339
+ name: 'shell',
340
+ message: 'Which shell do you use?',
341
+ choices: [
342
+ { name: 'Bash', value: 'bash' },
343
+ { name: 'Zsh', value: 'zsh' },
344
+ { name: 'Fish', value: 'fish' },
345
+ { name: 'Other / Skip', value: 'skip' }
346
+ ]
347
+ }
348
+ ]);
349
+ if (shell !== 'skip') {
350
+ console.log(chalk.yellow(`📝 Shell Completion Setup (${shell}):`));
351
+ console.log();
352
+ switch (shell) {
353
+ case 'bash':
354
+ console.log(colors.info('Add to your ~/.bashrc:'));
355
+ console.log(chalk.cyan(' source <(lanonasis --completion bash)'));
356
+ break;
357
+ case 'zsh':
358
+ console.log(colors.info('Add to your ~/.zshrc:'));
359
+ console.log(chalk.cyan(' source <(lanonasis --completion zsh)'));
360
+ break;
361
+ case 'fish':
362
+ console.log(colors.info('Add to your ~/.config/fish/config.fish:'));
363
+ console.log(chalk.cyan(' lanonasis --completion fish | source'));
364
+ break;
365
+ }
366
+ console.log();
367
+ console.log(colors.success('✅ Completions will provide tab completion for all commands'));
368
+ }
369
+ console.log();
370
+ console.log(chalk.yellow('🔗 Useful Aliases:'));
371
+ 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'));
375
+ }
376
+ async showCompletionSummary() {
377
+ console.log(chalk.blue.bold('🎉 Setup Complete!'));
378
+ console.log(colors.info('═'.repeat(30)));
379
+ console.log();
380
+ const completedSteps = this.steps.filter(s => s.completed);
381
+ const totalSteps = this.steps.filter(s => !s.optional).length;
382
+ const completedRequired = completedSteps.filter(s => !s.optional).length;
383
+ console.log(colors.success(`✅ Completed ${completedRequired}/${totalSteps} required steps`));
384
+ if (completedSteps.some(s => s.optional)) {
385
+ console.log(colors.info(`📚 Plus ${completedSteps.filter(s => s.optional).length} optional steps`));
386
+ }
387
+ console.log();
388
+ console.log(chalk.yellow('🚀 You\'re ready to use Onasis-Core CLI!'));
389
+ console.log();
390
+ 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'));
394
+ 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'));
397
+ }
398
+ }
399
+ export async function guideCommand() {
400
+ const guide = new UserGuidanceSystem();
401
+ await guide.runGuidedSetup();
402
+ }
403
+ export async function quickStartCommand() {
404
+ console.log(chalk.blue.bold('⚡ Onasis-Core CLI Quick Start'));
405
+ console.log(colors.info('═'.repeat(30)));
406
+ console.log();
407
+ const essentialCommands = [
408
+ {
409
+ category: 'Setup',
410
+ commands: [
411
+ { cmd: 'lanonasis init', desc: 'Initialize configuration' },
412
+ { cmd: 'lanonasis login --vendor-key pk_xxx.sk_xxx', desc: 'Authenticate with vendor key' },
413
+ { cmd: 'lanonasis health', desc: 'Verify system health' }
414
+ ]
415
+ },
416
+ {
417
+ category: 'Memory Management',
418
+ commands: [
419
+ { cmd: 'lanonasis memory create --title "Title" --content "Content"', desc: 'Create memory' },
420
+ { cmd: 'lanonasis memory list', desc: 'List all memories' },
421
+ { cmd: 'lanonasis memory search "query"', desc: 'Search memories' }
422
+ ]
423
+ },
424
+ {
425
+ category: 'Advanced',
426
+ commands: [
427
+ { cmd: 'lanonasis topic create --name "Project"', desc: 'Create topic' },
428
+ { cmd: 'lanonasis mcp status', desc: 'Check MCP server' },
429
+ { cmd: 'lanonasis api-keys list', desc: 'Manage API keys' }
430
+ ]
431
+ }
432
+ ];
433
+ essentialCommands.forEach(category => {
434
+ console.log(colors.accent(`📁 ${category.category}:`));
435
+ category.commands.forEach(({ cmd, desc }) => {
436
+ console.log(` ${chalk.cyan(cmd)}`);
437
+ console.log(` ${chalk.gray(desc)}`);
438
+ console.log();
439
+ });
440
+ });
441
+ 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'));
445
+ console.log();
446
+ }
@@ -0,0 +1,88 @@
1
+ #!/bin/bash
2
+
3
+ # Lanonasis/Onasis CLI Bash Completion
4
+ # Installation: source this file or copy to /etc/bash_completion.d/
5
+
6
+ _lanonasis_completions() {
7
+ local cur prev words cword
8
+ _init_completion || return
9
+
10
+ # Get completion data from CLI
11
+ local completion_data
12
+ completion_data=$(lanonasis --completion-data 2>/dev/null || echo '{}')
13
+
14
+ case "${COMP_CWORD}" in
15
+ 1)
16
+ # Main commands
17
+ local commands=$(echo "$completion_data" | jq -r '.commands[]?.name // empty' 2>/dev/null)
18
+ if [[ -z "$commands" ]]; then
19
+ commands="init login auth logout status health docs memory mem topic topics config org organization api-keys mcp dashboard documentation sdk api rest deploy deployment service services"
20
+ fi
21
+ COMPREPLY=($(compgen -W "$commands" -- "$cur"))
22
+ ;;
23
+ 2)
24
+ # Subcommands based on main command
25
+ case "${words[1]}" in
26
+ auth|login)
27
+ COMPREPLY=($(compgen -W "login logout status vendor-key oauth" -- "$cur"))
28
+ ;;
29
+ memory|mem)
30
+ COMPREPLY=($(compgen -W "list create get update delete search stats bulk-delete export import" -- "$cur"))
31
+ ;;
32
+ topic|topics)
33
+ COMPREPLY=($(compgen -W "list create get update delete" -- "$cur"))
34
+ ;;
35
+ config)
36
+ COMPREPLY=($(compgen -W "get set list reset" -- "$cur"))
37
+ ;;
38
+ api-keys)
39
+ COMPREPLY=($(compgen -W "list create revoke rotate" -- "$cur"))
40
+ ;;
41
+ mcp)
42
+ COMPREPLY=($(compgen -W "status connect disconnect servers tools resources" -- "$cur"))
43
+ ;;
44
+ dashboard)
45
+ COMPREPLY=($(compgen -W "status logs open" -- "$cur"))
46
+ ;;
47
+ deploy|deployment)
48
+ COMPREPLY=($(compgen -W "status health list" -- "$cur"))
49
+ ;;
50
+ service|services)
51
+ COMPREPLY=($(compgen -W "list status restart logs" -- "$cur"))
52
+ ;;
53
+ esac
54
+ ;;
55
+ *)
56
+ # Options and flags
57
+ case "${prev}" in
58
+ --memory-type)
59
+ COMPREPLY=($(compgen -W "context project knowledge reference personal workflow" -- "$cur"))
60
+ ;;
61
+ --output)
62
+ COMPREPLY=($(compgen -W "table json yaml csv" -- "$cur"))
63
+ ;;
64
+ --sort-by)
65
+ COMPREPLY=($(compgen -W "created_at updated_at last_accessed access_count" -- "$cur"))
66
+ ;;
67
+ --sort-order)
68
+ COMPREPLY=($(compgen -W "asc desc" -- "$cur"))
69
+ ;;
70
+ --api-url)
71
+ COMPREPLY=($(compgen -W "https://api.lanonasis.com/api/v1" -- "$cur"))
72
+ ;;
73
+ esac
74
+
75
+ # Global flags
76
+ if [[ "$cur" == -* ]]; then
77
+ local global_flags="--help --version --verbose --output --api-url --no-mcp"
78
+ COMPREPLY=($(compgen -W "$global_flags" -- "$cur"))
79
+ fi
80
+ ;;
81
+ esac
82
+ }
83
+
84
+ # Register completions for all command aliases
85
+ complete -F _lanonasis_completions lanonasis
86
+ complete -F _lanonasis_completions onasis
87
+ complete -F _lanonasis_completions memory
88
+ complete -F _lanonasis_completions maas
@@ -0,0 +1,132 @@
1
+ # Lanonasis/Onasis CLI Fish Completion
2
+ # Installation: Place in ~/.config/fish/completions/
3
+
4
+ # Helper function to check if a command is being used
5
+ function __fish_lanonasis_using_command
6
+ set -l cmd (commandline -opc)
7
+ if [ (count $cmd) -eq 2 ]
8
+ if [ $argv[1] = $cmd[2] ]
9
+ return 0
10
+ end
11
+ end
12
+ return 1
13
+ end
14
+
15
+ function __fish_lanonasis_using_subcommand
16
+ set -l cmd (commandline -opc)
17
+ if [ (count $cmd) -eq 3 ]
18
+ if [ $argv[1] = $cmd[2] ]; and [ $argv[2] = $cmd[3] ]
19
+ return 0
20
+ end
21
+ end
22
+ return 1
23
+ end
24
+
25
+ # Global options
26
+ complete -c lanonasis -s h -l help -d 'Show help information'
27
+ complete -c lanonasis -s v -l version -d 'Show version information'
28
+ complete -c lanonasis -s V -l verbose -d 'Enable verbose logging'
29
+ complete -c lanonasis -l output -d 'Output format' -xa 'table json yaml csv'
30
+ complete -c lanonasis -l api-url -d 'Override API URL'
31
+ complete -c lanonasis -l no-mcp -d 'Disable MCP and use direct API'
32
+
33
+ # Main commands
34
+ complete -c lanonasis -f -n '__fish_use_subcommand' -a 'init' -d 'Initialize CLI configuration'
35
+ complete -c lanonasis -f -n '__fish_use_subcommand' -a 'login' -d 'Authenticate with your account'
36
+ complete -c lanonasis -f -n '__fish_use_subcommand' -a 'auth' -d 'Authentication commands'
37
+ complete -c lanonasis -f -n '__fish_use_subcommand' -a 'logout' -d 'Logout from your account'
38
+ complete -c lanonasis -f -n '__fish_use_subcommand' -a 'status' -d 'Show system status'
39
+ complete -c lanonasis -f -n '__fish_use_subcommand' -a 'health' -d 'Comprehensive health check'
40
+ complete -c lanonasis -f -n '__fish_use_subcommand' -a 'docs' -d 'Open documentation'
41
+ complete -c lanonasis -f -n '__fish_use_subcommand' -a 'memory' -d 'Memory management commands'
42
+ complete -c lanonasis -f -n '__fish_use_subcommand' -a 'mem' -d 'Memory management (alias)'
43
+ complete -c lanonasis -f -n '__fish_use_subcommand' -a 'topic' -d 'Topic management commands'
44
+ complete -c lanonasis -f -n '__fish_use_subcommand' -a 'topics' -d 'Topic management (alias)'
45
+ complete -c lanonasis -f -n '__fish_use_subcommand' -a 'config' -d 'Configuration management'
46
+ complete -c lanonasis -f -n '__fish_use_subcommand' -a 'org' -d 'Organization management'
47
+ complete -c lanonasis -f -n '__fish_use_subcommand' -a 'organization' -d 'Organization management (alias)'
48
+ complete -c lanonasis -f -n '__fish_use_subcommand' -a 'api-keys' -d 'API key management'
49
+ complete -c lanonasis -f -n '__fish_use_subcommand' -a 'mcp' -d 'Model Context Protocol commands'
50
+ complete -c lanonasis -f -n '__fish_use_subcommand' -a 'dashboard' -d 'Dashboard management'
51
+ complete -c lanonasis -f -n '__fish_use_subcommand' -a 'documentation' -d 'Documentation management'
52
+ complete -c lanonasis -f -n '__fish_use_subcommand' -a 'sdk' -d 'SDK management'
53
+ complete -c lanonasis -f -n '__fish_use_subcommand' -a 'api' -d 'REST API management'
54
+ complete -c lanonasis -f -n '__fish_use_subcommand' -a 'rest' -d 'REST API management (alias)'
55
+ complete -c lanonasis -f -n '__fish_use_subcommand' -a 'deploy' -d 'Deployment management'
56
+ complete -c lanonasis -f -n '__fish_use_subcommand' -a 'deployment' -d 'Deployment management (alias)'
57
+ complete -c lanonasis -f -n '__fish_use_subcommand' -a 'service' -d 'Service management'
58
+ complete -c lanonasis -f -n '__fish_use_subcommand' -a 'services' -d 'Service management (alias)'
59
+
60
+ # Auth subcommands
61
+ complete -c lanonasis -f -n '__fish_lanonasis_using_command auth' -a 'login' -d 'Login to your account'
62
+ complete -c lanonasis -f -n '__fish_lanonasis_using_command auth' -a 'logout' -d 'Logout from your account'
63
+ complete -c lanonasis -f -n '__fish_lanonasis_using_command auth' -a 'status' -d 'Show authentication status'
64
+ complete -c lanonasis -f -n '__fish_lanonasis_using_command auth' -a 'vendor-key' -d 'Authenticate with vendor key'
65
+ complete -c lanonasis -f -n '__fish_lanonasis_using_command auth' -a 'oauth' -d 'Browser-based OAuth authentication'
66
+
67
+ # Memory subcommands
68
+ complete -c lanonasis -f -n '__fish_lanonasis_using_command memory' -a 'list' -d 'List memories'
69
+ complete -c lanonasis -f -n '__fish_lanonasis_using_command memory' -a 'create' -d 'Create a new memory'
70
+ complete -c lanonasis -f -n '__fish_lanonasis_using_command memory' -a 'get' -d 'Get a specific memory'
71
+ complete -c lanonasis -f -n '__fish_lanonasis_using_command memory' -a 'update' -d 'Update an existing memory'
72
+ complete -c lanonasis -f -n '__fish_lanonasis_using_command memory' -a 'delete' -d 'Delete a memory'
73
+ complete -c lanonasis -f -n '__fish_lanonasis_using_command memory' -a 'search' -d 'Search memories'
74
+ complete -c lanonasis -f -n '__fish_lanonasis_using_command memory' -a 'stats' -d 'Show memory statistics'
75
+ complete -c lanonasis -f -n '__fish_lanonasis_using_command memory' -a 'bulk-delete' -d 'Delete multiple memories'
76
+ complete -c lanonasis -f -n '__fish_lanonasis_using_command memory' -a 'export' -d 'Export memories'
77
+ complete -c lanonasis -f -n '__fish_lanonasis_using_command memory' -a 'import' -d 'Import memories'
78
+
79
+ # Memory command options
80
+ complete -c lanonasis -n '__fish_lanonasis_using_subcommand memory create' -l memory-type -xa 'context project knowledge reference personal workflow'
81
+ complete -c lanonasis -n '__fish_lanonasis_using_subcommand memory update' -l memory-type -xa 'context project knowledge reference personal workflow'
82
+ complete -c lanonasis -n '__fish_lanonasis_using_subcommand memory list' -l memory-type -xa 'context project knowledge reference personal workflow'
83
+ complete -c lanonasis -n '__fish_lanonasis_using_subcommand memory list' -l sort-by -xa 'created_at updated_at last_accessed access_count'
84
+ complete -c lanonasis -n '__fish_lanonasis_using_subcommand memory list' -l sort-order -xa 'asc desc'
85
+
86
+ # Topic subcommands
87
+ complete -c lanonasis -f -n '__fish_lanonasis_using_command topic' -a 'list' -d 'List topics'
88
+ complete -c lanonasis -f -n '__fish_lanonasis_using_command topic' -a 'create' -d 'Create a new topic'
89
+ complete -c lanonasis -f -n '__fish_lanonasis_using_command topic' -a 'get' -d 'Get a specific topic'
90
+ complete -c lanonasis -f -n '__fish_lanonasis_using_command topic' -a 'update' -d 'Update an existing topic'
91
+ complete -c lanonasis -f -n '__fish_lanonasis_using_command topic' -a 'delete' -d 'Delete a topic'
92
+
93
+ # Config subcommands
94
+ complete -c lanonasis -f -n '__fish_lanonasis_using_command config' -a 'get' -d 'Get configuration value'
95
+ complete -c lanonasis -f -n '__fish_lanonasis_using_command config' -a 'set' -d 'Set configuration value'
96
+ complete -c lanonasis -f -n '__fish_lanonasis_using_command config' -a 'list' -d 'List all configuration'
97
+ complete -c lanonasis -f -n '__fish_lanonasis_using_command config' -a 'reset' -d 'Reset configuration'
98
+
99
+ # API Keys subcommands
100
+ complete -c lanonasis -f -n '__fish_lanonasis_using_command api-keys' -a 'list' -d 'List API keys'
101
+ complete -c lanonasis -f -n '__fish_lanonasis_using_command api-keys' -a 'create' -d 'Create a new API key'
102
+ complete -c lanonasis -f -n '__fish_lanonasis_using_command api-keys' -a 'revoke' -d 'Revoke an API key'
103
+ complete -c lanonasis -f -n '__fish_lanonasis_using_command api-keys' -a 'rotate' -d 'Rotate an API key'
104
+
105
+ # MCP subcommands
106
+ complete -c lanonasis -f -n '__fish_lanonasis_using_command mcp' -a 'status' -d 'Show MCP server status'
107
+ complete -c lanonasis -f -n '__fish_lanonasis_using_command mcp' -a 'connect' -d 'Connect to MCP server'
108
+ complete -c lanonasis -f -n '__fish_lanonasis_using_command mcp' -a 'disconnect' -d 'Disconnect from MCP server'
109
+ complete -c lanonasis -f -n '__fish_lanonasis_using_command mcp' -a 'servers' -d 'List MCP servers'
110
+ complete -c lanonasis -f -n '__fish_lanonasis_using_command mcp' -a 'tools' -d 'List available tools'
111
+ complete -c lanonasis -f -n '__fish_lanonasis_using_command mcp' -a 'resources' -d 'List available resources'
112
+
113
+ # Dashboard subcommands
114
+ complete -c lanonasis -f -n '__fish_lanonasis_using_command dashboard' -a 'status' -d 'Check dashboard status'
115
+ complete -c lanonasis -f -n '__fish_lanonasis_using_command dashboard' -a 'logs' -d 'View dashboard logs'
116
+ complete -c lanonasis -f -n '__fish_lanonasis_using_command dashboard' -a 'open' -d 'Open dashboard in browser'
117
+
118
+ # Deploy subcommands
119
+ complete -c lanonasis -f -n '__fish_lanonasis_using_command deploy' -a 'status' -d 'Show deployment status'
120
+ complete -c lanonasis -f -n '__fish_lanonasis_using_command deploy' -a 'health' -d 'Check deployment health'
121
+ complete -c lanonasis -f -n '__fish_lanonasis_using_command deploy' -a 'list' -d 'List deployments'
122
+
123
+ # Service subcommands
124
+ complete -c lanonasis -f -n '__fish_lanonasis_using_command service' -a 'list' -d 'List services'
125
+ complete -c lanonasis -f -n '__fish_lanonasis_using_command service' -a 'status' -d 'Show service status'
126
+ complete -c lanonasis -f -n '__fish_lanonasis_using_command service' -a 'restart' -d 'Restart a service'
127
+ complete -c lanonasis -f -n '__fish_lanonasis_using_command service' -a 'logs' -d 'View service logs'
128
+
129
+ # Apply same completions for all aliases
130
+ complete -c onasis -w lanonasis
131
+ complete -c memory -w lanonasis
132
+ complete -c maas -w lanonasis