tlc-claude-code 1.2.20 → 1.2.22
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/config.md +153 -158
- package/help.md +1 -0
- package/package.json +1 -1
- package/update.md +132 -0
package/config.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# /tlc:config -
|
|
1
|
+
# /tlc:config - Setup Wizard
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Interactive setup for TLC. No JSON editing required.
|
|
4
4
|
|
|
5
5
|
## Usage
|
|
6
6
|
|
|
@@ -8,229 +8,224 @@ Manage test framework settings for your project.
|
|
|
8
8
|
/tlc:config
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Process
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
### Step 1: Welcome & Auto-Detect
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
{
|
|
17
|
-
"testFrameworks": {
|
|
18
|
-
"primary": "mocha",
|
|
19
|
-
"installed": ["mocha", "chai", "sinon", "proxyquire"],
|
|
20
|
-
"run": ["mocha"]
|
|
21
|
-
},
|
|
22
|
-
"testCommand": "npm test",
|
|
23
|
-
"testDirectory": "test"
|
|
24
|
-
}
|
|
25
|
-
```
|
|
15
|
+
First, scan the project and greet the user:
|
|
26
16
|
|
|
27
|
-
|
|
17
|
+
```
|
|
18
|
+
═══════════════════════════════════════════════════════════════
|
|
19
|
+
TLC Setup Wizard
|
|
20
|
+
═══════════════════════════════════════════════════════════════
|
|
28
21
|
|
|
29
|
-
|
|
30
|
-
|-------|-------------|
|
|
31
|
-
| `primary` | Main test framework for new tests |
|
|
32
|
-
| `installed` | All test libraries available in project |
|
|
33
|
-
| `run` | Which frameworks to execute (subset of installed) |
|
|
34
|
-
| `testCommand` | Command to run tests |
|
|
35
|
-
| `testDirectory` | Where test files live |
|
|
22
|
+
Scanning your project...
|
|
36
23
|
|
|
37
|
-
|
|
24
|
+
✓ Found: package.json (Node.js project)
|
|
25
|
+
✓ Found: 12 existing test files
|
|
26
|
+
✓ Detected: Jest is installed
|
|
38
27
|
|
|
39
|
-
|
|
28
|
+
Let's configure TLC for your project!
|
|
29
|
+
```
|
|
40
30
|
|
|
41
|
-
|
|
31
|
+
### Step 2: Test Framework
|
|
42
32
|
|
|
43
|
-
|
|
44
|
-
|---------|---------|
|
|
45
|
-
| **mocha** | Test runner |
|
|
46
|
-
| **chai** | Assertions (expect, should, assert) |
|
|
47
|
-
| **sinon** | Mocks, stubs, spies |
|
|
48
|
-
| **proxyquire** | Module mocking/dependency injection |
|
|
33
|
+
Ask in plain language:
|
|
49
34
|
|
|
50
|
-
```bash
|
|
51
|
-
npm install -D mocha chai sinon proxyquire @types/mocha @types/chai @types/sinon
|
|
52
35
|
```
|
|
36
|
+
───────────────────────────────────────────────────────────────
|
|
37
|
+
Question 1 of 4: Test Framework
|
|
38
|
+
───────────────────────────────────────────────────────────────
|
|
53
39
|
|
|
54
|
-
|
|
40
|
+
Which test framework do you want to use?
|
|
55
41
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
| **pytest** | Python projects |
|
|
61
|
-
| **go test** | Go projects (built-in) |
|
|
62
|
-
| **rspec** | Ruby projects |
|
|
42
|
+
[1] Keep Jest (already installed) ← Recommended
|
|
43
|
+
[2] Switch to Mocha (TLC default)
|
|
44
|
+
[3] Use Vitest (fast, modern)
|
|
45
|
+
[4] I'm not sure - choose for me
|
|
63
46
|
|
|
64
|
-
|
|
47
|
+
Choice [1/2/3/4]: _
|
|
48
|
+
```
|
|
65
49
|
|
|
66
|
-
|
|
50
|
+
**If user chooses 4 ("not sure"):**
|
|
51
|
+
- Node.js project → Mocha
|
|
52
|
+
- Vite project → Vitest
|
|
53
|
+
- React/Next.js → Jest
|
|
54
|
+
- Python → pytest
|
|
55
|
+
- Go → go test
|
|
67
56
|
|
|
68
|
-
|
|
57
|
+
**After selection, handle installation silently:**
|
|
58
|
+
```
|
|
59
|
+
Setting up Mocha...
|
|
60
|
+
✓ Installed mocha, chai, sinon
|
|
61
|
+
✓ Created test/ folder
|
|
62
|
+
✓ Added test script to package.json
|
|
69
63
|
|
|
70
|
-
|
|
64
|
+
Done!
|
|
71
65
|
```
|
|
72
|
-
Current TLC Configuration:
|
|
73
66
|
|
|
74
|
-
|
|
75
|
-
Libraries: mocha, chai, sinon, proxyquire
|
|
76
|
-
Run Command: npm test
|
|
77
|
-
Test Directory: test/
|
|
67
|
+
### Step 3: Coverage Target
|
|
78
68
|
|
|
79
|
-
What would you like to do?
|
|
80
|
-
1) View/edit frameworks to run
|
|
81
|
-
2) Add a new framework
|
|
82
|
-
3) Change primary framework
|
|
83
|
-
4) Reset to defaults
|
|
84
69
|
```
|
|
70
|
+
───────────────────────────────────────────────────────────────
|
|
71
|
+
Question 2 of 4: Code Coverage
|
|
72
|
+
───────────────────────────────────────────────────────────────
|
|
73
|
+
|
|
74
|
+
How thorough should testing be?
|
|
85
75
|
|
|
86
|
-
|
|
76
|
+
[1] Relaxed (60%) - Good for prototypes
|
|
77
|
+
[2] Standard (80%) - Recommended for most projects
|
|
78
|
+
[3] Strict (95%) - For critical systems
|
|
79
|
+
[4] Skip coverage checks
|
|
87
80
|
|
|
88
|
-
|
|
81
|
+
Choice [1/2/3/4]: _
|
|
82
|
+
```
|
|
89
83
|
|
|
90
|
-
|
|
91
|
-
2. **Detect test files** patterns in use
|
|
92
|
-
3. **Propose configuration** based on findings
|
|
84
|
+
### Step 4: Team or Solo
|
|
93
85
|
|
|
94
86
|
```
|
|
95
|
-
|
|
87
|
+
───────────────────────────────────────────────────────────────
|
|
88
|
+
Question 3 of 4: Working Style
|
|
89
|
+
───────────────────────────────────────────────────────────────
|
|
90
|
+
|
|
91
|
+
Are you working alone or with a team?
|
|
96
92
|
|
|
97
|
-
|
|
98
|
-
-
|
|
99
|
-
- 47 test files using Jest patterns
|
|
93
|
+
[1] Solo - Just me
|
|
94
|
+
[2] Team - Multiple people on this project
|
|
100
95
|
|
|
101
|
-
|
|
102
|
-
1) Keep Jest as primary (detected)
|
|
103
|
-
2) Add mocha alongside Jest
|
|
104
|
-
3) Switch to mocha (TLC default)
|
|
105
|
-
4) Custom configuration
|
|
96
|
+
Choice [1/2]: _
|
|
106
97
|
```
|
|
107
98
|
|
|
108
|
-
|
|
99
|
+
**If Team selected:**
|
|
100
|
+
```
|
|
101
|
+
Great! Team mode enables:
|
|
102
|
+
• Task claiming (prevent duplicate work)
|
|
103
|
+
• @mentions in plans
|
|
104
|
+
• Team status dashboard
|
|
109
105
|
|
|
110
|
-
|
|
106
|
+
Your team name (from git): alice
|
|
111
107
|
|
|
108
|
+
Is this correct? [Y/n]: _
|
|
112
109
|
```
|
|
113
|
-
Multiple test frameworks detected:
|
|
114
|
-
- mocha: test/unit/*.test.js (23 files)
|
|
115
|
-
- jest: __tests__/*.spec.js (15 files)
|
|
116
110
|
|
|
117
|
-
|
|
118
|
-
[x] mocha - run these tests
|
|
119
|
-
[x] jest - run these tests
|
|
120
|
-
[ ] Run all frameworks
|
|
111
|
+
### Step 5: Summary & Confirm
|
|
121
112
|
|
|
122
|
-
Test commands:
|
|
123
|
-
mocha: npx mocha 'test/**/*.test.js'
|
|
124
|
-
jest: npx jest
|
|
125
|
-
combined: npm test (runs both)
|
|
126
113
|
```
|
|
114
|
+
───────────────────────────────────────────────────────────────
|
|
115
|
+
Setup Summary
|
|
116
|
+
───────────────────────────────────────────────────────────────
|
|
127
117
|
|
|
128
|
-
|
|
118
|
+
Test Framework: Mocha + Chai + Sinon
|
|
119
|
+
Coverage Target: 80%
|
|
120
|
+
Team Mode: Enabled (you: @alice)
|
|
121
|
+
Test Folder: test/
|
|
129
122
|
|
|
130
|
-
|
|
123
|
+
Apply these settings? [Y/n]: _
|
|
124
|
+
```
|
|
131
125
|
|
|
132
|
-
|
|
133
|
-
{
|
|
134
|
-
"testFrameworks": {
|
|
135
|
-
"primary": "mocha",
|
|
136
|
-
"installed": ["mocha", "chai", "sinon", "proxyquire", "jest"],
|
|
137
|
-
"run": ["mocha", "jest"]
|
|
138
|
-
},
|
|
139
|
-
"commands": {
|
|
140
|
-
"mocha": "npx mocha 'test/**/*.test.js'",
|
|
141
|
-
"jest": "npx jest",
|
|
142
|
-
"all": "npm test"
|
|
143
|
-
},
|
|
144
|
-
"testDirectory": "test",
|
|
145
|
-
"patterns": {
|
|
146
|
-
"mocha": "test/**/*.test.js",
|
|
147
|
-
"jest": "__tests__/**/*.spec.js"
|
|
148
|
-
}
|
|
149
|
-
}
|
|
126
|
+
**On confirm:**
|
|
150
127
|
```
|
|
128
|
+
═══════════════════════════════════════════════════════════════
|
|
129
|
+
✓ TLC Configured!
|
|
130
|
+
═══════════════════════════════════════════════════════════════
|
|
151
131
|
|
|
152
|
-
|
|
132
|
+
You're all set. Here's what to do next:
|
|
153
133
|
|
|
154
|
-
|
|
134
|
+
/tlc See project status
|
|
135
|
+
/tlc:build Build current phase (writes tests first)
|
|
136
|
+
/tlc:status Check if tests are passing
|
|
155
137
|
|
|
156
|
-
|
|
157
|
-
{
|
|
158
|
-
"scripts": {
|
|
159
|
-
"test": "npm run test:mocha && npm run test:jest",
|
|
160
|
-
"test:mocha": "mocha 'test/**/*.test.js'",
|
|
161
|
-
"test:jest": "jest",
|
|
162
|
-
"test:watch": "mocha --watch 'test/**/*.test.js'"
|
|
163
|
-
}
|
|
164
|
-
}
|
|
138
|
+
Happy coding!
|
|
165
139
|
```
|
|
166
140
|
|
|
167
|
-
##
|
|
141
|
+
## Reconfigure
|
|
142
|
+
|
|
143
|
+
If `.tlc.json` already exists, show current settings first:
|
|
168
144
|
|
|
169
145
|
```
|
|
170
|
-
|
|
146
|
+
═══════════════════════════════════════════════════════════════
|
|
147
|
+
Current TLC Settings
|
|
148
|
+
═══════════════════════════════════════════════════════════════
|
|
171
149
|
|
|
172
|
-
|
|
150
|
+
Test Framework: Mocha
|
|
151
|
+
Coverage Target: 80%
|
|
152
|
+
Team Mode: Off
|
|
173
153
|
|
|
174
|
-
What would you like to
|
|
175
|
-
> 2) Add a new framework
|
|
154
|
+
What would you like to change?
|
|
176
155
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
156
|
+
[1] Test framework
|
|
157
|
+
[2] Coverage target
|
|
158
|
+
[3] Enable/disable team mode
|
|
159
|
+
[4] Reset everything
|
|
160
|
+
[5] Exit (keep current settings)
|
|
181
161
|
|
|
182
|
-
|
|
162
|
+
Choice [1/2/3/4/5]: _
|
|
163
|
+
```
|
|
183
164
|
|
|
184
|
-
|
|
185
|
-
npm install -D jest @types/jest
|
|
165
|
+
## Advanced Mode
|
|
186
166
|
|
|
187
|
-
|
|
188
|
-
> __tests__/
|
|
167
|
+
For power users who want to edit JSON directly:
|
|
189
168
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
169
|
+
```
|
|
170
|
+
/tlc:config --advanced
|
|
171
|
+
```
|
|
193
172
|
|
|
194
|
-
|
|
195
|
-
1) All frameworks (mocha + jest)
|
|
196
|
-
2) Only mocha
|
|
197
|
-
3) Only jest
|
|
198
|
-
4) Let me choose per-run
|
|
173
|
+
Shows the raw `.tlc.json` and allows direct editing. But this is hidden from the main flow.
|
|
199
174
|
|
|
200
|
-
|
|
175
|
+
## Auto-Detection Rules
|
|
201
176
|
|
|
202
|
-
|
|
203
|
-
|
|
177
|
+
| What We Find | What We Set Up |
|
|
178
|
+
|--------------|----------------|
|
|
179
|
+
| `jest` in package.json | Jest as primary |
|
|
180
|
+
| `vitest` in package.json | Vitest as primary |
|
|
181
|
+
| `mocha` in package.json | Mocha as primary |
|
|
182
|
+
| `pytest` in requirements.txt | pytest as primary |
|
|
183
|
+
| Vite project (vite.config) | Suggest Vitest |
|
|
184
|
+
| React/Next.js project | Suggest Jest |
|
|
185
|
+
| Nothing detected | Default to Mocha |
|
|
204
186
|
|
|
205
|
-
##
|
|
187
|
+
## Silent Installation
|
|
188
|
+
|
|
189
|
+
When setting up a framework, install everything needed without asking:
|
|
190
|
+
|
|
191
|
+
**Mocha:**
|
|
192
|
+
```bash
|
|
193
|
+
npm install -D mocha chai sinon proxyquire
|
|
194
|
+
```
|
|
206
195
|
|
|
196
|
+
**Jest:**
|
|
197
|
+
```bash
|
|
198
|
+
npm install -D jest
|
|
207
199
|
```
|
|
208
|
-
> /tlc:config
|
|
209
200
|
|
|
210
|
-
|
|
201
|
+
**Vitest:**
|
|
202
|
+
```bash
|
|
203
|
+
npm install -D vitest
|
|
204
|
+
```
|
|
211
205
|
|
|
212
|
-
|
|
206
|
+
**pytest:**
|
|
207
|
+
```bash
|
|
208
|
+
pip install pytest pytest-cov pytest-mock
|
|
209
|
+
```
|
|
213
210
|
|
|
214
|
-
|
|
215
|
-
2) Add mocha for new tests, keep Jest for existing
|
|
216
|
-
3) Migrate to mocha (will need to convert tests)
|
|
211
|
+
## Error Recovery
|
|
217
212
|
|
|
218
|
-
|
|
213
|
+
If something goes wrong:
|
|
219
214
|
|
|
220
|
-
|
|
215
|
+
```
|
|
216
|
+
⚠️ Couldn't install mocha automatically.
|
|
221
217
|
|
|
222
|
-
|
|
223
|
-
|
|
218
|
+
Try running this manually:
|
|
219
|
+
npm install -D mocha chai sinon proxyquire
|
|
224
220
|
|
|
225
|
-
|
|
226
|
-
npm test - runs both
|
|
227
|
-
npm run test:new - runs mocha only
|
|
228
|
-
npm run test:legacy - runs jest only
|
|
221
|
+
Then run /tlc:config again.
|
|
229
222
|
```
|
|
230
223
|
|
|
231
224
|
## Notes
|
|
232
225
|
|
|
233
|
-
-
|
|
234
|
-
-
|
|
235
|
-
-
|
|
236
|
-
-
|
|
226
|
+
- Never show JSON to beginners
|
|
227
|
+
- Always provide numbered choices
|
|
228
|
+
- Auto-detect as much as possible
|
|
229
|
+
- Install packages automatically
|
|
230
|
+
- Provide sensible defaults
|
|
231
|
+
- Explain what each choice means in plain English
|
package/help.md
CHANGED
|
@@ -61,6 +61,7 @@ Launches the visual dashboard. Detects where you are, shows what's next.
|
|
|
61
61
|
| `/tlc:new-milestone` | Start next version |
|
|
62
62
|
| `/tlc:bug` | Log a bug or feedback |
|
|
63
63
|
| `/tlc:server` | Start dashboard server for QA |
|
|
64
|
+
| `/tlc:update` | Update TLC to latest version |
|
|
64
65
|
|
|
65
66
|
### Multi-User Collaboration
|
|
66
67
|
|
package/package.json
CHANGED
package/update.md
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# /tlc:update - Update TLC
|
|
2
|
+
|
|
3
|
+
Update TLC to the latest version.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
/tlc:update
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Process
|
|
12
|
+
|
|
13
|
+
### Step 1: Check Current Version
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
═══════════════════════════════════════════════════════════════
|
|
17
|
+
TLC Update
|
|
18
|
+
═══════════════════════════════════════════════════════════════
|
|
19
|
+
|
|
20
|
+
Current version: v1.2.20
|
|
21
|
+
Checking for updates...
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### Step 2: Check for Updates
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
# Get latest version from npm
|
|
28
|
+
latestVersion=$(npm show tlc-claude-code version)
|
|
29
|
+
currentVersion=$(cat ~/.claude/commands/tlc/package.json | jq -r '.version')
|
|
30
|
+
|
|
31
|
+
if [ "$latestVersion" = "$currentVersion" ]; then
|
|
32
|
+
echo "✓ You're on the latest version (v$currentVersion)"
|
|
33
|
+
exit 0
|
|
34
|
+
fi
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Step 3: Show What's New
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
New version available: v1.2.21
|
|
41
|
+
|
|
42
|
+
What's new:
|
|
43
|
+
• Setup wizard - no more JSON editing
|
|
44
|
+
• GitHub Desktop recommended for beginners
|
|
45
|
+
• Fixed wiki links
|
|
46
|
+
|
|
47
|
+
Update now? [Y/n]: _
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Step 4: Update
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
Updating TLC...
|
|
54
|
+
|
|
55
|
+
npx tlc-claude-code@latest --global
|
|
56
|
+
|
|
57
|
+
✓ Updated to v1.2.21
|
|
58
|
+
|
|
59
|
+
Restart Claude Code to load the new commands.
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Step 5: Show Changes (Optional)
|
|
63
|
+
|
|
64
|
+
If user wants to see full changelog:
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
Show full changelog? [y/N]: _
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
If yes, fetch and display:
|
|
71
|
+
```
|
|
72
|
+
v1.2.21 (2024-01-30)
|
|
73
|
+
• Setup wizard for configuration
|
|
74
|
+
• Beginner-friendly docs
|
|
75
|
+
|
|
76
|
+
v1.2.20 (2024-01-30)
|
|
77
|
+
• Fixed wiki link format
|
|
78
|
+
|
|
79
|
+
v1.2.19 (2024-01-30)
|
|
80
|
+
• GitHub Desktop in noob guide
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Auto-Update Check
|
|
84
|
+
|
|
85
|
+
When running `/tlc`, check for updates in background:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
# Silent check (don't block)
|
|
89
|
+
latestVersion=$(npm show tlc-claude-code version 2>/dev/null)
|
|
90
|
+
|
|
91
|
+
if [ "$latestVersion" != "$currentVersion" ]; then
|
|
92
|
+
echo "💡 TLC update available: v$latestVersion (you have v$currentVersion)"
|
|
93
|
+
echo " Run /tlc:update to upgrade"
|
|
94
|
+
fi
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Force Update
|
|
98
|
+
|
|
99
|
+
Skip confirmation:
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
/tlc:update --yes
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Specific Version
|
|
106
|
+
|
|
107
|
+
Install a specific version:
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
/tlc:update --version 1.2.15
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Offline / No Update
|
|
114
|
+
|
|
115
|
+
```
|
|
116
|
+
═══════════════════════════════════════════════════════════════
|
|
117
|
+
TLC Update
|
|
118
|
+
═══════════════════════════════════════════════════════════════
|
|
119
|
+
|
|
120
|
+
Current version: v1.2.20
|
|
121
|
+
|
|
122
|
+
⚠️ Couldn't check for updates (offline or npm unreachable)
|
|
123
|
+
|
|
124
|
+
To update manually:
|
|
125
|
+
npx tlc-claude-code@latest --global
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Notes
|
|
129
|
+
|
|
130
|
+
- Updates install globally via npm
|
|
131
|
+
- Requires restart of Claude Code to load new commands
|
|
132
|
+
- Check npm for latest: https://www.npmjs.com/package/tlc-claude-code
|