@lenne.tech/cli 0.0.124 → 1.0.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 (30) hide show
  1. package/bin/lt +145 -14
  2. package/build/commands/claude/claude.js +25 -0
  3. package/build/commands/claude/install-skills.js +622 -0
  4. package/build/commands/config/config.js +25 -0
  5. package/build/commands/config/help.js +167 -0
  6. package/build/commands/config/init.js +143 -0
  7. package/build/commands/config/show.js +68 -0
  8. package/build/commands/fullstack/init.js +38 -16
  9. package/build/commands/server/add-property.js +199 -36
  10. package/build/commands/server/create.js +66 -4
  11. package/build/commands/server/module.js +150 -27
  12. package/build/commands/server/object.js +38 -22
  13. package/build/extensions/config.js +157 -0
  14. package/build/extensions/parse-properties.js +119 -0
  15. package/build/extensions/server.js +82 -47
  16. package/build/interfaces/lt-config.interface.js +3 -0
  17. package/build/templates/claude-skills/lt-cli/SKILL.md +272 -0
  18. package/build/templates/claude-skills/lt-cli/examples.md +542 -0
  19. package/build/templates/claude-skills/lt-cli/reference.md +506 -0
  20. package/build/templates/claude-skills/nest-server-generator/SKILL.md +2833 -0
  21. package/build/templates/claude-skills/nest-server-generator/examples.md +760 -0
  22. package/build/templates/claude-skills/nest-server-generator/reference.md +417 -0
  23. package/build/templates/nest-server-module/inputs/template-create.input.ts.ejs +1 -3
  24. package/build/templates/nest-server-module/inputs/template.input.ts.ejs +1 -1
  25. package/build/templates/nest-server-module/template.controller.ts.ejs +24 -13
  26. package/build/templates/nest-server-module/template.model.ts.ejs +2 -2
  27. package/build/templates/nest-server-module/template.module.ts.ejs +4 -0
  28. package/build/templates/nest-server-module/template.service.ts.ejs +6 -6
  29. package/build/templates/nest-server-object/template.object.ts.ejs +2 -2
  30. package/package.json +13 -11
@@ -0,0 +1,272 @@
1
+ ---
2
+ name: lt-cli
3
+ version: 1.0.0
4
+ description: Expert assistance with lenne.tech CLI for Git operations and Fullstack initialization. IMPORTANT - For ALL NestJS server development (modules, objects, properties), use the nest-server-generator skill instead, even for simple tasks. This skill handles only lt git commands and lt fullstack init.
5
+ ---
6
+
7
+ # LT CLI Expert - Git & Fullstack
8
+
9
+ You are an expert in the lenne.tech CLI tool. This skill handles **Git operations and Fullstack initialization ONLY**.
10
+
11
+ **⚠️ CRITICAL:** For NestJS server development (modules, objects, properties), ALWAYS use the `nest-server-generator` skill instead.
12
+
13
+ ## ⚠️ When to Use Which Skill
14
+
15
+ ### Use the `nest-server-generator` skill for:
16
+ - ✅ Creating server modules (`lt server module`)
17
+ - ✅ Creating server objects (`lt server object`)
18
+ - ✅ Adding properties (`lt server addProp`)
19
+ - ✅ Creating a new server (`lt server create`)
20
+ - ✅ ANY NestJS/nest-server development task
21
+ - ✅ Even simple tasks like adding a single property
22
+ - ✅ Even simple tasks like creating a single module
23
+
24
+ ### Use this `lt-cli` skill ONLY for:
25
+ - ✅ Git commands (`lt git get`, `lt git reset`, etc.)
26
+ - ✅ Fullstack commands (`lt fullstack init`)
27
+ - ✅ General CLI questions (not about server development)
28
+
29
+ ### Example scenarios:
30
+ - "Create a User module with email and username" → Use **nest-server-generator** skill ✅
31
+ - "Add a new property to the User module" → Use **nest-server-generator** skill ✅
32
+ - "Checkout branch DEV-123" → Use this skill (lt-cli) ✅
33
+ - "Initialize a fullstack project" → Use this skill (lt-cli) ✅
34
+
35
+ **If the user mentions ANYTHING about NestJS server, modules, objects, properties, or models:**
36
+ → **IMMEDIATELY recommend or use the nest-server-generator skill instead**
37
+
38
+ ---
39
+
40
+ ## Available Commands
41
+
42
+ ### 1. Git Operations
43
+
44
+ #### Get Branch
45
+ **Command**: `lt git get <branch-name>` (alias: `lt git g`)
46
+
47
+ Checks out a branch, creating it if it doesn't exist.
48
+
49
+ **Non-interactive syntax**:
50
+ ```bash
51
+ lt git get <branch-name>
52
+ ```
53
+
54
+ **Examples**:
55
+ ```bash
56
+ # Checkout existing or create new branch
57
+ lt git get DEV-123
58
+
59
+ # Using alias
60
+ lt git g feature/new-feature
61
+ ```
62
+
63
+ **What it does**:
64
+ 1. Checks if branch exists locally
65
+ 2. If not, checks if it exists on remote
66
+ 3. If remote exists, checks out and tracks remote branch
67
+ 4. If neither exists, creates new branch from current branch
68
+ 5. Switches to the branch
69
+
70
+ #### Reset to Remote
71
+ **Command**: `lt git reset`
72
+
73
+ Resets current branch to match remote (discards local changes).
74
+
75
+ **Interactive**: Prompts for confirmation before resetting.
76
+
77
+ **What it does**:
78
+ 1. Fetches latest from remote
79
+ 2. Resets current branch to origin/<branch>
80
+ 3. Discards all local changes and commits
81
+
82
+ **⚠️ WARNING**: This is destructive! All local changes will be lost.
83
+
84
+ ### 2. Fullstack Initialization
85
+
86
+ #### Initialize Fullstack Workspace
87
+ **Command**: `lt fullstack init` (alias: `lt full init`)
88
+
89
+ Creates complete fullstack workspace with frontend and backend.
90
+
91
+ **Interactive mode**:
92
+ - Prompts for workspace name
93
+ - Prompts for frontend framework (Angular or Nuxt)
94
+ - Prompts for git initialization
95
+ - Prompts for git repository URL (if git enabled)
96
+
97
+ **Non-interactive syntax**:
98
+ ```bash
99
+ lt fullstack init --name <WorkspaceName> --frontend <angular|nuxt> --git <true|false> [--git-link <GitURL>]
100
+ ```
101
+
102
+ **Parameters**:
103
+ - `--name` - Workspace/project name (PascalCase recommended)
104
+ - `--frontend` - Frontend framework: `angular` or `nuxt`
105
+ - `--git` - Initialize git repository: `true` or `false`
106
+ - `--git-link` - Git repository URL (optional, only if `--git true`)
107
+
108
+ **Examples**:
109
+ ```bash
110
+ # With git and repository
111
+ lt fullstack init --name MyApp --frontend angular --git true --git-link https://github.com/user/myapp.git
112
+
113
+ # Without git
114
+ lt fullstack init --name MyApp --frontend nuxt --git false
115
+
116
+ # Using alias
117
+ lt full init --name MyProject --frontend angular --git true
118
+ ```
119
+
120
+ **What gets created**:
121
+ ```
122
+ <workspace-name>/
123
+ frontend/ # Angular or Nuxt application
124
+ projects/
125
+ api/ # NestJS backend (@lenne.tech/nest-server)
126
+ package.json # Root workspace configuration
127
+ .gitignore # (if git enabled)
128
+ .git/ # (if git enabled)
129
+ ```
130
+
131
+ **Post-creation steps**:
132
+ 1. `cd <workspace-name>`
133
+ 2. Install dependencies: `npm install`
134
+ 3. Start backend: `cd projects/api && npm start`
135
+ 4. Start frontend: `cd frontend && npm start`
136
+
137
+ ---
138
+
139
+ ## ⚠️ How to Redirect to nest-server-generator
140
+
141
+ When you detect ANY NestJS server task, immediately inform the user:
142
+
143
+ **Template response**:
144
+ ```
145
+ For NestJS server development tasks, please use the **nest-server-generator skill** instead.
146
+
147
+ This skill is specifically designed for all NestJS/nest-server work, including:
148
+ - Creating modules, objects, or properties
149
+ - Modifying existing server code
150
+ - Generating complete server structures
151
+
152
+ You can install it with:
153
+ ```bash
154
+ lt claude install-skills nest-server-generator
155
+ ```
156
+
157
+ Or install all skills:
158
+ ```bash
159
+ lt claude install-skills
160
+ ```
161
+
162
+ Then I can help you with your NestJS server task using the nest-server-generator skill.
163
+ ```
164
+
165
+ ---
166
+
167
+ ## Best Practices
168
+
169
+ ### Git Operations
170
+ 1. **Always commit changes before `lt git reset`** - It's destructive!
171
+ 2. **Use meaningful branch names** - Follow your team's conventions (e.g., `DEV-123`, `feature/xyz`)
172
+ 3. **Check status first** - Run `git status` before reset operations
173
+
174
+ ### Fullstack Init
175
+ 1. **Plan your architecture** - Know which frontend framework you need
176
+ 2. **Set up git early** - Use `--git true` from the start
177
+ 3. **Follow naming conventions** - Use PascalCase for workspace names
178
+ 4. **Read the generated README** - Each project has specific setup instructions
179
+
180
+ ---
181
+
182
+ ## Troubleshooting
183
+
184
+ ### Git Reset Not Working
185
+ **Symptom**: Reset command fails or doesn't reset properly
186
+ **Cause**: Remote branch doesn't exist or network issues
187
+ **Solution**:
188
+ - Check if remote branch exists: `git branch -r`
189
+ - Ensure you're connected to remote: `git remote -v`
190
+ - Fetch first: `git fetch origin`
191
+
192
+ ### Fullstack Init Fails
193
+ **Symptom**: Installation errors during `lt fullstack init`
194
+ **Cause**: Network issues, missing dependencies, or permissions
195
+ **Solution**:
196
+ - Check internet connection
197
+ - Ensure Node.js is installed: `node --version`
198
+ - Check npm permissions
199
+ - Try with sudo if permission errors persist
200
+
201
+ ### Branch Already Exists
202
+ **Symptom**: `lt git get` says branch exists but can't switch
203
+ **Cause**: Uncommitted changes in working directory
204
+ **Solution**: Commit, stash, or discard changes first:
205
+ ```bash
206
+ git stash # Save changes temporarily
207
+ lt git get <branch>
208
+ git stash pop # Restore changes
209
+ ```
210
+
211
+ ---
212
+
213
+ ## Working with This Skill
214
+
215
+ When helping users:
216
+
217
+ 1. **Clarify intent**: Is this a git operation or fullstack setup?
218
+ 2. **Redirect server tasks**: Immediately suggest nest-server-generator for any NestJS work
219
+ 3. **Provide complete commands**: Include all necessary flags
220
+ 4. **Warn about destructive operations**: Always warn before `lt git reset`
221
+ 5. **Explain side effects**: Describe what will happen
222
+
223
+ ### Example Response Pattern
224
+
225
+ **User**: "Switch to branch DEV-456"
226
+
227
+ **Your response**:
228
+ ```bash
229
+ # Switch to branch DEV-456 (creates if it doesn't exist)
230
+ lt git get DEV-456
231
+
232
+ # This will:
233
+ # ✓ Check if DEV-456 exists locally
234
+ # ✓ If not, check remote
235
+ # ✓ If remote exists, checkout and track
236
+ # ✓ If neither exists, create new branch
237
+ # ✓ Switch to the branch
238
+ ```
239
+
240
+ **User**: "Create a User module"
241
+
242
+ **Your response**:
243
+ ```
244
+ For creating NestJS modules, please use the **nest-server-generator skill** instead.
245
+
246
+ That skill is specifically designed for all NestJS/nest-server development tasks.
247
+
248
+ Install it with:
249
+ ```bash
250
+ lt claude install-skills nest-server-generator
251
+ ```
252
+
253
+ Then I can help you create the User module with all necessary files and configurations.
254
+ ```
255
+
256
+ ---
257
+
258
+ ## Important Notes
259
+
260
+ - **CLI works from anywhere** in your project directory
261
+ - **Automatically finds** the nearest git repository for git commands
262
+ - **Creates missing directories** for fullstack init
263
+ - **Validates inputs** before executing destructive operations
264
+ - **Always use nest-server-generator** for NestJS server development
265
+
266
+ ---
267
+
268
+ ## Command Reference
269
+
270
+ For detailed command syntax and all available options, see [reference.md](reference.md).
271
+
272
+ For NestJS server commands (`lt server module`, `lt server object`, etc.), use the **nest-server-generator skill**.