lsh-framework 0.5.11 → 0.5.13

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/cli.js CHANGED
@@ -64,17 +64,36 @@ program
64
64
  await startInteractiveShell(options);
65
65
  }
66
66
  else {
67
- // No arguments - show brief usage message
67
+ // No arguments - show commands without verbose options
68
68
  console.log('LSH - A modern shell with ZSH features and superior job management');
69
69
  console.log('');
70
70
  console.log('Usage: lsh [options] [command]');
71
71
  console.log('');
72
+ console.log('Commands:');
73
+ console.log(' repl JavaScript REPL interactive shell');
74
+ console.log(' script <file> Execute shell script');
75
+ console.log(' config Manage configuration');
76
+ console.log(' zsh ZSH compatibility commands');
77
+ console.log(' help Show detailed help');
78
+ console.log('');
79
+ console.log('Self-Management:');
80
+ console.log(' self update Update to latest version');
81
+ console.log(' self version Show version information');
82
+ console.log(' self uninstall Uninstall LSH from system');
83
+ console.log(' self theme Manage themes');
84
+ console.log(' self zsh-import Import ZSH configs');
85
+ console.log('');
86
+ console.log('Library Services:');
87
+ console.log(' lib api API server management');
88
+ console.log(' lib daemon Daemon management');
89
+ console.log(' lib cron Cron job management');
90
+ console.log(' lib secrets Secrets management');
91
+ console.log(' lib supabase Supabase database management');
92
+ console.log('');
72
93
  console.log('Quick Start:');
73
94
  console.log(' lsh -i Start interactive shell');
74
- console.log(' lsh --help Show detailed help');
75
- console.log(' lsh self update Update to latest version');
76
- console.log('');
77
- console.log('For full documentation, run: lsh help');
95
+ console.log(' lsh --help Show all options');
96
+ console.log(' lsh help Show detailed help with examples');
78
97
  }
79
98
  }
80
99
  catch (error) {
@@ -144,7 +144,7 @@ export class SecretsManager {
144
144
  /**
145
145
  * Pull .env from Supabase
146
146
  */
147
- async pull(envFilePath = '.env', environment = 'dev') {
147
+ async pull(envFilePath = '.env', environment = 'dev', force = false) {
148
148
  logger.info(`Pulling ${environment} secrets from Supabase...`);
149
149
  // Get latest secrets
150
150
  const jobs = await this.persistence.getActiveJobs();
@@ -159,8 +159,8 @@ export class SecretsManager {
159
159
  throw new Error(`No encrypted data found for environment: ${environment}`);
160
160
  }
161
161
  const decrypted = this.decrypt(latestSecret.output);
162
- // Backup existing .env if it exists
163
- if (fs.existsSync(envFilePath)) {
162
+ // Backup existing .env if it exists (unless force is true)
163
+ if (fs.existsSync(envFilePath) && !force) {
164
164
  const backup = `${envFilePath}.backup.${Date.now()}`;
165
165
  fs.copyFileSync(envFilePath, backup);
166
166
  logger.info(`Backed up existing .env to ${backup}`);
@@ -32,10 +32,11 @@ export async function init_secrets(program) {
32
32
  .description('Pull .env from encrypted cloud storage')
33
33
  .option('-f, --file <path>', 'Path to .env file', '.env')
34
34
  .option('-e, --env <name>', 'Environment name (dev/staging/prod)', 'dev')
35
+ .option('--force', 'Overwrite without creating backup')
35
36
  .action(async (options) => {
36
37
  try {
37
38
  const manager = new SecretsManager();
38
- await manager.pull(options.file, options.env);
39
+ await manager.pull(options.file, options.env, options.force);
39
40
  }
40
41
  catch (error) {
41
42
  console.error('❌ Failed to pull secrets:', error.message);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lsh-framework",
3
- "version": "0.5.11",
3
+ "version": "0.5.13",
4
4
  "description": "A powerful, extensible shell with advanced job management, database persistence, and modern CLI features",
5
5
  "main": "dist/app.js",
6
6
  "bin": {