@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,312 +1,542 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lt-cli-examples
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
description: Real-world examples for Git operations and Fullstack initialization with lenne.tech CLI
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# LT CLI Examples
|
|
2
8
|
|
|
3
|
-
|
|
9
|
+
⚠️ **Note**: For NestJS server examples (modules, objects, properties), see the **nest-server-generator skill** instead.
|
|
10
|
+
|
|
11
|
+
This file contains examples for:
|
|
12
|
+
- Git operations (`lt git get`, `lt git reset`)
|
|
13
|
+
- Fullstack initialization (`lt fullstack init`)
|
|
4
14
|
|
|
5
|
-
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Git Operations
|
|
6
18
|
|
|
7
|
-
|
|
19
|
+
### 1. Branch Management
|
|
20
|
+
|
|
21
|
+
#### Switching to Existing Branch
|
|
8
22
|
```bash
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
--prop-name-1 username --prop-type-1 string \
|
|
12
|
-
--prop-name-2 firstName --prop-type-2 string \
|
|
13
|
-
--prop-name-3 lastName --prop-type-3 string \
|
|
14
|
-
--prop-name-4 bio --prop-type-4 string --prop-nullable-4 true
|
|
23
|
+
# Switch to existing branch DEV-123
|
|
24
|
+
lt git get DEV-123
|
|
15
25
|
```
|
|
16
26
|
|
|
17
|
-
|
|
27
|
+
**What happens:**
|
|
28
|
+
1. Checks if `DEV-123` exists locally
|
|
29
|
+
2. Switches to branch `DEV-123`
|
|
30
|
+
|
|
31
|
+
#### Creating New Branch
|
|
18
32
|
```bash
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
--prop-name-1 slug --prop-type-1 string \
|
|
22
|
-
--prop-name-2 description --prop-type-2 string --prop-nullable-2 true
|
|
33
|
+
# Create and switch to new branch feature/new-authentication
|
|
34
|
+
lt git get feature/new-authentication
|
|
23
35
|
```
|
|
24
36
|
|
|
25
|
-
|
|
37
|
+
**What happens:**
|
|
38
|
+
1. Checks if `feature/new-authentication` exists locally (not found)
|
|
39
|
+
2. Checks if it exists on remote (not found)
|
|
40
|
+
3. Creates new branch `feature/new-authentication` from current branch
|
|
41
|
+
4. Switches to the new branch
|
|
42
|
+
|
|
43
|
+
#### Checking Out Remote Branch
|
|
26
44
|
```bash
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
--prop-name-1 slug --prop-type-1 string \
|
|
30
|
-
--prop-name-2 content --prop-type-2 string \
|
|
31
|
-
--prop-name-3 excerpt --prop-type-3 string --prop-nullable-3 true \
|
|
32
|
-
--prop-name-4 author --prop-type-4 ObjectId --prop-reference-4 User \
|
|
33
|
-
--prop-name-5 category --prop-type-5 ObjectId --prop-reference-5 Category \
|
|
34
|
-
--prop-name-6 tags --prop-type-6 string --prop-array-6 true \
|
|
35
|
-
--prop-name-7 published --prop-type-7 boolean \
|
|
36
|
-
--prop-name-8 publishedAt --prop-type-8 Date --prop-nullable-8 true
|
|
45
|
+
# Checkout branch that exists on remote but not locally
|
|
46
|
+
lt git get DEV-456
|
|
37
47
|
```
|
|
38
48
|
|
|
39
|
-
|
|
49
|
+
**What happens:**
|
|
50
|
+
1. Checks if `DEV-456` exists locally (not found)
|
|
51
|
+
2. Checks if it exists on remote (found!)
|
|
52
|
+
3. Checks out `DEV-456` and sets up tracking to `origin/DEV-456`
|
|
53
|
+
4. Switches to the branch
|
|
54
|
+
|
|
55
|
+
#### Using Alias
|
|
40
56
|
```bash
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
--prop-name-1 author --prop-type-1 ObjectId --prop-reference-1 User \
|
|
44
|
-
--prop-name-2 post --prop-type-2 ObjectId --prop-reference-2 Post \
|
|
45
|
-
--prop-name-3 approved --prop-type-3 boolean
|
|
57
|
+
# Same as "lt git get" but shorter
|
|
58
|
+
lt git g DEV-789
|
|
46
59
|
```
|
|
47
60
|
|
|
48
61
|
---
|
|
49
62
|
|
|
50
|
-
### 2.
|
|
63
|
+
### 2. Workflow Scenarios
|
|
51
64
|
|
|
52
|
-
####
|
|
65
|
+
#### Start New Feature Development
|
|
53
66
|
```bash
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
67
|
+
# You're on main branch, start working on new ticket
|
|
68
|
+
git status # Verify clean working tree
|
|
69
|
+
lt git get DEV-234 # Create and switch to new feature branch
|
|
70
|
+
|
|
71
|
+
# Do your work...
|
|
72
|
+
git add .
|
|
73
|
+
git commit -m "Implement feature"
|
|
74
|
+
git push -u origin DEV-234
|
|
60
75
|
```
|
|
61
76
|
|
|
62
|
-
####
|
|
77
|
+
#### Switch Between Tickets
|
|
63
78
|
```bash
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
79
|
+
# Working on DEV-123, need to switch to urgent DEV-456
|
|
80
|
+
git status # Check for uncommitted changes
|
|
81
|
+
git stash # Save work in progress
|
|
82
|
+
lt git get DEV-456 # Switch to urgent ticket
|
|
83
|
+
|
|
84
|
+
# Fix urgent issue...
|
|
85
|
+
git add .
|
|
86
|
+
git commit -m "Fix urgent bug"
|
|
87
|
+
git push
|
|
88
|
+
|
|
89
|
+
# Return to original work
|
|
90
|
+
lt git get DEV-123
|
|
91
|
+
git stash pop # Restore work in progress
|
|
71
92
|
```
|
|
72
93
|
|
|
73
|
-
####
|
|
94
|
+
#### Sync with Remote Branch
|
|
74
95
|
```bash
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
--prop-name-5 stock --prop-type-5 number \
|
|
82
|
-
--prop-name-6 images --prop-type-6 string --prop-array-6 true \
|
|
83
|
-
--prop-name-7 tags --prop-type-7 string --prop-array-7 true \
|
|
84
|
-
--prop-name-8 active --prop-type-8 boolean
|
|
96
|
+
# Someone else created branch DEV-789 on remote
|
|
97
|
+
lt git get DEV-789 # Automatically checks out and tracks remote branch
|
|
98
|
+
|
|
99
|
+
# Verify tracking
|
|
100
|
+
git status
|
|
101
|
+
# Output: "Your branch is up to date with 'origin/DEV-789'"
|
|
85
102
|
```
|
|
86
103
|
|
|
87
|
-
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
### 3. Reset Operations
|
|
107
|
+
|
|
108
|
+
#### Discard All Local Changes
|
|
88
109
|
```bash
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
--prop-name-7 shippingAddress --prop-schema-7 Address
|
|
110
|
+
# Your local changes are broken, start fresh from remote
|
|
111
|
+
git status # See what will be discarded
|
|
112
|
+
|
|
113
|
+
lt git reset
|
|
114
|
+
# Prompts: "Reset current branch to origin/<branch>? This will discard all local changes. (y/N)"
|
|
115
|
+
# Type: y
|
|
116
|
+
|
|
117
|
+
# Your branch now matches remote exactly
|
|
98
118
|
```
|
|
99
119
|
|
|
100
|
-
|
|
120
|
+
**⚠️ WARNING**: This is destructive! All local commits and changes are permanently lost.
|
|
101
121
|
|
|
102
|
-
|
|
122
|
+
#### When to Use Reset
|
|
103
123
|
|
|
104
|
-
|
|
124
|
+
**Use Case 1**: Experimental work failed
|
|
105
125
|
```bash
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
--prop-name-2 members --prop-type-2 ObjectId --prop-reference-2 User --prop-array-2 true
|
|
126
|
+
# You tried something, it didn't work, want clean slate
|
|
127
|
+
git status # Shows many broken changes
|
|
128
|
+
lt git reset # Start over from remote
|
|
110
129
|
```
|
|
111
130
|
|
|
112
|
-
|
|
131
|
+
**Use Case 2**: Merge conflict too complex
|
|
113
132
|
```bash
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
--prop-name-5 endDate --prop-type-5 Date --prop-nullable-5 true \
|
|
121
|
-
--prop-name-6 status --prop-enum-6 ProjectStatusEnum
|
|
133
|
+
# Merge created complex conflicts, easier to start over
|
|
134
|
+
git merge main # Conflict!
|
|
135
|
+
# ... attempt to resolve, too complicated
|
|
136
|
+
git merge --abort
|
|
137
|
+
lt git reset # Get clean state
|
|
138
|
+
# Now merge again or use different approach
|
|
122
139
|
```
|
|
123
140
|
|
|
124
|
-
|
|
141
|
+
**Use Case 3**: Accidental commits on wrong branch
|
|
125
142
|
```bash
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
--prop-name-4 priority --prop-enum-4 PriorityEnum \
|
|
132
|
-
--prop-name-5 status --prop-enum-5 TaskStatusEnum \
|
|
133
|
-
--prop-name-6 dueDate --prop-type-6 Date --prop-nullable-6 true \
|
|
134
|
-
--prop-name-7 estimatedHours --prop-type-7 number --prop-nullable-7 true
|
|
143
|
+
# Made commits on main instead of feature branch
|
|
144
|
+
git log # See unwanted commits
|
|
145
|
+
lt git reset # Discard commits, return to clean main
|
|
146
|
+
lt git get DEV-123 # Switch to correct branch
|
|
147
|
+
# Re-do work properly
|
|
135
148
|
```
|
|
136
149
|
|
|
137
150
|
---
|
|
138
151
|
|
|
139
|
-
### 4.
|
|
152
|
+
### 4. Common Patterns
|
|
140
153
|
|
|
141
|
-
####
|
|
154
|
+
#### Daily Development Workflow
|
|
142
155
|
```bash
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
--prop-name-3 profile --prop-schema-3 Profile \
|
|
158
|
-
--prop-name-4 verified --prop-type-4 boolean
|
|
156
|
+
# Morning: Start work on ticket
|
|
157
|
+
lt git get main # Switch to main
|
|
158
|
+
git pull # Get latest changes
|
|
159
|
+
lt git get DEV-567 # Create/switch to ticket branch
|
|
160
|
+
|
|
161
|
+
# During day: Regular commits
|
|
162
|
+
git add .
|
|
163
|
+
git commit -m "Progress on feature"
|
|
164
|
+
git push -u origin DEV-567 # First push sets upstream
|
|
165
|
+
|
|
166
|
+
# End of day: Push progress
|
|
167
|
+
git add .
|
|
168
|
+
git commit -m "WIP: End of day checkpoint"
|
|
169
|
+
git push
|
|
159
170
|
```
|
|
160
171
|
|
|
161
|
-
####
|
|
172
|
+
#### Handling Mistakes
|
|
162
173
|
```bash
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
174
|
+
# Scenario: Committed to wrong branch
|
|
175
|
+
git log -1 # See the wrong commit
|
|
176
|
+
git stash # Stash any uncommitted work
|
|
177
|
+
lt git reset # Reset to clean state
|
|
178
|
+
lt git get DEV-999 # Switch to correct branch
|
|
179
|
+
git stash pop # Restore work
|
|
180
|
+
# Now commit on correct branch
|
|
170
181
|
```
|
|
171
182
|
|
|
172
|
-
####
|
|
183
|
+
#### Code Review Feedback
|
|
173
184
|
```bash
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
185
|
+
# Reviewer asked for changes on PR branch
|
|
186
|
+
lt git get DEV-333 # Switch to PR branch
|
|
187
|
+
git pull # Get latest
|
|
188
|
+
# Make requested changes
|
|
189
|
+
git add .
|
|
190
|
+
git commit -m "Address PR feedback"
|
|
191
|
+
git push
|
|
177
192
|
```
|
|
178
193
|
|
|
179
194
|
---
|
|
180
195
|
|
|
181
|
-
|
|
196
|
+
## Fullstack Project Initialization
|
|
197
|
+
|
|
198
|
+
### 1. Angular Projects
|
|
182
199
|
|
|
183
|
-
####
|
|
200
|
+
#### Production Angular App with Git
|
|
184
201
|
```bash
|
|
185
|
-
lt
|
|
186
|
-
--
|
|
187
|
-
--
|
|
188
|
-
--
|
|
189
|
-
--
|
|
190
|
-
--prop-name-4 price --prop-type-4 number \
|
|
191
|
-
--prop-name-5 duration --prop-type-5 number \
|
|
192
|
-
--prop-name-6 level --prop-enum-6 CourseLevelEnum \
|
|
193
|
-
--prop-name-7 tags --prop-type-7 string --prop-array-7 true \
|
|
194
|
-
--prop-name-8 published --prop-type-8 boolean
|
|
202
|
+
lt fullstack init \
|
|
203
|
+
--name MyAngularApp \
|
|
204
|
+
--frontend angular \
|
|
205
|
+
--git true \
|
|
206
|
+
--git-link https://github.com/myorg/my-angular-app.git
|
|
195
207
|
```
|
|
196
208
|
|
|
197
|
-
|
|
209
|
+
**Creates:**
|
|
210
|
+
```
|
|
211
|
+
MyAngularApp/
|
|
212
|
+
├── frontend/ # Angular 18+ application
|
|
213
|
+
│ ├── src/
|
|
214
|
+
│ ├── angular.json
|
|
215
|
+
│ └── package.json
|
|
216
|
+
├── projects/
|
|
217
|
+
│ └── api/ # NestJS backend (@lenne.tech/nest-server)
|
|
218
|
+
│ ├── src/
|
|
219
|
+
│ │ └── server/
|
|
220
|
+
│ │ ├── modules/
|
|
221
|
+
│ │ └── common/
|
|
222
|
+
│ └── package.json
|
|
223
|
+
├── package.json # Root workspace config
|
|
224
|
+
├── .gitignore
|
|
225
|
+
└── .git/ # Initialized with remote
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
**Next steps:**
|
|
198
229
|
```bash
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
--prop-name-4 duration --prop-type-4 number \
|
|
205
|
-
--prop-name-5 videoUrl --prop-type-5 string --prop-nullable-5 true \
|
|
206
|
-
--prop-name-6 resources --prop-type-6 Json --prop-nullable-6 true
|
|
230
|
+
cd MyAngularApp
|
|
231
|
+
npm install # Install all dependencies
|
|
232
|
+
cd projects/api && npm start # Start backend (port 3000)
|
|
233
|
+
# In another terminal:
|
|
234
|
+
cd frontend && npm start # Start frontend (port 4200)
|
|
207
235
|
```
|
|
208
236
|
|
|
209
|
-
####
|
|
237
|
+
#### Local Development Angular App
|
|
210
238
|
```bash
|
|
211
|
-
lt
|
|
212
|
-
--
|
|
213
|
-
--
|
|
214
|
-
--
|
|
215
|
-
--prop-name-3 completedLessons --prop-type-3 ObjectId --prop-reference-3 Lesson --prop-array-3 true \
|
|
216
|
-
--prop-name-4 enrolledAt --prop-type-4 Date \
|
|
217
|
-
--prop-name-5 completedAt --prop-type-5 Date --prop-nullable-5 true
|
|
239
|
+
lt fullstack init \
|
|
240
|
+
--name LocalDevApp \
|
|
241
|
+
--frontend angular \
|
|
242
|
+
--git false
|
|
218
243
|
```
|
|
219
244
|
|
|
245
|
+
**Use case:** Quick prototyping, learning, no version control needed
|
|
246
|
+
|
|
220
247
|
---
|
|
221
248
|
|
|
222
|
-
|
|
249
|
+
### 2. Nuxt Projects
|
|
223
250
|
|
|
224
|
-
|
|
251
|
+
#### Production Nuxt App with Git
|
|
225
252
|
```bash
|
|
226
|
-
lt
|
|
227
|
-
--
|
|
228
|
-
--
|
|
253
|
+
lt fullstack init \
|
|
254
|
+
--name MyNuxtApp \
|
|
255
|
+
--frontend nuxt \
|
|
256
|
+
--git true \
|
|
257
|
+
--git-link https://github.com/myorg/my-nuxt-app.git
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
**Creates:**
|
|
261
|
+
```
|
|
262
|
+
MyNuxtApp/
|
|
263
|
+
├── frontend/ # Nuxt 3 application
|
|
264
|
+
│ ├── pages/
|
|
265
|
+
│ ├── components/
|
|
266
|
+
│ ├── nuxt.config.ts
|
|
267
|
+
│ └── package.json
|
|
268
|
+
├── projects/
|
|
269
|
+
│ └── api/ # NestJS backend
|
|
270
|
+
│ └── ...
|
|
271
|
+
├── package.json
|
|
272
|
+
├── .gitignore
|
|
273
|
+
└── .git/
|
|
229
274
|
```
|
|
230
275
|
|
|
231
|
-
|
|
276
|
+
#### Nuxt App without Remote
|
|
232
277
|
```bash
|
|
233
|
-
lt
|
|
234
|
-
--
|
|
235
|
-
--
|
|
278
|
+
lt fullstack init \
|
|
279
|
+
--name MyNuxtProject \
|
|
280
|
+
--frontend nuxt \
|
|
281
|
+
--git true
|
|
282
|
+
# No --git-link, git initialized but no remote
|
|
236
283
|
```
|
|
237
284
|
|
|
238
|
-
|
|
285
|
+
**Use case:** Start project locally, add remote later
|
|
286
|
+
|
|
287
|
+
**Add remote later:**
|
|
239
288
|
```bash
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
--prop-name-2 views --prop-type-2 number
|
|
289
|
+
cd MyNuxtProject
|
|
290
|
+
git remote add origin https://github.com/myorg/my-nuxt-project.git
|
|
291
|
+
git push -u origin main
|
|
244
292
|
```
|
|
245
293
|
|
|
246
294
|
---
|
|
247
295
|
|
|
248
|
-
|
|
296
|
+
### 3. Project Types
|
|
249
297
|
|
|
250
|
-
|
|
298
|
+
#### Client Project (Angular + NestJS)
|
|
251
299
|
```bash
|
|
252
|
-
lt
|
|
300
|
+
lt fullstack init \
|
|
301
|
+
--name ClientPortal \
|
|
302
|
+
--frontend angular \
|
|
303
|
+
--git true \
|
|
304
|
+
--git-link https://github.com/client/portal.git
|
|
305
|
+
|
|
306
|
+
# After creation:
|
|
307
|
+
cd ClientPortal/projects/api
|
|
308
|
+
|
|
309
|
+
# Add authentication module
|
|
310
|
+
lt server module --name User --controller Both \
|
|
253
311
|
--prop-name-0 email --prop-type-0 string \
|
|
254
|
-
--prop-name-1
|
|
255
|
-
|
|
256
|
-
|
|
312
|
+
--prop-name-1 password --prop-type-1 string
|
|
313
|
+
|
|
314
|
+
# Add business logic modules
|
|
315
|
+
# ... (use nest-server-generator skill for this)
|
|
257
316
|
```
|
|
258
317
|
|
|
259
|
-
|
|
318
|
+
#### Internal Tool (Nuxt + NestJS)
|
|
260
319
|
```bash
|
|
261
|
-
lt
|
|
262
|
-
--
|
|
263
|
-
--
|
|
264
|
-
--
|
|
320
|
+
lt fullstack init \
|
|
321
|
+
--name InternalDashboard \
|
|
322
|
+
--frontend nuxt \
|
|
323
|
+
--git true \
|
|
324
|
+
--git-link https://github.com/company/internal-dashboard.git
|
|
325
|
+
|
|
326
|
+
# Quick setup for internal tools with Nuxt's flexibility
|
|
265
327
|
```
|
|
266
328
|
|
|
267
|
-
|
|
329
|
+
#### Learning/Tutorial Project
|
|
268
330
|
```bash
|
|
269
|
-
lt
|
|
270
|
-
--
|
|
271
|
-
--
|
|
272
|
-
--
|
|
331
|
+
lt fullstack init \
|
|
332
|
+
--name LearningFullstack \
|
|
333
|
+
--frontend angular \
|
|
334
|
+
--git false
|
|
335
|
+
|
|
336
|
+
# No git overhead, just focus on learning
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
---
|
|
340
|
+
|
|
341
|
+
### 4. Post-Creation Workflows
|
|
342
|
+
|
|
343
|
+
#### After Angular Fullstack Init
|
|
344
|
+
```bash
|
|
345
|
+
cd MyAngularApp
|
|
346
|
+
npm install
|
|
347
|
+
|
|
348
|
+
# Terminal 1: Start backend
|
|
349
|
+
cd projects/api
|
|
350
|
+
npm start
|
|
351
|
+
# API runs on http://localhost:3000
|
|
352
|
+
|
|
353
|
+
# Terminal 2: Start frontend
|
|
354
|
+
cd frontend
|
|
355
|
+
npm start
|
|
356
|
+
# Frontend runs on http://localhost:4200
|
|
357
|
+
# Auto-proxies API calls to backend
|
|
358
|
+
|
|
359
|
+
# Terminal 3: Development
|
|
360
|
+
cd projects/api
|
|
361
|
+
# Generate server modules using nest-server-generator skill
|
|
273
362
|
```
|
|
274
363
|
|
|
275
|
-
|
|
364
|
+
#### After Nuxt Fullstack Init
|
|
276
365
|
```bash
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
366
|
+
cd MyNuxtApp
|
|
367
|
+
npm install
|
|
368
|
+
|
|
369
|
+
# Terminal 1: Start backend
|
|
370
|
+
cd projects/api
|
|
371
|
+
npm start
|
|
372
|
+
# API runs on http://localhost:3000
|
|
373
|
+
|
|
374
|
+
# Terminal 2: Start frontend
|
|
375
|
+
cd frontend
|
|
376
|
+
npm run dev
|
|
377
|
+
# Frontend runs on http://localhost:3000 (or 3001 if 3000 taken)
|
|
378
|
+
|
|
379
|
+
# Configure proxy in nuxt.config.ts if needed
|
|
282
380
|
```
|
|
283
381
|
|
|
284
382
|
---
|
|
285
383
|
|
|
286
|
-
|
|
384
|
+
### 5. Common Initialization Patterns
|
|
287
385
|
|
|
288
|
-
|
|
386
|
+
#### Team Project Setup
|
|
289
387
|
```bash
|
|
388
|
+
# Lead developer initializes project
|
|
290
389
|
lt fullstack init \
|
|
291
|
-
--name
|
|
390
|
+
--name TeamProject \
|
|
292
391
|
--frontend angular \
|
|
293
392
|
--git true \
|
|
294
|
-
--git-link https://github.com/
|
|
393
|
+
--git-link https://github.com/team/team-project.git
|
|
394
|
+
|
|
395
|
+
cd TeamProject
|
|
396
|
+
npm install
|
|
397
|
+
# ... initial setup, create base modules
|
|
398
|
+
git add .
|
|
399
|
+
git commit -m "Initial project setup"
|
|
400
|
+
git push -u origin main
|
|
401
|
+
|
|
402
|
+
# Team members clone
|
|
403
|
+
# git clone https://github.com/team/team-project.git
|
|
404
|
+
# cd team-project
|
|
405
|
+
# npm install
|
|
295
406
|
```
|
|
296
407
|
|
|
297
|
-
|
|
408
|
+
#### Monorepo with Multiple Projects
|
|
298
409
|
```bash
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
410
|
+
# Create first project
|
|
411
|
+
lt fullstack init --name ProjectA --frontend angular --git true
|
|
412
|
+
|
|
413
|
+
# Create second project
|
|
414
|
+
lt fullstack init --name ProjectB --frontend nuxt --git true
|
|
415
|
+
|
|
416
|
+
# Each has its own git repository, npm workspace, and backend
|
|
304
417
|
```
|
|
305
418
|
|
|
306
|
-
|
|
419
|
+
#### Migration from Existing Backend
|
|
307
420
|
```bash
|
|
421
|
+
# Create fullstack project
|
|
308
422
|
lt fullstack init \
|
|
309
|
-
--name
|
|
423
|
+
--name MigratedApp \
|
|
310
424
|
--frontend angular \
|
|
311
|
-
--git
|
|
312
|
-
|
|
425
|
+
--git true
|
|
426
|
+
|
|
427
|
+
cd MigratedApp/projects
|
|
428
|
+
|
|
429
|
+
# Remove generated api
|
|
430
|
+
rm -rf api
|
|
431
|
+
|
|
432
|
+
# Clone existing backend
|
|
433
|
+
git clone https://github.com/company/existing-api.git api
|
|
434
|
+
|
|
435
|
+
# Update root package.json workspace paths if needed
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
---
|
|
439
|
+
|
|
440
|
+
## Troubleshooting Examples
|
|
441
|
+
|
|
442
|
+
### Git Branch Issues
|
|
443
|
+
|
|
444
|
+
#### Branch Exists But Can't Switch
|
|
445
|
+
```bash
|
|
446
|
+
# Problem: Uncommitted changes
|
|
447
|
+
git status
|
|
448
|
+
# Output: "Changes not staged for commit..."
|
|
449
|
+
|
|
450
|
+
# Solution 1: Stash changes
|
|
451
|
+
git stash
|
|
452
|
+
lt git get DEV-123
|
|
453
|
+
git stash pop
|
|
454
|
+
|
|
455
|
+
# Solution 2: Commit changes
|
|
456
|
+
git add .
|
|
457
|
+
git commit -m "WIP: Save progress"
|
|
458
|
+
lt git get DEV-123
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
#### Reset Fails
|
|
462
|
+
```bash
|
|
463
|
+
# Problem: No remote branch
|
|
464
|
+
lt git reset
|
|
465
|
+
# Error: "Remote branch not found"
|
|
466
|
+
|
|
467
|
+
# Solution: Check remote
|
|
468
|
+
git branch -r # List remote branches
|
|
469
|
+
git remote -v # Verify remote URL
|
|
470
|
+
|
|
471
|
+
# If remote missing, add it
|
|
472
|
+
git remote add origin https://github.com/user/repo.git
|
|
473
|
+
git fetch origin
|
|
474
|
+
lt git reset # Try again
|
|
475
|
+
```
|
|
476
|
+
|
|
477
|
+
### Fullstack Init Issues
|
|
478
|
+
|
|
479
|
+
#### Permission Denied
|
|
480
|
+
```bash
|
|
481
|
+
# Problem: Can't create directory
|
|
482
|
+
lt fullstack init --name MyApp --frontend angular --git false
|
|
483
|
+
# Error: "Permission denied"
|
|
484
|
+
|
|
485
|
+
# Solution: Check permissions
|
|
486
|
+
ls -la .
|
|
487
|
+
# Create in home directory or with sudo
|
|
488
|
+
cd ~
|
|
489
|
+
lt fullstack init --name MyApp --frontend angular --git false
|
|
490
|
+
```
|
|
491
|
+
|
|
492
|
+
#### Git Remote Already Exists
|
|
493
|
+
```bash
|
|
494
|
+
# Problem: Directory already has .git
|
|
495
|
+
lt fullstack init --name ExistingDir --frontend nuxt --git true
|
|
496
|
+
# Error: "Directory already initialized with git"
|
|
497
|
+
|
|
498
|
+
# Solution: Use different directory or remove .git
|
|
499
|
+
rm -rf ExistingDir/.git
|
|
500
|
+
lt fullstack init --name ExistingDir --frontend nuxt --git true
|
|
501
|
+
```
|
|
502
|
+
|
|
503
|
+
---
|
|
504
|
+
|
|
505
|
+
## Using Alias Commands
|
|
506
|
+
|
|
507
|
+
All commands have shorter aliases:
|
|
508
|
+
|
|
509
|
+
```bash
|
|
510
|
+
# Full commands
|
|
511
|
+
lt git get DEV-123
|
|
512
|
+
lt fullstack init --name MyApp --frontend angular --git true
|
|
513
|
+
|
|
514
|
+
# With aliases
|
|
515
|
+
lt git g DEV-123
|
|
516
|
+
lt full init --name MyApp --frontend angular --git true
|
|
517
|
+
```
|
|
518
|
+
|
|
519
|
+
---
|
|
520
|
+
|
|
521
|
+
## Best Practices
|
|
522
|
+
|
|
523
|
+
### Git Operations
|
|
524
|
+
1. **Always check status first**: `git status` before switching branches
|
|
525
|
+
2. **Save work before switching**: Commit or stash uncommitted changes
|
|
526
|
+
3. **Be cautious with reset**: It's destructive and irreversible
|
|
527
|
+
4. **Use meaningful branch names**: Follow team conventions (DEV-123, feature/xyz)
|
|
528
|
+
|
|
529
|
+
### Fullstack Initialization
|
|
530
|
+
1. **Choose frontend wisely**: Angular for enterprise, Nuxt for flexibility
|
|
531
|
+
2. **Enable git from start**: Use `--git true` for all real projects
|
|
532
|
+
3. **Follow naming conventions**: PascalCase for project names
|
|
533
|
+
4. **Read generated READMEs**: Each project has setup instructions
|
|
534
|
+
5. **Install dependencies immediately**: Run `npm install` after creation
|
|
535
|
+
|
|
536
|
+
---
|
|
537
|
+
|
|
538
|
+
## Reference
|
|
539
|
+
|
|
540
|
+
For detailed command syntax and all available options, see [reference.md](reference.md).
|
|
541
|
+
|
|
542
|
+
For NestJS server development examples, use the **nest-server-generator skill**.
|