@lenne.tech/cli 0.0.125 → 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 (28) hide show
  1. package/bin/lt +145 -14
  2. package/build/commands/claude/install-skills.js +622 -0
  3. package/build/commands/config/config.js +25 -0
  4. package/build/commands/config/help.js +167 -0
  5. package/build/commands/config/init.js +143 -0
  6. package/build/commands/config/show.js +68 -0
  7. package/build/commands/server/add-property.js +163 -27
  8. package/build/commands/server/create.js +66 -4
  9. package/build/commands/server/module.js +133 -20
  10. package/build/commands/server/object.js +23 -15
  11. package/build/extensions/config.js +157 -0
  12. package/build/extensions/server.js +82 -47
  13. package/build/interfaces/lt-config.interface.js +3 -0
  14. package/build/templates/claude-skills/lt-cli/SKILL.md +190 -259
  15. package/build/templates/claude-skills/lt-cli/examples.md +433 -203
  16. package/build/templates/claude-skills/lt-cli/reference.md +400 -226
  17. package/build/templates/claude-skills/nest-server-generator/SKILL.md +2833 -0
  18. package/build/templates/claude-skills/nest-server-generator/examples.md +760 -0
  19. package/build/templates/claude-skills/nest-server-generator/reference.md +417 -0
  20. package/build/templates/nest-server-module/inputs/template-create.input.ts.ejs +1 -3
  21. package/build/templates/nest-server-module/inputs/template.input.ts.ejs +1 -1
  22. package/build/templates/nest-server-module/template.controller.ts.ejs +24 -13
  23. package/build/templates/nest-server-module/template.model.ts.ejs +2 -2
  24. package/build/templates/nest-server-module/template.module.ts.ejs +4 -0
  25. package/build/templates/nest-server-module/template.service.ts.ejs +6 -6
  26. package/build/templates/nest-server-object/template.object.ts.ejs +2 -2
  27. package/package.json +13 -11
  28. package/build/commands/claude/install-skill.js +0 -93
@@ -1,332 +1,506 @@
1
+ ---
2
+ name: lt-cli-reference
3
+ version: 1.0.0
4
+ description: Quick reference for Git operations and Fullstack initialization commands
5
+ ---
6
+
1
7
  # LT CLI Quick Reference
2
8
 
9
+ ⚠️ **Note**: For NestJS server command reference (modules, objects, properties), see the **nest-server-generator skill** instead.
10
+
11
+ This reference covers:
12
+ - Git operations (`lt git get`, `lt git reset`)
13
+ - Fullstack initialization (`lt fullstack init`)
14
+
15
+ ---
16
+
3
17
  ## Command Cheat Sheet
4
18
 
5
- ### Module Commands
19
+ ### Git Commands
20
+
21
+ #### Get Branch (Checkout/Create)
6
22
  ```bash
7
- # Interactive
8
- lt server module
9
- lt server m
23
+ # Interactive (prompts for branch name)
24
+ lt git get
25
+ lt git g
10
26
 
11
27
  # Non-interactive
12
- lt server module --name <Name> --controller <Rest|GraphQL|Both> [props]
28
+ lt git get <branch-name>
29
+ lt git g <branch-name>
13
30
  ```
14
31
 
15
- ### Add Property Commands
16
- ```bash
17
- # Interactive
18
- lt server addProp
19
- lt server ap
32
+ **Parameters:**
33
+ - `<branch-name>`: Branch name to checkout/create
20
34
 
21
- # Non-interactive
22
- lt server addProp --type <Module|Object> --element <name> [props]
35
+ **What it does:**
36
+ 1. Checks if branch exists locally switches to it
37
+ 2. If not local, checks remote → checks out and tracks
38
+ 3. If neither exists → creates new branch from current
39
+
40
+ **Examples:**
41
+ ```bash
42
+ lt git get DEV-123
43
+ lt git get feature/new-auth
44
+ lt git g main
23
45
  ```
24
46
 
25
- ### Object Commands
47
+ #### Reset to Remote
26
48
  ```bash
27
- # Interactive
28
- lt server object
29
- lt server o
49
+ # Interactive (prompts for confirmation)
50
+ lt git reset
30
51
 
31
- # Non-interactive
32
- lt server object --name <Name> [props] [--skipLint]
52
+ # Prompts: "Reset current branch to origin/<branch>? (y/N)"
33
53
  ```
34
54
 
55
+ **What it does:**
56
+ 1. Fetches latest from remote
57
+ 2. Resets current branch to `origin/<current-branch>`
58
+ 3. Discards ALL local changes and commits
59
+
60
+ **⚠️ WARNING**: Destructive operation - cannot be undone!
61
+
62
+ ---
63
+
35
64
  ### Fullstack Commands
65
+
66
+ #### Initialize Fullstack Workspace
36
67
  ```bash
37
- # Interactive
68
+ # Interactive (prompts for all options)
38
69
  lt fullstack init
39
70
  lt full init
40
71
 
41
72
  # Non-interactive
42
- lt fullstack init --name <Name> --frontend <angular|nuxt> --git <true|false> [--git-link <url>]
73
+ lt fullstack init \
74
+ --name <WorkspaceName> \
75
+ --frontend <angular|nuxt> \
76
+ --git <true|false> \
77
+ [--git-link <GitURL>]
43
78
  ```
44
79
 
45
- ---
80
+ **Required Parameters:**
81
+ - `--name`: Workspace/project name (PascalCase recommended)
82
+ - `--frontend`: Frontend framework (`angular` or `nuxt`)
83
+ - `--git`: Initialize git repository (`true` or `false`)
46
84
 
47
- ## Property Flag Reference
85
+ **Optional Parameters:**
86
+ - `--git-link`: Git repository URL (only when `--git true`)
48
87
 
49
- | Flag | Description | Example | Required |
50
- |------|-------------|---------|----------|
51
- | `--prop-name-X` | Property name | `--prop-name-0 title` | Yes |
52
- | `--prop-type-X` | Property type | `--prop-type-0 string` | No (default: string) |
53
- | `--prop-nullable-X` | Is optional | `--prop-nullable-0 true` | No (default: false) |
54
- | `--prop-array-X` | Is array | `--prop-array-0 true` | No (default: false) |
55
- | `--prop-enum-X` | Enum reference | `--prop-enum-0 StatusEnum` | No |
56
- | `--prop-schema-X` | Object reference | `--prop-schema-0 Address` | No |
57
- | `--prop-reference-X` | ObjectId reference | `--prop-reference-0 User` | Yes (with ObjectId) |
88
+ **Examples:**
89
+ ```bash
90
+ # With git and remote
91
+ lt fullstack init \
92
+ --name MyApp \
93
+ --frontend angular \
94
+ --git true \
95
+ --git-link https://github.com/user/myapp.git
96
+
97
+ # Without git
98
+ lt fullstack init \
99
+ --name TestProject \
100
+ --frontend nuxt \
101
+ --git false
102
+
103
+ # With git but no remote (add later)
104
+ lt fullstack init \
105
+ --name LocalProject \
106
+ --frontend angular \
107
+ --git true
108
+ ```
58
109
 
59
110
  ---
60
111
 
61
- ## Type Mapping
62
-
63
- ### Primitive Types
64
- | Type | TypeScript | MongoDB | Use Case |
65
- |------|-----------|---------|----------|
66
- | `string` | `string` | String | Text, names, descriptions |
67
- | `number` | `number` | Number | Integers, floats, counts |
68
- | `boolean` | `boolean` | Boolean | Flags, toggles |
69
- | `Date` | `Date` | Date | Timestamps, dates |
70
- | `bigint` | `bigint` | Long | Large integers |
71
-
72
- ### Special Types
73
- | Type | Model Type | Input Type | Notes |
74
- |------|-----------|-----------|--------|
75
- | `ObjectId` | `Reference` | `ReferenceInput` | Requires `--prop-reference-X` |
76
- | `Json` | `JSON` | `JSON` | Flexible metadata |
77
- | Custom Object | `<Name>` | `<Name>Input` | Requires `--prop-schema-X` |
78
- | Custom Enum | `<Name>Enum` | `<Name>Enum` | Requires `--prop-enum-X` |
112
+ ## Git Commands Reference
79
113
 
80
- ---
114
+ ### lt git get
115
+
116
+ **Syntax:**
117
+ ```bash
118
+ lt git get [branch-name]
119
+ ```
120
+
121
+ **Aliases:**
122
+ - `lt git g`
123
+
124
+ **Behavior:**
125
+
126
+ | Scenario | Action |
127
+ |----------|--------|
128
+ | Branch exists locally | Switches to branch |
129
+ | Branch exists on remote only | Checks out and tracks remote branch |
130
+ | Branch doesn't exist anywhere | Creates new branch from current |
131
+
132
+ **Common Usage:**
133
+ ```bash
134
+ # Start new feature
135
+ lt git get DEV-456 # Creates if doesn't exist
81
136
 
82
- ## Decorator Reference
137
+ # Switch to existing branch
138
+ lt git get main # Switches to main
83
139
 
84
- ### Model Decorators
85
- ```typescript
86
- @Prop() // MongoDB property
87
- @UnifiedField() // GraphQL + REST
88
- @Restricted(RoleEnum.XXX) // Access control
140
+ # Checkout teammate's branch
141
+ lt git get feature/auth # Checks out from remote if exists
142
+
143
+ # Short alias
144
+ lt git g DEV-789 # Same as "lt git get DEV-789"
89
145
  ```
90
146
 
91
- ### Input Decorators
92
- ```typescript
93
- @UnifiedField() // GraphQL + REST
94
- @IsOptional() // Validation
95
- @IsEmail() // Email validation
96
- @IsString() // String validation
147
+ **Equivalent Standard Git:**
148
+ ```bash
149
+ # lt git get DEV-123 does:
150
+ git checkout DEV-123 2>/dev/null || \
151
+ git checkout -b DEV-123 --track origin/DEV-123 2>/dev/null || \
152
+ git checkout -b DEV-123
97
153
  ```
98
154
 
99
155
  ---
100
156
 
101
- ## File Structure Reference
157
+ ### lt git reset
158
+
159
+ **Syntax:**
160
+ ```bash
161
+ lt git reset
162
+ ```
163
+
164
+ **No parameters accepted** - always operates on current branch.
102
165
 
103
- ### Module Structure
166
+ **Interactive Prompt:**
104
167
  ```
105
- src/server/modules/<module-name>/
106
- ├── <module-name>.model.ts # MongoDB schema
107
- ├── <module-name>.service.ts # Business logic
108
- ├── <module-name>.controller.ts # REST endpoints
109
- ├── <module-name>.resolver.ts # GraphQL resolver
110
- ├── <module-name>.module.ts # NestJS module
111
- ├── inputs/
112
- │ ├── <module-name>.input.ts # Update DTO
113
- │ └── <module-name>-create.input.ts # Create DTO
114
- └── outputs/
115
- └── find-and-count-<module-name>s-result.output.ts
168
+ Reset current branch to origin/<branch>?
169
+ This will discard all local changes. (y/N)
116
170
  ```
117
171
 
118
- ### Object Structure
172
+ **What Gets Discarded:**
173
+ - All uncommitted changes (staged and unstaged)
174
+ - All local commits not pushed to remote
175
+ - All untracked files (if any were added)
176
+
177
+ **When to Use:**
178
+ - Experimental work failed, want clean slate
179
+ - Merge conflicts too complex
180
+ - Accidentally committed to wrong branch
181
+ - Local branch corrupted
182
+
183
+ **When NOT to Use:**
184
+ - You want to keep any local changes
185
+ - You haven't pushed but commits are valuable
186
+ - Branch has no remote tracking
187
+
188
+ **Equivalent Standard Git:**
189
+ ```bash
190
+ # lt git reset does:
191
+ git fetch origin
192
+ git reset --hard origin/<current-branch>
119
193
  ```
120
- src/server/common/objects/<object-name>/
121
- ├── <object-name>.object.ts # Object class
122
- ├── <object-name>.input.ts # Update DTO
123
- └── <object-name>-create.input.ts # Create DTO
194
+
195
+ **Recovery (if you made a mistake):**
196
+ ```bash
197
+ # IMMEDIATELY after reset, if you change your mind:
198
+ git reflog # Find commit before reset
199
+ git reset --hard HEAD@{1} # Restore to that commit
124
200
  ```
125
201
 
126
202
  ---
127
203
 
128
- ## Common Command Patterns
204
+ ## Fullstack Commands Reference
205
+
206
+ ### lt fullstack init
129
207
 
130
- ### Simple Module (No Properties)
208
+ **Syntax:**
131
209
  ```bash
132
- lt server module --name Category --controller Rest
210
+ lt fullstack init \
211
+ --name <WorkspaceName> \
212
+ --frontend <angular|nuxt> \
213
+ --git <true|false> \
214
+ [--git-link <GitURL>]
215
+ ```
216
+
217
+ **Aliases:**
218
+ - `lt full init`
219
+
220
+ **Parameters:**
221
+
222
+ | Parameter | Type | Required | Options | Description |
223
+ |-----------|------|----------|---------|-------------|
224
+ | `--name` | string | Yes | - | Project name (PascalCase) |
225
+ | `--frontend` | string | Yes | `angular`, `nuxt` | Frontend framework |
226
+ | `--git` | boolean | Yes | `true`, `false` | Initialize git |
227
+ | `--git-link` | string | No | URL | Git repository URL |
228
+
229
+ **Created Structure:**
230
+ ```
231
+ <workspace-name>/
232
+ ├── frontend/ # Angular or Nuxt app
233
+ │ ├── src/ # (Angular) or pages/ (Nuxt)
234
+ │ ├── package.json
235
+ │ └── ...
236
+ ├── projects/
237
+ │ └── api/ # NestJS backend (@lenne.tech/nest-server)
238
+ │ ├── src/
239
+ │ │ └── server/
240
+ │ │ ├── modules/
241
+ │ │ └── common/
242
+ │ ├── package.json
243
+ │ └── ...
244
+ ├── package.json # Root workspace config
245
+ ├── .gitignore # (if --git true)
246
+ └── .git/ # (if --git true)
133
247
  ```
134
248
 
135
- ### Module with Basic Properties
249
+ **Post-Creation Setup:**
136
250
  ```bash
137
- lt server module --name Product --controller Both \
138
- --prop-name-0 name --prop-type-0 string \
139
- --prop-name-1 price --prop-type-1 number \
140
- --prop-name-2 active --prop-type-2 boolean
251
+ cd <workspace-name>
252
+ npm install # Install dependencies
253
+
254
+ # Terminal 1: Start backend
255
+ cd projects/api && npm start # Runs on port 3000
256
+
257
+ # Terminal 2: Start frontend
258
+ cd frontend && npm start # Angular: 4200, Nuxt: 3000/3001
141
259
  ```
142
260
 
143
- ### Module with Nullable Property
261
+ **Git Remote Configuration:**
262
+
263
+ With `--git-link`:
144
264
  ```bash
145
- lt server module --name Post --controller GraphQL \
146
- --prop-name-0 title --prop-type-0 string \
147
- --prop-name-1 subtitle --prop-type-1 string --prop-nullable-1 true
265
+ # Remote automatically configured
266
+ git remote -v
267
+ # origin https://github.com/user/repo.git (fetch)
268
+ # origin https://github.com/user/repo.git (push)
148
269
  ```
149
270
 
150
- ### Module with Array Property
271
+ Without `--git-link` (add later):
151
272
  ```bash
152
- lt server module --name Article --controller Both \
153
- --prop-name-0 title --prop-type-0 string \
154
- --prop-name-1 tags --prop-type-1 string --prop-array-1 true
273
+ cd <workspace-name>
274
+ git remote add origin https://github.com/user/repo.git
275
+ git push -u origin main
155
276
  ```
156
277
 
157
- ### Module with ObjectId Reference
278
+ ---
279
+
280
+ ## Common Patterns
281
+
282
+ ### Git Workflows
283
+
284
+ #### Feature Development
158
285
  ```bash
159
- lt server module --name Comment --controller Rest \
160
- --prop-name-0 content --prop-type-0 string \
161
- --prop-name-1 author --prop-type-1 ObjectId --prop-reference-1 User
286
+ # Start new feature
287
+ git checkout main
288
+ git pull
289
+ lt git get DEV-123
290
+
291
+ # Work...
292
+ git add .
293
+ git commit -m "Implement feature"
294
+ git push -u origin DEV-123
162
295
  ```
163
296
 
164
- ### Module with Schema/Object
297
+ #### Switch Between Branches
165
298
  ```bash
166
- lt server module --name Company --controller Both \
167
- --prop-name-0 name --prop-type-0 string \
168
- --prop-name-1 address --prop-schema-1 Address
299
+ # Save current work
300
+ git stash
301
+
302
+ # Switch branch
303
+ lt git get DEV-456
304
+
305
+ # Do urgent work...
306
+
307
+ # Return to original work
308
+ lt git get DEV-123
309
+ git stash pop
169
310
  ```
170
311
 
171
- ### Module with Enum
312
+ #### Discard Failed Work
172
313
  ```bash
173
- lt server module --name Order --controller Both \
174
- --prop-name-0 orderNumber --prop-type-0 string \
175
- --prop-name-1 status --prop-enum-1 OrderStatusEnum
314
+ # Work didn't go well
315
+ git status # See mess
316
+
317
+ # Start over from remote
318
+ lt git reset # Clean slate
176
319
  ```
177
320
 
178
- ### Module with JSON Metadata
321
+ ### Fullstack Initialization
322
+
323
+ #### Production Project
179
324
  ```bash
180
- lt server module --name Product --controller Both \
181
- --prop-name-0 name --prop-type-0 string \
182
- --prop-name-1 metadata --prop-type-1 Json --prop-nullable-1 true
325
+ lt fullstack init \
326
+ --name ProductionApp \
327
+ --frontend angular \
328
+ --git true \
329
+ --git-link https://github.com/company/production-app.git
330
+
331
+ cd ProductionApp
332
+ npm install
333
+ # ... setup, create modules, commit, push
183
334
  ```
184
335
 
185
- ### Complex Module (Multiple Property Types)
336
+ #### Local Development
186
337
  ```bash
187
- lt server module --name Event --controller Both \
188
- --prop-name-0 title --prop-type-0 string \
189
- --prop-name-1 description --prop-type-1 string --prop-nullable-1 true \
190
- --prop-name-2 organizer --prop-type-2 ObjectId --prop-reference-2 User \
191
- --prop-name-3 attendees --prop-type-3 ObjectId --prop-reference-3 User --prop-array-3 true \
192
- --prop-name-4 startDate --prop-type-4 Date \
193
- --prop-name-5 endDate --prop-type-5 Date --prop-nullable-5 true \
194
- --prop-name-6 location --prop-schema-6 Location \
195
- --prop-name-7 status --prop-enum-7 EventStatusEnum \
196
- --prop-name-8 tags --prop-type-8 string --prop-array-8 true \
197
- --prop-name-9 metadata --prop-type-9 Json --prop-nullable-9 true
338
+ lt fullstack init \
339
+ --name LocalTest \
340
+ --frontend nuxt \
341
+ --git false
342
+
343
+ cd LocalTest
344
+ npm install
345
+ # ... quick testing without git overhead
198
346
  ```
199
347
 
200
348
  ---
201
349
 
202
- ## Troubleshooting Guide
203
-
204
- ### Error: Cannot read properties of undefined (reading 'getChildIndex')
205
- **Cause**: Input files have no existing properties (fixed in latest version)
206
- **Solution**: Update to latest CLI version or ensure files have at least one property
350
+ ## Troubleshooting
207
351
 
208
- ### Error: Module directory already exists
209
- **Cause**: Trying to create a module that already exists
210
- **Solution**: Use `lt server addProp` instead
352
+ ### Git Commands
211
353
 
212
- ### Error: No src directory found
213
- **Cause**: Running command outside of project directory
214
- **Solution**: Navigate to project directory (anywhere inside works)
354
+ #### "Branch not found" Error
355
+ ```bash
356
+ # Problem: Typo in branch name
357
+ lt git get DEV-12345
358
+ # Error: Branch not found
215
359
 
216
- ### TypeScript Errors: Cannot find name 'Reference'
217
- **Cause**: Missing imports for referenced modules
218
- **Solution**: Manually add imports:
219
- ```typescript
220
- import { Reference } from '@lenne.tech/nest-server';
221
- import { User } from '../../user/user.model';
360
+ # Solution: Check available branches
361
+ git branch -a # List all branches
362
+ lt git get DEV-123 # Correct name
222
363
  ```
223
364
 
224
- ### Property Index Mismatch
225
- **Cause**: Using different indices for same property
226
- **Wrong**:
365
+ #### "Cannot reset" Error
227
366
  ```bash
228
- --prop-name-1 company --prop-type-0 string
367
+ # Problem: No remote tracking
368
+ lt git reset
369
+ # Error: No remote tracking branch
370
+
371
+ # Solution: Set up tracking
372
+ git branch -u origin/main # Or appropriate branch
373
+ git fetch origin
374
+ lt git reset
229
375
  ```
230
- **Correct**:
376
+
377
+ #### Uncommitted Changes Block Switch
231
378
  ```bash
232
- --prop-name-1 company --prop-type-1 string
379
+ # Problem: Changes prevent switching
380
+ lt git get DEV-456
381
+ # Error: Your local changes... would be overwritten
382
+
383
+ # Solution 1: Stash
384
+ git stash
385
+ lt git get DEV-456
386
+ git stash pop
387
+
388
+ # Solution 2: Commit
389
+ git add .
390
+ git commit -m "WIP"
391
+ lt git get DEV-456
233
392
  ```
234
393
 
235
- ### Boolean Value Errors
236
- **Wrong**: `--prop-nullable-0 True` or `--prop-nullable-0 TRUE`
237
- **Correct**: `--prop-nullable-0 true` (lowercase)
238
-
239
- ---
240
-
241
- ## Best Practices Checklist
242
-
243
- - [ ] Plan data model before generating
244
- - [ ] Create objects for reusable structures first
245
- - [ ] Use meaningful, descriptive names
246
- - [ ] Create referenced modules before referencing them
247
- - [ ] Start with one API type (Rest or GraphQL)
248
- - [ ] Mark only truly optional fields as nullable
249
- - [ ] Use arrays for collections
250
- - [ ] Use JSON for flexible/extensible data
251
- - [ ] Create enums before using them
252
- - [ ] Run lint after generation
253
- - [ ] Test incrementally
254
- - [ ] Commit after successful generation
255
- - [ ] Review generated code before modifying
256
- - [ ] Add custom business logic in services
257
- - [ ] Document complex relationships
394
+ ### Fullstack Init
258
395
 
259
- ---
260
-
261
- ## Naming Conventions
396
+ #### Permission Denied
397
+ ```bash
398
+ # Problem: No write permissions
399
+ lt fullstack init --name MyApp --frontend angular --git false
400
+ # Error: Permission denied
262
401
 
263
- ### Modules & Objects
264
- - **Format**: PascalCase
265
- - **Examples**: `User`, `BlogPost`, `OrderItem`, `ProductCategory`
402
+ # Solution: Use writable directory
403
+ cd ~/projects
404
+ lt fullstack init --name MyApp --frontend angular --git false
405
+ ```
266
406
 
267
- ### Properties
268
- - **Format**: camelCase
269
- - **Examples**: `firstName`, `emailAddress`, `isActive`, `createdAt`
407
+ #### Directory Already Exists
408
+ ```bash
409
+ # Problem: Project name already used
410
+ lt fullstack init --name MyApp --frontend angular --git false
411
+ # Error: Directory already exists
270
412
 
271
- ### Enum Names
272
- - **Format**: PascalCase + "Enum" suffix
273
- - **Examples**: `UserStatusEnum`, `OrderStatusEnum`, `PriorityEnum`
413
+ # Solution: Use different name or remove directory
414
+ rm -rf MyApp
415
+ lt fullstack init --name MyApp --frontend angular --git false
416
+ ```
274
417
 
275
- ### File Names
276
- - **Format**: kebab-case
277
- - **Examples**: `user.model.ts`, `blog-post.service.ts`, `order-item.input.ts`
418
+ #### Git Link Invalid
419
+ ```bash
420
+ # Problem: Invalid git URL
421
+ lt fullstack init \
422
+ --name MyApp \
423
+ --frontend angular \
424
+ --git true \
425
+ --git-link invalid-url
426
+
427
+ # Solution: Use valid HTTPS or SSH URL
428
+ lt fullstack init \
429
+ --name MyApp \
430
+ --frontend angular \
431
+ --git true \
432
+ --git-link https://github.com/user/repo.git
433
+ ```
278
434
 
279
435
  ---
280
436
 
281
- ## Controller Type Decision Guide
437
+ ## Best Practices
438
+
439
+ ### Git Operations
440
+
441
+ **Branch Management:**
442
+ - ✅ Always run `git status` before switching branches
443
+ - ✅ Commit or stash changes before switching
444
+ - ✅ Use meaningful branch names (DEV-123, feature/xyz)
445
+ - ✅ Pull latest before creating feature branches
446
+ - ❌ Don't leave uncommitted changes when switching
447
+
448
+ **Reset Operations:**
449
+ - ✅ Verify what will be discarded with `git status` first
450
+ - ✅ Only reset when you're certain you want to discard everything
451
+ - ✅ Know that reset is irreversible (unless using reflog immediately)
452
+ - ❌ Don't reset if you have valuable local commits
453
+ - ❌ Don't reset without checking remote exists
454
+
455
+ ### Fullstack Initialization
456
+
457
+ **Project Setup:**
458
+ - ✅ Use PascalCase for project names (MyProject, not my-project)
459
+ - ✅ Enable git for all real projects (`--git true`)
460
+ - ✅ Add git remote URL immediately with `--git-link`
461
+ - ✅ Run `npm install` right after creation
462
+ - ✅ Choose Angular for enterprise, Nuxt for flexibility
463
+ - ❌ Don't use git for quick throwaway tests
464
+ - ❌ Don't use spaces in project names
465
+
466
+ **Post-Creation:**
467
+ - ✅ Read generated README.md files
468
+ - ✅ Commit initial setup before making changes
469
+ - ✅ Set up CI/CD early
470
+ - ✅ Configure environment variables
471
+ - ❌ Don't commit .env files
472
+ - ❌ Don't modify generated structure without understanding it
282
473
 
283
- ### Choose REST when:
284
- - Building traditional CRUD APIs
285
- - Simple data fetching needs
286
- - RESTful conventions are preferred
287
- - Mobile/web clients expect REST
474
+ ---
288
475
 
289
- ### Choose GraphQL when:
290
- - Complex data relationships
291
- - Frontend needs flexible queries
292
- - Reducing over-fetching/under-fetching
293
- - Real-time subscriptions needed
476
+ ## Quick Tips
294
477
 
295
- ### Choose Both when:
296
- - Supporting multiple client types
297
- - Gradual migration from REST to GraphQL
298
- - Maximum flexibility required
299
- - Unsure about future requirements
478
+ 1. **Use aliases**: `lt git g` instead of `lt git get`
479
+ 2. **Stash is your friend**: `git stash` before branch switches
480
+ 3. **Check status often**: `git status` before any git operation
481
+ 4. **Reset is destructive**: Only use when certain
482
+ 5. **PascalCase names**: `MyProject`, not `my_project` or `myproject`
483
+ 6. **Git from start**: Use `--git true` for all real projects
484
+ 7. **Track branches**: Let `lt git get` handle remote tracking
485
+ 8. **Install immediately**: Run `npm install` after init
486
+ 9. **Commit often**: Save work after each logical step
487
+ 10. **Read READMEs**: Each generated project has setup instructions
300
488
 
301
489
  ---
302
490
 
303
- ## Related Technologies
491
+ ## Related Commands
304
492
 
305
- ### Dependencies
306
- - **NestJS**: Node.js framework
307
- - **Mongoose**: MongoDB ODM
308
- - **GraphQL**: Query language
309
- - **TypeScript**: Type-safe JavaScript
310
- - **ts-morph**: TypeScript AST manipulation
311
-
312
- ### Generated Decorators
313
- - `@Prop()`: Mongoose schema definition
314
- - `@UnifiedField()`: GraphQL + REST exposure
315
- - `@Restricted()`: Access control
316
- - `@IsOptional()`: Validation
317
- - `@Field()`: GraphQL field
493
+ For NestJS server development commands, use the **nest-server-generator skill**:
494
+ - `lt server module` - Create modules
495
+ - `lt server object` - Create objects
496
+ - `lt server addProp` - Add properties
318
497
 
319
498
  ---
320
499
 
321
- ## Quick Tips
500
+ ## References
322
501
 
323
- 1. **Use indices consistently**: All flags for one property use same index
324
- 2. **ObjectId always needs reference**: `--prop-reference-X` is required
325
- 3. **Quote special characters**: Wrap values with spaces in quotes
326
- 4. **Lowercase booleans**: Use `true`/`false`, not `True`/`FALSE`
327
- 5. **Run from anywhere**: CLI finds `src/` automatically
328
- 6. **Check before creating**: Use `addProp` for existing modules
329
- 7. **Plan relationships**: Create referenced modules first
330
- 8. **Use objects for reuse**: Don't duplicate structures
331
- 9. **Start simple**: Add complexity incrementally
332
- 10. **Commit often**: Save after each successful generation
502
+ - [lenne.tech CLI Documentation](https://github.com/lenneTech/cli)
503
+ - [Git Documentation](https://git-scm.com/doc)
504
+ - [NestJS Documentation](https://docs.nestjs.com)
505
+ - [Angular Documentation](https://angular.io/docs)
506
+ - [Nuxt Documentation](https://nuxt.com/docs)