@lenne.tech/cli 1.5.0 → 1.6.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 +30 -0
  2. package/bin/postinstall.js +156 -0
  3. package/build/cli.js +11 -1
  4. package/build/commands/blocks/add.js +28 -306
  5. package/build/commands/blocks/blocks.js +2 -2
  6. package/build/commands/claude/claude.js +2 -2
  7. package/build/commands/cli/cli.js +2 -2
  8. package/build/commands/cli/create.js +69 -21
  9. package/build/commands/cli/rename.js +11 -5
  10. package/build/commands/completion.js +311 -0
  11. package/build/commands/components/add.js +25 -219
  12. package/build/commands/components/components.js +2 -2
  13. package/build/commands/config/help.js +5 -2
  14. package/build/commands/config/init.js +20 -5
  15. package/build/commands/config/show.js +4 -1
  16. package/build/commands/config/validate.js +27 -2
  17. package/build/commands/deployment/create.js +18 -5
  18. package/build/commands/deployment/deployment.js +2 -2
  19. package/build/commands/docs/open.js +4 -1
  20. package/build/commands/doctor.js +285 -0
  21. package/build/commands/frontend/angular.js +88 -28
  22. package/build/commands/frontend/nuxt.js +2 -1
  23. package/build/commands/fullstack/init.js +58 -19
  24. package/build/commands/git/clean.js +60 -11
  25. package/build/commands/git/clear.js +17 -11
  26. package/build/commands/git/create.js +51 -10
  27. package/build/commands/git/force-pull.js +42 -15
  28. package/build/commands/git/get.js +14 -15
  29. package/build/commands/git/install-scripts.js +6 -6
  30. package/build/commands/git/rebase.js +40 -12
  31. package/build/commands/git/rename.js +33 -13
  32. package/build/commands/git/reset.js +48 -13
  33. package/build/commands/git/squash.js +67 -26
  34. package/build/commands/git/undo.js +33 -13
  35. package/build/commands/git/update.js +59 -6
  36. package/build/commands/history.js +75 -0
  37. package/build/commands/mongodb/collection-export.js +2 -2
  38. package/build/commands/mongodb/mongodb.js +2 -2
  39. package/build/commands/mongodb/s3-restore.js +2 -2
  40. package/build/commands/npm/reinit.js +11 -12
  41. package/build/commands/npm/update.js +6 -2
  42. package/build/commands/qdrant/delete.js +6 -2
  43. package/build/commands/qdrant/qdrant.js +2 -2
  44. package/build/commands/qdrant/stats.js +5 -2
  45. package/build/commands/redis/redis.js +2 -2
  46. package/build/commands/server/add-property.js +8 -12
  47. package/build/commands/server/create-secret.js +6 -3
  48. package/build/commands/server/create.js +39 -21
  49. package/build/commands/server/module.js +22 -16
  50. package/build/commands/server/object.js +7 -11
  51. package/build/commands/server/set-secrets.js +6 -3
  52. package/build/commands/server/test.js +3 -3
  53. package/build/commands/starter/chrome-extension.js +3 -3
  54. package/build/commands/status.js +198 -0
  55. package/build/commands/templates/list.js +107 -0
  56. package/build/commands/templates/llm.js +8 -3
  57. package/build/commands/templates/templates.js +2 -2
  58. package/build/commands/tools/jwt-read.js +2 -2
  59. package/build/commands/tools/regex.js +5 -2
  60. package/build/commands/typescript/create.js +84 -21
  61. package/build/commands/typescript/playground.js +5 -2
  62. package/build/extensions/config.js +37 -1
  63. package/build/extensions/git.js +57 -2
  64. package/build/extensions/history.js +118 -0
  65. package/build/extensions/logger.js +189 -0
  66. package/build/lib/nuxt-base-components.js +249 -0
  67. package/build/lib/validation.js +204 -0
  68. package/build/templates/completion/bash.sh.ejs +92 -0
  69. package/build/templates/completion/fish.sh.ejs +77 -0
  70. package/build/templates/completion/zsh.sh.ejs +119 -0
  71. package/docs/commands.md +464 -14
  72. package/docs/lt.config.md +138 -8
  73. package/package.json +16 -14
package/docs/lt.config.md CHANGED
@@ -75,7 +75,10 @@ When running `lt server module` in `/home/user/projects/my-monorepo/projects/api
75
75
  interface LtConfig {
76
76
  defaults?: DefaultsConfig; // Global defaults for multiple commands
77
77
  commands?: {
78
+ blocks?: BlocksConfig;
78
79
  cli?: CliConfig;
80
+ components?: ComponentsConfig;
81
+ config?: ConfigConfig;
79
82
  deployment?: DeploymentConfig;
80
83
  fullstack?: FullstackConfig;
81
84
  git?: GitConfig;
@@ -96,7 +99,8 @@ The `defaults` section contains settings that apply across multiple commands. Th
96
99
  | `defaults.baseBranch` | `string` | - | git/create, git/squash, git/rebase |
97
100
  | `defaults.controller` | `'Rest'` \| `'GraphQL'` \| `'Both'` \| `'auto'` | `'Both'` | server/module, server/create |
98
101
  | `defaults.domain` | `string` | - | deployment/create (use `{name}` as placeholder) |
99
- | `defaults.noConfirm` | `boolean` | `false` | git/get, git/squash, git/create, git/clear, git/force-pull, git/rebase, git/rename, git/reset, git/undo, npm/reinit |
102
+ | `defaults.noConfirm` | `boolean` | `false` | blocks/add, components/add, config/init, git/*, server/create, server/module, npm/reinit, cli/create, typescript/create, fullstack/init, deployment/create, frontend/angular |
103
+ | `defaults.skipInstall` | `boolean` | `false` | git/update |
100
104
  | `defaults.skipLint` | `boolean` | `false` | server/module, server/object, server/addProp |
101
105
 
102
106
  **Example:**
@@ -108,6 +112,7 @@ The `defaults` section contains settings that apply across multiple commands. Th
108
112
  "controller": "Both",
109
113
  "domain": "{name}.lenne.tech",
110
114
  "noConfirm": false,
115
+ "skipInstall": false,
111
116
  "skipLint": false
112
117
  }
113
118
  }
@@ -121,6 +126,7 @@ defaults:
121
126
  controller: Both
122
127
  domain: "{name}.lenne.tech"
123
128
  noConfirm: false
129
+ skipInstall: false
124
130
  skipLint: false
125
131
  ```
126
132
 
@@ -149,6 +155,96 @@ Global defaults provide a convenient way to set organization-wide preferences. C
149
155
 
150
156
  ## Commands Reference
151
157
 
158
+ ### Blocks Commands
159
+
160
+ #### `lt blocks add`
161
+
162
+ Adds code blocks from the lenne.tech component library.
163
+
164
+ | Field | Type | Default | Description |
165
+ |-------|------|---------|-------------|
166
+ | `commands.blocks.add.noConfirm` | `boolean` | `false` | Skip confirmation prompts (auto-install dependencies) |
167
+
168
+ **Example:**
169
+ ```json
170
+ {
171
+ "commands": {
172
+ "blocks": {
173
+ "add": {
174
+ "noConfirm": true
175
+ }
176
+ }
177
+ }
178
+ }
179
+ ```
180
+
181
+ **CLI Override:**
182
+ ```bash
183
+ lt blocks add MyBlock --noConfirm
184
+ ```
185
+
186
+ ---
187
+
188
+ ### Components Commands
189
+
190
+ #### `lt components add`
191
+
192
+ Adds components from the lenne.tech component library.
193
+
194
+ | Field | Type | Default | Description |
195
+ |-------|------|---------|-------------|
196
+ | `commands.components.add.noConfirm` | `boolean` | `false` | Skip confirmation prompts (auto-install dependencies) |
197
+
198
+ **Example:**
199
+ ```json
200
+ {
201
+ "commands": {
202
+ "components": {
203
+ "add": {
204
+ "noConfirm": true
205
+ }
206
+ }
207
+ }
208
+ }
209
+ ```
210
+
211
+ **CLI Override:**
212
+ ```bash
213
+ lt components add MyComponent --noConfirm
214
+ ```
215
+
216
+ ---
217
+
218
+ ### Config Commands
219
+
220
+ #### `lt config init`
221
+
222
+ Initializes a new lt.config file.
223
+
224
+ | Field | Type | Default | Description |
225
+ |-------|------|---------|-------------|
226
+ | `commands.config.init.noConfirm` | `boolean` | `false` | Skip confirmation prompts (overwrite existing config) |
227
+
228
+ **Example:**
229
+ ```json
230
+ {
231
+ "commands": {
232
+ "config": {
233
+ "init": {
234
+ "noConfirm": true
235
+ }
236
+ }
237
+ }
238
+ }
239
+ ```
240
+
241
+ **CLI Override:**
242
+ ```bash
243
+ lt config init --noConfirm
244
+ ```
245
+
246
+ ---
247
+
152
248
  ### CLI Commands
153
249
 
154
250
  #### `lt cli create`
@@ -263,10 +359,11 @@ Creates a new server project.
263
359
 
264
360
  | Field | Type | Default | Description |
265
361
  |-------|------|---------|-------------|
266
- | `commands.server.create.controller` | `'Rest'` \| `'GraphQL'` \| `'Both'` \| `'auto'` | `'Both'` | Default controller type for new projects |
267
- | `commands.server.create.git` | `boolean` | - | Initialize git repository |
268
362
  | `commands.server.create.author` | `string` | - | Default author for new projects |
363
+ | `commands.server.create.controller` | `'Rest'` \| `'GraphQL'` \| `'Both'` \| `'auto'` | `'Both'` | Default controller type for new projects |
269
364
  | `commands.server.create.description` | `string` | - | Default description (use `{name}` as placeholder) |
365
+ | `commands.server.create.git` | `boolean` | - | Initialize git repository |
366
+ | `commands.server.create.noConfirm` | `boolean` | `false` | Skip confirmation prompts |
270
367
 
271
368
  **Example:**
272
369
  ```json
@@ -367,18 +464,21 @@ Creates a new branch.
367
464
 
368
465
  | Field | Type | Default | Description |
369
466
  |-------|------|---------|-------------|
370
- | `commands.git.defaultBranch` | `string` | `'main'` | Default branch name |
371
- | `commands.git.baseBranch` | `string` | - | Default base branch for new feature branches |
372
- | `commands.git.noConfirm` | `boolean` | `false` | Skip confirmation prompts (global) |
467
+ | `commands.git.create.base` | `string` | - | Default base branch for new branches (command-specific) |
468
+ | `commands.git.create.noConfirm` | `boolean` | `false` | Skip confirmation prompts |
469
+ | `commands.git.baseBranch` | `string` | - | Default base branch (category-level fallback) |
470
+ | `commands.git.noConfirm` | `boolean` | `false` | Skip confirmation prompts (category-level) |
373
471
 
374
472
  **Example:**
375
473
  ```json
376
474
  {
377
475
  "commands": {
378
476
  "git": {
379
- "defaultBranch": "develop",
380
477
  "baseBranch": "develop",
381
- "noConfirm": false
478
+ "create": {
479
+ "base": "develop",
480
+ "noConfirm": false
481
+ }
382
482
  }
383
483
  }
384
484
  }
@@ -623,6 +723,34 @@ lt git rename new-name --noConfirm
623
723
 
624
724
  ---
625
725
 
726
+ #### `lt git update`
727
+
728
+ Updates current branch (fetch + pull + npm install).
729
+
730
+ | Field | Type | Default | Description |
731
+ |-------|------|---------|-------------|
732
+ | `commands.git.update.skipInstall` | `boolean` | `false` | Skip npm install after update |
733
+
734
+ **Example:**
735
+ ```json
736
+ {
737
+ "commands": {
738
+ "git": {
739
+ "update": {
740
+ "skipInstall": true
741
+ }
742
+ }
743
+ }
744
+ }
745
+ ```
746
+
747
+ **CLI Override:**
748
+ ```bash
749
+ lt git update --skipInstall
750
+ ```
751
+
752
+ ---
753
+
626
754
  ### NPM Commands
627
755
 
628
756
  #### `lt npm reinit`
@@ -685,6 +813,7 @@ The `meta` section stores project information.
685
813
  "controller": "Both",
686
814
  "domain": "{name}.lenne.tech",
687
815
  "noConfirm": false,
816
+ "skipInstall": false,
688
817
  "skipLint": false
689
818
  },
690
819
  "commands": {
@@ -731,6 +860,7 @@ defaults:
731
860
  controller: Both
732
861
  domain: "{name}.lenne.tech"
733
862
  noConfirm: false
863
+ skipInstall: false
734
864
  skipLint: false
735
865
 
736
866
  commands:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lenne.tech/cli",
3
- "version": "1.5.0",
3
+ "version": "1.6.1",
4
4
  "description": "lenne.Tech CLI: lt",
5
5
  "keywords": [
6
6
  "lenne.Tech",
@@ -8,7 +8,7 @@
8
8
  "lt"
9
9
  ],
10
10
  "author": "Kai Haase",
11
- "homepage": "http://lenne.tech",
11
+ "homepage": "https://lenne.tech",
12
12
  "license": "MIT",
13
13
  "repository": "https://github.com/lenneTech/cli.git",
14
14
  "bugs": {
@@ -18,6 +18,7 @@
18
18
  "lt": "bin/lt"
19
19
  },
20
20
  "scripts": {
21
+ "postinstall": "node bin/postinstall.js 2>/dev/null || true",
21
22
  "build": "npm run lint && npm run test && npm run clean-build && npm run compile && npm run copy-templates",
22
23
  "clean-build": "npx rimraf ./build",
23
24
  "compile": "tsc -p .",
@@ -49,17 +50,17 @@
49
50
  "bin"
50
51
  ],
51
52
  "dependencies": {
52
- "@aws-sdk/client-s3": "3.926.0",
53
+ "@aws-sdk/client-s3": "3.954.0",
53
54
  "@lenne.tech/cli-plugin-helper": "0.0.14",
54
- "@types/lodash": "4.17.20",
55
+ "@types/lodash": "4.17.21",
55
56
  "bcrypt": "6.0.0",
56
57
  "find-file-up": "2.0.1",
57
- "glob": "11.1.0",
58
- "gluegun": "5.2.0",
58
+ "glob": "13.0.0",
59
+ "gluegun": "5.2.2",
59
60
  "js-sha256": "0.11.1",
60
61
  "js-yaml": "4.1.1",
61
62
  "lodash": "4.17.21",
62
- "open": "10.2.0",
63
+ "open": "11.0.0",
63
64
  "ts-morph": "27.0.2",
64
65
  "ts-node": "10.9.2",
65
66
  "typescript": "5.9.3"
@@ -67,21 +68,22 @@
67
68
  "devDependencies": {
68
69
  "@lenne.tech/eslint-config-ts": "2.1.4",
69
70
  "@lenne.tech/npm-package-helper": "0.0.12",
71
+ "@types/ejs": "^3.1.5",
70
72
  "@types/jest": "30.0.0",
71
73
  "@types/js-yaml": "4.0.9",
72
- "@types/node": "24.10.0",
73
- "@typescript-eslint/eslint-plugin": "8.46.3",
74
- "@typescript-eslint/parser": "8.46.3",
75
- "eslint": "9.39.1",
74
+ "@types/node": "25.0.3",
75
+ "@typescript-eslint/eslint-plugin": "8.50.0",
76
+ "@typescript-eslint/parser": "8.50.0",
77
+ "eslint": "9.39.2",
76
78
  "eslint-config-prettier": "10.1.8",
77
79
  "husky": "9.1.7",
78
80
  "jest": "30.2.0",
79
81
  "path-exists-cli": "2.0.0",
80
- "prettier": "3.6.2",
82
+ "prettier": "3.7.4",
81
83
  "pretty-quick": "4.2.2",
82
- "rimraf": "6.1.0",
84
+ "rimraf": "6.1.2",
83
85
  "standard-version": "9.5.0",
84
- "ts-jest": "29.4.5"
86
+ "ts-jest": "29.4.6"
85
87
  },
86
88
  "overrides": {
87
89
  "apisauce@*": "3.1.1",