lsh-framework 1.2.0 → 1.3.0

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 (74) hide show
  1. package/README.md +40 -3
  2. package/dist/cli.js +104 -486
  3. package/dist/commands/doctor.js +427 -0
  4. package/dist/commands/init.js +371 -0
  5. package/dist/constants/api.js +94 -0
  6. package/dist/constants/commands.js +64 -0
  7. package/dist/constants/config.js +56 -0
  8. package/dist/constants/database.js +21 -0
  9. package/dist/constants/errors.js +79 -0
  10. package/dist/constants/index.js +28 -0
  11. package/dist/constants/paths.js +28 -0
  12. package/dist/constants/ui.js +73 -0
  13. package/dist/constants/validation.js +124 -0
  14. package/dist/daemon/lshd.js +11 -32
  15. package/dist/lib/daemon-client-helper.js +7 -4
  16. package/dist/lib/daemon-client.js +9 -2
  17. package/dist/lib/format-utils.js +163 -0
  18. package/dist/lib/fuzzy-match.js +123 -0
  19. package/dist/lib/job-manager.js +2 -1
  20. package/dist/lib/platform-utils.js +211 -0
  21. package/dist/lib/secrets-manager.js +11 -1
  22. package/dist/lib/string-utils.js +128 -0
  23. package/dist/services/daemon/daemon-registrar.js +3 -2
  24. package/dist/services/secrets/secrets.js +119 -59
  25. package/package.json +10 -74
  26. package/dist/app.js +0 -33
  27. package/dist/cicd/analytics.js +0 -261
  28. package/dist/cicd/auth.js +0 -269
  29. package/dist/cicd/cache-manager.js +0 -172
  30. package/dist/cicd/data-retention.js +0 -305
  31. package/dist/cicd/performance-monitor.js +0 -224
  32. package/dist/cicd/webhook-receiver.js +0 -640
  33. package/dist/commands/api.js +0 -346
  34. package/dist/commands/theme.js +0 -261
  35. package/dist/commands/zsh-import.js +0 -240
  36. package/dist/components/App.js +0 -1
  37. package/dist/components/Divider.js +0 -29
  38. package/dist/components/REPL.js +0 -43
  39. package/dist/components/Terminal.js +0 -232
  40. package/dist/components/UserInput.js +0 -30
  41. package/dist/daemon/api-server.js +0 -316
  42. package/dist/daemon/monitoring-api.js +0 -220
  43. package/dist/lib/api-error-handler.js +0 -185
  44. package/dist/lib/associative-arrays.js +0 -285
  45. package/dist/lib/base-api-server.js +0 -290
  46. package/dist/lib/brace-expansion.js +0 -160
  47. package/dist/lib/builtin-commands.js +0 -439
  48. package/dist/lib/executors/builtin-executor.js +0 -52
  49. package/dist/lib/extended-globbing.js +0 -411
  50. package/dist/lib/extended-parameter-expansion.js +0 -227
  51. package/dist/lib/interactive-shell.js +0 -460
  52. package/dist/lib/job-builtins.js +0 -582
  53. package/dist/lib/pathname-expansion.js +0 -216
  54. package/dist/lib/script-runner.js +0 -226
  55. package/dist/lib/shell-executor.js +0 -2504
  56. package/dist/lib/shell-parser.js +0 -958
  57. package/dist/lib/shell-types.js +0 -6
  58. package/dist/lib/shell.lib.js +0 -40
  59. package/dist/lib/theme-manager.js +0 -476
  60. package/dist/lib/variable-expansion.js +0 -385
  61. package/dist/lib/zsh-compatibility.js +0 -659
  62. package/dist/lib/zsh-import-manager.js +0 -707
  63. package/dist/lib/zsh-options.js +0 -328
  64. package/dist/pipeline/job-tracker.js +0 -491
  65. package/dist/pipeline/mcli-bridge.js +0 -309
  66. package/dist/pipeline/pipeline-service.js +0 -1119
  67. package/dist/pipeline/workflow-engine.js +0 -870
  68. package/dist/services/api/api.js +0 -58
  69. package/dist/services/api/auth.js +0 -35
  70. package/dist/services/api/config.js +0 -7
  71. package/dist/services/api/file.js +0 -22
  72. package/dist/services/shell/shell.js +0 -28
  73. package/dist/services/zapier.js +0 -16
  74. package/dist/simple-api-server.js +0 -148
package/dist/cli.js CHANGED
@@ -1,19 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
3
  * LSH CLI Entry Point
4
- * Supports interactive mode and script execution
4
+ * Simple, cross-platform encrypted secrets manager
5
5
  */
6
6
  import { Command } from 'commander';
7
- import InteractiveShell from './lib/interactive-shell.js';
8
- import ScriptRunner from './lib/script-runner.js';
9
- import { parseShellCommand } from './lib/shell-parser.js';
10
7
  import selfCommand from './commands/self.js';
11
- import { registerApiCommands } from './commands/api.js';
12
- import { registerZshImportCommands } from './commands/zsh-import.js';
13
- import { registerThemeCommands } from './commands/theme.js';
8
+ import { registerInitCommands } from './commands/init.js';
9
+ import { registerDoctorCommands } from './commands/doctor.js';
14
10
  import { init_daemon } from './services/daemon/daemon.js';
15
- import { init_ishell } from './services/shell/shell.js';
16
- import { init_lib } from './services/lib/lib.js';
17
11
  import { init_supabase } from './services/supabase/supabase.js';
18
12
  import { init_cron } from './services/cron/cron.js';
19
13
  import { init_secrets } from './services/secrets/secrets.js';
@@ -27,140 +21,63 @@ function getVersion() {
27
21
  try {
28
22
  const packageJsonPath = path.join(__dirname, '../package.json');
29
23
  const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
30
- return packageJson.version || '0.5.1';
24
+ return packageJson.version || '1.2.0';
31
25
  }
32
26
  catch {
33
- return '0.5.1';
27
+ return '1.2.0';
34
28
  }
35
29
  }
36
30
  const program = new Command();
37
31
  program
38
32
  .name('lsh')
39
- .description('LSH - Encrypted secrets manager with automatic rotation and team sync')
33
+ .description('LSH - Simple, cross-platform encrypted secrets manager')
40
34
  .version(getVersion())
41
35
  .showSuggestionAfterError(true)
42
36
  .showHelpAfterError('(add --help for additional information)')
43
37
  .allowUnknownOption(false)
44
38
  .enablePositionalOptions();
45
- // Options for main command
39
+ // Main action - show help by default
46
40
  program
47
- .option('-i, --interactive', 'Start interactive shell')
48
- .option('-c, --command <command>', 'Execute command string')
49
- .option('-s, --script <file>', 'Execute script file')
50
- .option('--rc <file>', 'Use custom rc file')
51
- .option('--zsh-compat', 'Enable ZSH compatibility mode')
52
- .option('--source-zshrc', 'Source ~/.zshrc configuration')
53
- .option('--package-manager <manager>', 'Package manager (npm, yarn, brew, apt, yum)')
54
41
  .option('-v, --verbose', 'Verbose output')
55
42
  .option('-d, --debug', 'Debug mode')
56
43
  .action(async (options) => {
57
- try {
58
- if (options.command) {
59
- // Execute single command
60
- await executeCommand(options.command, options);
61
- }
62
- else if (options.script) {
63
- // Execute script file
64
- await executeScript(options.script, options);
65
- }
66
- else if (options.interactive) {
67
- // Start interactive shell only if -i or --interactive is specified
68
- await startInteractiveShell(options);
69
- }
70
- else {
71
- // No arguments - show secrets-focused help
72
- console.log('LSH - Encrypted Secrets Manager with Automatic Rotation');
73
- console.log('');
74
- console.log('🔐 Secrets Management (Primary Features):');
75
- console.log(' sync Check sync status & get recommendations');
76
- console.log(' push Upload .env to encrypted cloud storage');
77
- console.log(' pull Download .env from cloud storage');
78
- console.log(' list List secrets in current local .env file');
79
- console.log(' env [name] List/view cloud environments');
80
- console.log(' key Generate encryption key');
81
- console.log(' create Create new .env file');
82
- console.log(' get <key> Get a specific secret value (--all for all)');
83
- console.log(' set <key> <value> Set a specific secret value');
84
- console.log(' delete Delete .env file');
85
- console.log(' status Get detailed secrets status');
86
- console.log('');
87
- console.log('🔄 Automation (Schedule secret rotation):');
88
- console.log(' cron add Schedule automatic tasks');
89
- console.log(' cron list List scheduled jobs');
90
- console.log(' daemon start Start persistent daemon');
91
- console.log('');
92
- console.log('🚀 Quick Start:');
93
- console.log(' lsh key # Generate encryption key');
94
- console.log(' lsh push --env dev # Push your secrets');
95
- console.log(' lsh pull --env dev # Pull on another machine');
96
- console.log('');
97
- console.log('📚 More Commands:');
98
- console.log(' api API server management');
99
- console.log(' supabase Supabase database management');
100
- console.log(' daemon Daemon management');
101
- console.log(' cron Cron job management');
102
- console.log(' self Self-management commands');
103
- console.log(' self zsh ZSH compatibility commands');
104
- console.log(' -i, --interactive Start interactive shell');
105
- console.log(' --help Show all options');
106
- console.log('');
107
- console.log('📖 Documentation: https://github.com/gwicho38/lsh');
108
- }
109
- }
110
- catch (error) {
111
- console.error(`Error: ${error.message}`);
112
- process.exit(1);
113
- }
114
- });
115
- // Script execution subcommand
116
- program
117
- .command('script <file>')
118
- .description('Execute a shell script')
119
- .option('-a, --args <args...>', 'Script arguments')
120
- .option('-c, --cwd <dir>', 'Working directory')
121
- .option('-e, --env <key=value>', 'Environment variables')
122
- .action(async (file, options) => {
123
- try {
124
- await executeScript(file, options);
125
- }
126
- catch (error) {
127
- console.error(`Script error: ${error.message}`);
128
- process.exit(1);
129
- }
130
- });
131
- // Configuration subcommand
132
- program
133
- .command('config')
134
- .description('Manage LSH configuration')
135
- .option('--init', 'Initialize configuration')
136
- .option('--show', 'Show current configuration')
137
- .option('--validate', 'Validate configuration')
138
- .action(async (options) => {
139
- try {
140
- await handleConfig(options);
141
- }
142
- catch (error) {
143
- console.error(`Config error: ${error.message}`);
144
- process.exit(1);
145
- }
146
- });
147
- // Self-management commands
148
- program.addCommand(selfCommand);
149
- // ZSH compatibility commands (under self)
150
- selfCommand
151
- .command('zsh')
152
- .description('ZSH compatibility commands')
153
- .option('--migrate', 'Migrate ZSH configuration to LSH')
154
- .option('--source', 'Source ZSH configuration')
155
- .option('--check', 'Check ZSH availability')
156
- .action(async (options) => {
157
- try {
158
- await handleZshCompatibility(options);
159
- }
160
- catch (error) {
161
- console.error(`ZSH compatibility error: ${error.message}`);
162
- process.exit(1);
163
- }
44
+ // No arguments - show secrets-focused help
45
+ console.log('LSH - Encrypted Secrets Manager');
46
+ console.log('');
47
+ console.log('🔐 Secrets Management Commands:');
48
+ console.log(' init Interactive setup wizard (first-time setup)');
49
+ console.log(' doctor Check configuration and connectivity');
50
+ console.log(' sync Check sync status & get recommendations');
51
+ console.log(' push Upload .env to encrypted cloud storage');
52
+ console.log(' pull Download .env from cloud storage');
53
+ console.log(' list List secrets in current local .env file');
54
+ console.log(' env [name] List/view cloud environments');
55
+ console.log(' key Generate encryption key');
56
+ console.log(' create Create new .env file');
57
+ console.log(' get <key> Get a specific secret value (--all for all)');
58
+ console.log(' set <key> <value> Set a specific secret value');
59
+ console.log(' delete Delete .env file');
60
+ console.log(' status Get detailed secrets status');
61
+ console.log('');
62
+ console.log('🔄 Automation (Optional - schedule secret rotation):');
63
+ console.log(' cron add Schedule automatic tasks');
64
+ console.log(' cron list List scheduled jobs');
65
+ console.log(' daemon start Start persistent daemon');
66
+ console.log('');
67
+ console.log('🚀 Quick Start:');
68
+ console.log(' lsh init # Interactive setup (first time)');
69
+ console.log(' lsh doctor # Verify configuration');
70
+ console.log(' lsh push --env dev # Push your secrets');
71
+ console.log(' lsh pull --env dev # Pull on another machine');
72
+ console.log('');
73
+ console.log('📚 More Commands:');
74
+ console.log(' supabase Supabase database management');
75
+ console.log(' daemon Daemon management');
76
+ console.log(' cron Cron job management');
77
+ console.log(' self Self-management commands');
78
+ console.log(' --help Show all options');
79
+ console.log('');
80
+ console.log('📖 Documentation: https://github.com/gwicho38/lsh');
164
81
  });
165
82
  // Help subcommand
166
83
  program
@@ -215,32 +132,23 @@ function findSimilarCommands(input, validCommands) {
215
132
  }
216
133
  // Register async command modules
217
134
  (async () => {
218
- // REPL interactive shell
219
- await init_ishell(program);
220
- // Flatten all service commands to top-level (no more 'lib' parent)
135
+ // Essential onboarding commands
136
+ registerInitCommands(program);
137
+ registerDoctorCommands(program);
138
+ // Secrets management (primary feature)
139
+ await init_secrets(program);
140
+ // Supporting services
221
141
  await init_supabase(program);
222
142
  await init_daemon(program);
223
143
  await init_cron(program);
224
- registerApiCommands(program);
225
- // Legacy 'lib' command group with deprecation warnings
226
- const libCommand = await init_lib(program);
227
- await init_supabase(libCommand);
228
- await init_daemon(libCommand);
229
- await init_cron(libCommand);
230
- registerApiCommands(libCommand);
231
- // Secrets as top-level command
232
- await init_secrets(program);
233
- // Self-management commands with nested utilities
234
- registerZshImportCommands(selfCommand);
235
- registerThemeCommands(selfCommand);
144
+ // Self-management commands
145
+ program.addCommand(selfCommand);
236
146
  // Pre-parse check for unknown commands
237
147
  const args = process.argv.slice(2);
238
148
  if (args.length > 0) {
239
149
  const firstArg = args[0];
240
150
  const validCommands = program.commands.map(cmd => cmd.name());
241
- const validOptions = ['-i', '--interactive', '-c', '--command', '-s', '--script',
242
- '--rc', '--zsh-compat', '--source-zshrc', '--package-manager',
243
- '-v', '--verbose', '-d', '--debug', '-h', '--help', '-V', '--version'];
151
+ const validOptions = ['-v', '--verbose', '-d', '--debug', '-h', '--help', '-V', '--version'];
244
152
  // Check if first argument looks like a command but isn't valid
245
153
  if (!firstArg.startsWith('-') &&
246
154
  !validCommands.includes(firstArg) &&
@@ -293,363 +201,73 @@ function findSimilarCommands(input, validCommands) {
293
201
  // Parse command line arguments after all commands are registered
294
202
  program.parse(process.argv);
295
203
  })();
296
- /**
297
- * Start interactive shell
298
- */
299
- async function startInteractiveShell(options) {
300
- const shellOptions = {
301
- verbose: options.verbose,
302
- debug: options.debug,
303
- };
304
- // Only set rcFile if explicitly provided
305
- if (options.rc) {
306
- shellOptions.rcFile = options.rc;
307
- }
308
- const shell = new InteractiveShell(shellOptions);
309
- await shell.start();
310
- }
311
- /**
312
- * Execute single command
313
- */
314
- async function executeCommand(command, options) {
315
- const { ShellExecutor } = await import('./lib/shell-executor.js');
316
- const executor = new ShellExecutor();
317
- // Load configuration if rc file specified
318
- if (options.rc) {
319
- await loadRcFile(executor, options.rc);
320
- }
321
- try {
322
- const ast = parseShellCommand(command);
323
- const result = await executor.execute(ast);
324
- if (result.stdout) {
325
- console.log(result.stdout);
326
- }
327
- if (result.stderr) {
328
- console.error(result.stderr);
329
- }
330
- process.exit(result.exitCode);
331
- }
332
- catch (error) {
333
- console.error(`Command error: ${error.message}`);
334
- process.exit(1);
335
- }
336
- }
337
- /**
338
- * Execute script file
339
- */
340
- async function executeScript(scriptPath, options) {
341
- if (!fs.existsSync(scriptPath)) {
342
- console.error(`Script file not found: ${scriptPath}`);
343
- process.exit(1);
344
- }
345
- const runner = new ScriptRunner({
346
- cwd: options.cwd,
347
- env: parseEnvOptions(options.env),
348
- });
349
- const result = await runner.executeScript(scriptPath, {
350
- args: options.args || [],
351
- });
352
- if (result.output) {
353
- console.log(result.output);
354
- }
355
- if (result.errors) {
356
- console.error(result.errors);
357
- }
358
- process.exit(result.exitCode);
359
- }
360
- /**
361
- * Handle configuration commands
362
- */
363
- async function handleConfig(options) {
364
- const rcFile = path.join(process.env.HOME || '/', '.lshrc');
365
- if (options.init) {
366
- await initializeConfig(rcFile);
367
- }
368
- else if (options.show) {
369
- await showConfig(rcFile);
370
- }
371
- else if (options.validate) {
372
- await validateConfig(rcFile);
373
- }
374
- else {
375
- console.log('Configuration management:');
376
- console.log(' --init Initialize default configuration');
377
- console.log(' --show Show current configuration');
378
- console.log(' --validate Validate configuration file');
379
- }
380
- }
381
- /**
382
- * Initialize configuration file
383
- */
384
- async function initializeConfig(rcFile) {
385
- if (fs.existsSync(rcFile)) {
386
- console.log(`Configuration file already exists: ${rcFile}`);
387
- return;
388
- }
389
- const defaultConfig = `# LSH Configuration File
390
- # This file is executed when LSH starts in interactive mode
391
-
392
- # Enable ZSH features
393
- setopt EXTENDED_GLOB
394
- setopt AUTO_CD
395
- setopt SHARE_HISTORY
396
- setopt HIST_IGNORE_DUPS
397
-
398
- # Set prompt
399
- export PROMPT='%n@%m:%~$ '
400
- export RPROMPT='%T'
401
-
402
- # Set history options
403
- export HISTSIZE=10000
404
- export HISTFILE=~/.lsh_history
405
-
406
- # Aliases
407
- alias ll='ls -la'
408
- alias la='ls -A'
409
- alias l='ls -CF'
410
- alias ..='cd ..'
411
- alias ...='cd ../..'
412
-
413
- # Functions
414
- greet() {
415
- echo "Hello from LSH!"
416
- }
417
-
418
- # Welcome message
419
- echo "LSH interactive shell loaded. Type 'help' for commands."
420
- `;
421
- try {
422
- fs.writeFileSync(rcFile, defaultConfig, 'utf8');
423
- console.log(`✅ Created configuration file: ${rcFile}`);
424
- }
425
- catch (error) {
426
- console.error(`❌ Failed to create configuration: ${error.message}`);
427
- }
428
- }
429
- /**
430
- * Show current configuration
431
- */
432
- async function showConfig(rcFile) {
433
- if (!fs.existsSync(rcFile)) {
434
- console.log(`❌ Configuration file not found: ${rcFile}`);
435
- console.log('Run "lsh config --init" to create one.');
436
- return;
437
- }
438
- try {
439
- const content = fs.readFileSync(rcFile, 'utf8');
440
- console.log(`📄 Configuration file: ${rcFile}`);
441
- console.log('='.repeat(50));
442
- console.log(content);
443
- }
444
- catch (error) {
445
- console.error(`❌ Failed to read configuration: ${error.message}`);
446
- }
447
- }
448
- /**
449
- * Validate configuration file
450
- */
451
- async function validateConfig(rcFile) {
452
- if (!fs.existsSync(rcFile)) {
453
- console.log(`❌ Configuration file not found: ${rcFile}`);
454
- return;
455
- }
456
- try {
457
- const content = fs.readFileSync(rcFile, 'utf8');
458
- const lines = content.split('\n');
459
- let valid = true;
460
- const errors = [];
461
- for (let i = 0; i < lines.length; i++) {
462
- const line = lines[i].trim();
463
- if (line.startsWith('#') || line === '') {
464
- continue;
465
- }
466
- try {
467
- parseShellCommand(line);
468
- }
469
- catch (error) {
470
- valid = false;
471
- errors.push(`Line ${i + 1}: ${error.message}`);
472
- }
473
- }
474
- if (valid) {
475
- console.log(`✅ Configuration file is valid: ${rcFile}`);
476
- }
477
- else {
478
- console.log(`❌ Configuration file has errors: ${rcFile}`);
479
- errors.forEach(error => console.log(` ${error}`));
480
- }
481
- }
482
- catch (error) {
483
- console.error(`❌ Failed to validate configuration: ${error.message}`);
484
- }
485
- }
486
- /**
487
- * Load rc file
488
- */
489
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
490
- async function loadRcFile(executor, rcFile) {
491
- if (!fs.existsSync(rcFile)) {
492
- console.error(`Configuration file not found: ${rcFile}`);
493
- return;
494
- }
495
- try {
496
- const content = fs.readFileSync(rcFile, 'utf8');
497
- const lines = content.split('\n');
498
- for (const line of lines) {
499
- const trimmed = line.trim();
500
- if (trimmed.startsWith('#') || trimmed === '') {
501
- continue;
502
- }
503
- try {
504
- const ast = parseShellCommand(trimmed);
505
- await executor.execute(ast);
506
- }
507
- catch (error) {
508
- console.error(`Config error: ${error.message}`);
509
- }
510
- }
511
- }
512
- catch (error) {
513
- console.error(`Failed to load configuration: ${error.message}`);
514
- }
515
- }
516
- /**
517
- * Parse environment variable options
518
- */
519
- function parseEnvOptions(envOptions) {
520
- const env = {};
521
- if (envOptions) {
522
- for (const option of envOptions) {
523
- const [key, value] = option.split('=', 2);
524
- if (key && value !== undefined) {
525
- env[key] = value;
526
- }
527
- }
528
- }
529
- return env;
530
- }
531
- /**
532
- * Handle ZSH compatibility commands
533
- */
534
- async function handleZshCompatibility(options) {
535
- const { ShellExecutor } = await import('./lib/shell-executor.js');
536
- const executor = new ShellExecutor();
537
- if (options.migrate) {
538
- const result = await executor.getZshCompatibility().migrateZshConfig();
539
- console.log(result.message);
540
- process.exit(result.success ? 0 : 1);
541
- }
542
- else if (options.source) {
543
- const result = await executor.getZshCompatibility().sourceZshConfig();
544
- console.log(result.message);
545
- process.exit(result.success ? 0 : 1);
546
- }
547
- else if (options.check) {
548
- const result = await executor.getZshCompatibility().checkZshAvailability();
549
- if (result.available) {
550
- console.log(`✅ ZSH is available: version ${result.version}`);
551
- console.log(` Path: ${result.path}`);
552
- }
553
- else {
554
- console.log('❌ ZSH is not available on this system');
555
- }
556
- }
557
- else {
558
- console.log('ZSH Compatibility Commands:');
559
- console.log(' --migrate Migrate ZSH configuration to LSH');
560
- console.log(' --source Source ZSH configuration');
561
- console.log(' --check Check ZSH availability');
562
- }
563
- }
564
204
  /**
565
205
  * Show detailed help
566
206
  */
567
207
  function showDetailedHelp() {
568
- console.log('LSH - Modern Shell with ZSH Features');
569
- console.log('====================================');
208
+ console.log('LSH - Encrypted Secrets Manager');
209
+ console.log('================================');
570
210
  console.log('');
571
211
  console.log('Usage:');
572
212
  console.log(' lsh Show help (default)');
573
- console.log(' lsh -i Start interactive shell');
574
- console.log(' lsh -c "command" Execute command string');
575
- console.log(' lsh -s script.sh Execute script file');
576
- console.log(' lsh script.sh Execute script file');
213
+ console.log(' lsh init Interactive setup wizard');
214
+ console.log(' lsh push Push secrets to cloud');
215
+ console.log(' lsh pull Pull secrets from cloud');
577
216
  console.log('');
578
- console.log('Options:');
579
- console.log(' -i, --interactive Start interactive shell');
580
- console.log(' -c, --command <cmd> Execute command string');
581
- console.log(' -s, --script <file> Execute script file');
582
- console.log(' --rc <file> Use custom rc file');
583
- console.log(' -v, --verbose Verbose output');
584
- console.log(' -d, --debug Debug mode');
585
- console.log(' -h, --help Show help');
586
- console.log(' -V, --version Show version');
217
+ console.log('Main Commands:');
218
+ console.log(' init Interactive setup wizard (first-time)');
219
+ console.log(' doctor Health check & troubleshooting');
220
+ console.log(' sync Check sync status');
221
+ console.log(' push Upload encrypted secrets');
222
+ console.log(' pull Download encrypted secrets');
223
+ console.log(' list List local secrets');
224
+ console.log(' env Manage environments');
225
+ console.log(' key Generate encryption key');
226
+ console.log(' status Detailed status report');
587
227
  console.log('');
588
- console.log('Subcommands:');
589
- console.log(' secrets Secrets management (primary feature)');
590
- console.log(' repl JavaScript REPL interactive shell');
591
- console.log(' script <file> Execute shell script');
592
- console.log(' config Manage configuration');
593
- console.log(' help Show detailed help');
228
+ console.log('Automation:');
229
+ console.log(' daemon start Start background daemon');
230
+ console.log(' daemon stop Stop background daemon');
231
+ console.log(' daemon status Check daemon status');
232
+ console.log(' cron add Schedule automatic tasks');
233
+ console.log(' cron list List scheduled jobs');
594
234
  console.log('');
595
- console.log('Self-Management (lsh self <command>):');
596
- console.log(' self update Update to latest version');
597
- console.log(' self version Show version information');
598
- console.log(' self uninstall Uninstall LSH from system');
599
- console.log(' self theme Manage themes (import Oh-My-Zsh themes)');
600
- console.log(' self zsh ZSH compatibility commands');
601
- console.log(' self zsh-import Import ZSH configs (aliases, functions, exports)');
235
+ console.log('Self-Management:');
236
+ console.log(' self update Update to latest version');
237
+ console.log(' self version Show version information');
238
+ console.log(' self uninstall Uninstall from system');
602
239
  console.log('');
603
- console.log('Service Commands:');
604
- console.log(' api API server management');
605
- console.log(' supabase Supabase database management');
606
- console.log(' daemon Daemon management');
607
- console.log(' daemon job Job management');
608
- console.log(' daemon db Database integration');
609
- console.log(' cron Cron job management');
240
+ console.log('Database:');
241
+ console.log(' supabase init Initialize Supabase connection');
242
+ console.log(' supabase test Test Supabase connectivity');
243
+ console.log(' supabase reset Reset database schema');
610
244
  console.log('');
611
245
  console.log('Examples:');
612
246
  console.log('');
613
- console.log(' Shell Usage:');
614
- console.log(' lsh # Show this help');
615
- console.log(' lsh -i # Start interactive shell');
616
- console.log(' lsh repl # Start JavaScript REPL');
617
- console.log(' lsh -c "echo hello && pwd" # Execute command');
618
- console.log(' lsh my-script.sh arg1 arg2 # Execute script');
247
+ console.log(' First-Time Setup:');
248
+ console.log(' lsh init # Interactive wizard');
249
+ console.log(' lsh doctor # Verify setup');
619
250
  console.log('');
620
- console.log(' Configuration:');
621
- console.log(' lsh config --init # Initialize config');
622
- console.log(' lsh config --show # Show config');
623
- console.log(' lsh self version # Show version');
624
- console.log(' lsh self update # Update to latest');
251
+ console.log(' Daily Usage:');
252
+ console.log(' lsh push --env dev # Push to dev env');
253
+ console.log(' lsh pull --env production # Pull from prod');
254
+ console.log(' lsh sync # Check status');
255
+ console.log(' lsh get API_KEY # Get specific secret');
256
+ console.log(' lsh set API_KEY newvalue # Update secret');
625
257
  console.log('');
626
- console.log(' Self-Management:');
627
- console.log(' lsh self update # Update to latest version');
628
- console.log(' lsh self version # Show version');
629
- console.log(' lsh self theme list # List available themes');
630
- console.log(' lsh self theme import robbyrussell # Import Oh-My-Zsh theme');
631
- console.log(' lsh self zsh-import aliases # Import ZSH aliases');
632
- console.log('');
633
- console.log(' Secrets Management:');
634
- console.log(' lsh secrets sync # Check sync status');
635
- console.log(' lsh secrets push # Push secrets to cloud');
636
- console.log(' lsh secrets pull # Pull secrets from cloud');
637
- console.log(' lsh secrets list # List environments');
638
- console.log('');
639
- console.log(' Service Operations:');
640
- console.log(' lsh daemon start # Start daemon');
641
- console.log(' lsh daemon status # Check daemon status');
642
- console.log(' lsh daemon job list # List all jobs');
643
- console.log(' lsh cron list # List cron jobs');
644
- console.log(' lsh api start # Start API server');
645
- console.log(' lsh api key # Generate API key');
258
+ console.log(' Automation:');
259
+ console.log(' lsh daemon start # Start daemon');
260
+ console.log(' lsh cron add --name rotate-keys \\');
261
+ console.log(' --schedule "0 0 * * *" \\');
262
+ console.log(' --command "./rotate.sh" # Daily rotation');
646
263
  console.log('');
647
264
  console.log('Features:');
648
- console.log(' ✅ POSIX Shell Compliance (85-95%)');
649
- console.log(' ✅ ZSH Features (arrays, globbing, floating point)');
650
- console.log(' ✅ Advanced Job Management');
651
- console.log(' ✅ Interactive Mode with History & Completion');
652
- console.log(' ✅ Configuration via ~/.lshrc');
653
- console.log(' ✅ Script Execution');
654
- console.log(' ✅ Command Line Interface');
265
+ console.log(' ✅ Cross-platform (Windows, macOS, Linux)');
266
+ console.log(' ✅ AES-256 encryption');
267
+ console.log(' ✅ Multi-environment support');
268
+ console.log(' ✅ Team collaboration');
269
+ console.log(' ✅ Automatic secret rotation');
270
+ console.log(' ✅ Git-aware namespacing');
271
+ console.log('');
272
+ console.log('Need help? Visit https://github.com/gwicho38/lsh');
655
273
  }