@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.
- package/bin/lt +145 -14
- package/build/commands/claude/install-skills.js +622 -0
- package/build/commands/config/config.js +25 -0
- package/build/commands/config/help.js +167 -0
- package/build/commands/config/init.js +143 -0
- package/build/commands/config/show.js +68 -0
- package/build/commands/server/add-property.js +163 -27
- package/build/commands/server/create.js +66 -4
- package/build/commands/server/module.js +133 -20
- package/build/commands/server/object.js +23 -15
- package/build/extensions/config.js +157 -0
- package/build/extensions/server.js +82 -47
- package/build/interfaces/lt-config.interface.js +3 -0
- package/build/templates/claude-skills/lt-cli/SKILL.md +190 -259
- package/build/templates/claude-skills/lt-cli/examples.md +433 -203
- package/build/templates/claude-skills/lt-cli/reference.md +400 -226
- package/build/templates/claude-skills/nest-server-generator/SKILL.md +2833 -0
- package/build/templates/claude-skills/nest-server-generator/examples.md +760 -0
- package/build/templates/claude-skills/nest-server-generator/reference.md +417 -0
- package/build/templates/nest-server-module/inputs/template-create.input.ts.ejs +1 -3
- package/build/templates/nest-server-module/inputs/template.input.ts.ejs +1 -1
- package/build/templates/nest-server-module/template.controller.ts.ejs +24 -13
- package/build/templates/nest-server-module/template.model.ts.ejs +2 -2
- package/build/templates/nest-server-module/template.module.ts.ejs +4 -0
- package/build/templates/nest-server-module/template.service.ts.ejs +6 -6
- package/build/templates/nest-server-object/template.object.ts.ejs +2 -2
- package/package.json +13 -11
- 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
|
-
###
|
|
19
|
+
### Git Commands
|
|
20
|
+
|
|
21
|
+
#### Get Branch (Checkout/Create)
|
|
6
22
|
```bash
|
|
7
|
-
# Interactive
|
|
8
|
-
lt
|
|
9
|
-
lt
|
|
23
|
+
# Interactive (prompts for branch name)
|
|
24
|
+
lt git get
|
|
25
|
+
lt git g
|
|
10
26
|
|
|
11
27
|
# Non-interactive
|
|
12
|
-
lt
|
|
28
|
+
lt git get <branch-name>
|
|
29
|
+
lt git g <branch-name>
|
|
13
30
|
```
|
|
14
31
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
# Interactive
|
|
18
|
-
lt server addProp
|
|
19
|
-
lt server ap
|
|
32
|
+
**Parameters:**
|
|
33
|
+
- `<branch-name>`: Branch name to checkout/create
|
|
20
34
|
|
|
21
|
-
|
|
22
|
-
|
|
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
|
-
|
|
47
|
+
#### Reset to Remote
|
|
26
48
|
```bash
|
|
27
|
-
# Interactive
|
|
28
|
-
lt
|
|
29
|
-
lt server o
|
|
49
|
+
# Interactive (prompts for confirmation)
|
|
50
|
+
lt git reset
|
|
30
51
|
|
|
31
|
-
#
|
|
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
|
|
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
|
-
|
|
85
|
+
**Optional Parameters:**
|
|
86
|
+
- `--git-link`: Git repository URL (only when `--git true`)
|
|
48
87
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
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
|
-
##
|
|
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
|
-
|
|
137
|
+
# Switch to existing branch
|
|
138
|
+
lt git get main # Switches to main
|
|
83
139
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
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
|
-
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
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
|
-
|
|
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
|
-
|
|
166
|
+
**Interactive Prompt:**
|
|
104
167
|
```
|
|
105
|
-
|
|
106
|
-
|
|
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
|
-
|
|
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
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
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
|
-
##
|
|
204
|
+
## Fullstack Commands Reference
|
|
205
|
+
|
|
206
|
+
### lt fullstack init
|
|
129
207
|
|
|
130
|
-
|
|
208
|
+
**Syntax:**
|
|
131
209
|
```bash
|
|
132
|
-
lt
|
|
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
|
-
|
|
249
|
+
**Post-Creation Setup:**
|
|
136
250
|
```bash
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
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
|
-
|
|
261
|
+
**Git Remote Configuration:**
|
|
262
|
+
|
|
263
|
+
With `--git-link`:
|
|
144
264
|
```bash
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
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
|
-
|
|
271
|
+
Without `--git-link` (add later):
|
|
151
272
|
```bash
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
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
|
-
|
|
278
|
+
---
|
|
279
|
+
|
|
280
|
+
## Common Patterns
|
|
281
|
+
|
|
282
|
+
### Git Workflows
|
|
283
|
+
|
|
284
|
+
#### Feature Development
|
|
158
285
|
```bash
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
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
|
-
|
|
297
|
+
#### Switch Between Branches
|
|
165
298
|
```bash
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
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
|
-
|
|
312
|
+
#### Discard Failed Work
|
|
172
313
|
```bash
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
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
|
-
###
|
|
321
|
+
### Fullstack Initialization
|
|
322
|
+
|
|
323
|
+
#### Production Project
|
|
179
324
|
```bash
|
|
180
|
-
lt
|
|
181
|
-
--
|
|
182
|
-
--
|
|
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
|
-
|
|
336
|
+
#### Local Development
|
|
186
337
|
```bash
|
|
187
|
-
lt
|
|
188
|
-
--
|
|
189
|
-
--
|
|
190
|
-
--
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
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
|
|
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
|
-
###
|
|
209
|
-
**Cause**: Trying to create a module that already exists
|
|
210
|
-
**Solution**: Use `lt server addProp` instead
|
|
352
|
+
### Git Commands
|
|
211
353
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
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
|
-
|
|
217
|
-
|
|
218
|
-
|
|
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
|
-
|
|
225
|
-
**Cause**: Using different indices for same property
|
|
226
|
-
**Wrong**:
|
|
365
|
+
#### "Cannot reset" Error
|
|
227
366
|
```bash
|
|
228
|
-
|
|
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
|
-
|
|
376
|
+
|
|
377
|
+
#### Uncommitted Changes Block Switch
|
|
231
378
|
```bash
|
|
232
|
-
|
|
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
|
-
###
|
|
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
|
-
|
|
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
|
-
|
|
264
|
-
|
|
265
|
-
|
|
402
|
+
# Solution: Use writable directory
|
|
403
|
+
cd ~/projects
|
|
404
|
+
lt fullstack init --name MyApp --frontend angular --git false
|
|
405
|
+
```
|
|
266
406
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
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
|
-
|
|
272
|
-
-
|
|
273
|
-
|
|
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
|
-
|
|
276
|
-
|
|
277
|
-
|
|
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
|
-
##
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
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
|
|
491
|
+
## Related Commands
|
|
304
492
|
|
|
305
|
-
|
|
306
|
-
-
|
|
307
|
-
-
|
|
308
|
-
-
|
|
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
|
-
##
|
|
500
|
+
## References
|
|
322
501
|
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
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)
|