lsh-framework 1.1.0 → 1.2.1

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 (73) hide show
  1. package/README.md +70 -4
  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/job-manager.js +2 -1
  19. package/dist/lib/platform-utils.js +211 -0
  20. package/dist/lib/secrets-manager.js +11 -1
  21. package/dist/lib/string-utils.js +128 -0
  22. package/dist/services/daemon/daemon-registrar.js +3 -2
  23. package/dist/services/secrets/secrets.js +154 -30
  24. package/package.json +10 -74
  25. package/dist/app.js +0 -33
  26. package/dist/cicd/analytics.js +0 -261
  27. package/dist/cicd/auth.js +0 -269
  28. package/dist/cicd/cache-manager.js +0 -172
  29. package/dist/cicd/data-retention.js +0 -305
  30. package/dist/cicd/performance-monitor.js +0 -224
  31. package/dist/cicd/webhook-receiver.js +0 -640
  32. package/dist/commands/api.js +0 -346
  33. package/dist/commands/theme.js +0 -261
  34. package/dist/commands/zsh-import.js +0 -240
  35. package/dist/components/App.js +0 -1
  36. package/dist/components/Divider.js +0 -29
  37. package/dist/components/REPL.js +0 -43
  38. package/dist/components/Terminal.js +0 -232
  39. package/dist/components/UserInput.js +0 -30
  40. package/dist/daemon/api-server.js +0 -316
  41. package/dist/daemon/monitoring-api.js +0 -220
  42. package/dist/lib/api-error-handler.js +0 -185
  43. package/dist/lib/associative-arrays.js +0 -285
  44. package/dist/lib/base-api-server.js +0 -290
  45. package/dist/lib/brace-expansion.js +0 -160
  46. package/dist/lib/builtin-commands.js +0 -439
  47. package/dist/lib/executors/builtin-executor.js +0 -52
  48. package/dist/lib/extended-globbing.js +0 -411
  49. package/dist/lib/extended-parameter-expansion.js +0 -227
  50. package/dist/lib/interactive-shell.js +0 -460
  51. package/dist/lib/job-builtins.js +0 -582
  52. package/dist/lib/pathname-expansion.js +0 -216
  53. package/dist/lib/script-runner.js +0 -226
  54. package/dist/lib/shell-executor.js +0 -2504
  55. package/dist/lib/shell-parser.js +0 -958
  56. package/dist/lib/shell-types.js +0 -6
  57. package/dist/lib/shell.lib.js +0 -40
  58. package/dist/lib/theme-manager.js +0 -476
  59. package/dist/lib/variable-expansion.js +0 -385
  60. package/dist/lib/zsh-compatibility.js +0 -659
  61. package/dist/lib/zsh-import-manager.js +0 -707
  62. package/dist/lib/zsh-options.js +0 -328
  63. package/dist/pipeline/job-tracker.js +0 -491
  64. package/dist/pipeline/mcli-bridge.js +0 -309
  65. package/dist/pipeline/pipeline-service.js +0 -1119
  66. package/dist/pipeline/workflow-engine.js +0 -870
  67. package/dist/services/api/api.js +0 -58
  68. package/dist/services/api/auth.js +0 -35
  69. package/dist/services/api/config.js +0 -7
  70. package/dist/services/api/file.js +0 -22
  71. package/dist/services/shell/shell.js +0 -28
  72. package/dist/services/zapier.js +0 -16
  73. package/dist/simple-api-server.js +0 -148
package/README.md CHANGED
@@ -104,6 +104,34 @@ lsh sync # Stored as: app1_dev
104
104
 
105
105
  cd ~/repos/app2
106
106
  lsh sync # Stored as: app2_dev (separate!)
107
+
108
+ # See what's tracked in the current directory
109
+ lsh info
110
+ ```
111
+
112
+ **Example `lsh info` output:**
113
+ ```
114
+ 📍 Current Directory Context
115
+
116
+ 📁 Git Repository:
117
+ Name: myapp
118
+ Branch: main
119
+
120
+ 🔐 Environment Tracking:
121
+ Base environment: dev
122
+ Cloud storage name: myapp_dev
123
+ Namespace: myapp
124
+ â„šī¸ Repo-based isolation enabled
125
+
126
+ 📄 Local .env File:
127
+ Keys: 12
128
+ Has encryption key: ✅
129
+
130
+ â˜ī¸ Cloud Storage:
131
+ Environment: myapp_dev
132
+ Keys stored: 12
133
+ Last updated: 11/6/2025, 10:15:23 PM
134
+ Key matches: ✅
107
135
  ```
108
136
 
109
137
  No more conflicts between projects using the same environment names!
@@ -211,6 +239,43 @@ lsh set DATABASE_URL postgres://localhost/db
211
239
  - ✅ Validates key names
212
240
  - ✅ Shows summary of changes
213
241
 
242
+ ### 🔄 Multi-Format Export
243
+
244
+ **New in v1.2.1:** Export secrets in multiple formats for easy integration with other tools!
245
+
246
+ ```bash
247
+ # JSON format (perfect for APIs and config files)
248
+ lsh list --format json
249
+
250
+ # YAML format (for Docker Compose, Kubernetes, etc.)
251
+ lsh list --format yaml
252
+
253
+ # TOML format (auto-detects namespaces!)
254
+ lsh list --format toml
255
+
256
+ # Shell export format (for sourcing in scripts)
257
+ lsh list --format export
258
+ eval "$(lsh list --format export)"
259
+
260
+ # Works with get command too
261
+ lsh get --all --format yaml > config.yaml
262
+
263
+ # And with env command for cloud secrets
264
+ lsh env prod --format json
265
+ ```
266
+
267
+ **Supported Formats:**
268
+ - ✅ `env` - Standard KEY=value format (default, masked)
269
+ - ✅ `json` - JSON object format
270
+ - ✅ `yaml` - YAML format
271
+ - ✅ `toml` - TOML with smart namespace detection
272
+ - ✅ `export` - Shell export statements
273
+
274
+ **Smart Features:**
275
+ - Auto-detects namespaces in TOML (e.g., `DATABASE_*` → `[database]`)
276
+ - Auto-disables masking for structured formats (JSON/YAML/TOML)
277
+ - Use `--no-mask` to show full values in any format
278
+
214
279
  ## Secrets Commands
215
280
 
216
281
  | Command | Description |
@@ -223,7 +288,8 @@ lsh set DATABASE_URL postgres://localhost/db
223
288
  | `lsh create` | Create new .env file |
224
289
  | `lsh delete` | Delete .env file (with confirmation) |
225
290
  | `lsh sync` | Smart sync (auto-setup and sync) |
226
- | `lsh status` | Get detailed secrets status |
291
+ | `lsh status` | Get detailed secrets status (JSON) |
292
+ | `lsh info` | Show current context and tracked environment |
227
293
  | `lsh get <key>` | Get a specific secret value |
228
294
  | `lsh set <key> <value>` | Set a single secret value |
229
295
  | `printenv \| lsh set` | Batch upsert from stdin (pipe) |
@@ -241,7 +307,7 @@ See the complete guide: [SECRETS_GUIDE.md](docs/features/secrets/SECRETS_GUIDE.m
241
307
  ### Install from npm
242
308
 
243
309
  ```bash
244
- npm install -g gwicho38-lsh
310
+ npm install -g lsh-framework
245
311
  ```
246
312
 
247
313
  ### Verify installation
@@ -456,7 +522,7 @@ echo "API keys rotated at $(date)" | mail -s "Key Rotation" team@company.com
456
522
  EOF
457
523
 
458
524
  # Schedule it
459
- lsh lib cron add --name "rotate-keys" \
525
+ lsh cron add --name "rotate-keys" \
460
526
  --schedule "0 0 1 * *" \
461
527
  --command "./rotate-keys.sh"
462
528
  ```
@@ -634,7 +700,7 @@ ps aux | grep lshd
634
700
  rm /tmp/lsh-job-daemon-$USER.pid
635
701
 
636
702
  # Restart
637
- lsh lib daemon start
703
+ lsh daemon start
638
704
  ```
639
705
 
640
706
  ## Documentation