tlc-claude-code 1.8.0 → 1.8.2
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/.claude/commands/tlc/dashboard.md +138 -0
- package/CLAUDE.md +1 -0
- package/dashboard-web/dist/assets/index-B1I_joSL.js +393 -0
- package/dashboard-web/dist/assets/index-B1I_joSL.js.map +1 -0
- package/dashboard-web/dist/assets/index-Trhg1C1Y.css +1 -0
- package/dashboard-web/dist/index.html +18 -0
- package/docker-compose.dev.yml +3 -22
- package/package.json +4 -2
- package/server/index.js +22 -1
- package/server/lib/output-schemas.test.js +15 -1
- package/server/setup.sh +271 -271
- package/templates/docker-compose.tlc.yml +38 -0
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# /tlc:dashboard - TLC Dashboard Container
|
|
2
|
+
|
|
3
|
+
Manage the TLC dashboard as a standalone Docker container in any project.
|
|
4
|
+
|
|
5
|
+
## Instructions for Claude
|
|
6
|
+
|
|
7
|
+
### Step 1: Parse Arguments
|
|
8
|
+
|
|
9
|
+
The user may pass a subcommand:
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
/tlc:dashboard → start (default)
|
|
13
|
+
/tlc:dashboard stop → stop
|
|
14
|
+
/tlc:dashboard rebuild → rebuild with latest TLC
|
|
15
|
+
/tlc:dashboard logs → tail logs
|
|
16
|
+
/tlc:dashboard status → show container status
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### Step 2: Ensure docker-compose.tlc.yml Exists
|
|
20
|
+
|
|
21
|
+
Check if `docker-compose.tlc.yml` exists in the project root.
|
|
22
|
+
|
|
23
|
+
**If it does NOT exist:**
|
|
24
|
+
|
|
25
|
+
1. Find the TLC package directory:
|
|
26
|
+
```bash
|
|
27
|
+
TLC_DIR=$(node -e "try { console.log(require.resolve('tlc-claude-code/package.json').replace('/package.json','')) } catch(e) { console.log('') }")
|
|
28
|
+
```
|
|
29
|
+
If empty, try global:
|
|
30
|
+
```bash
|
|
31
|
+
TLC_DIR=$(npm root -g)/tlc-claude-code
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
2. Copy the template:
|
|
35
|
+
```bash
|
|
36
|
+
cp "$TLC_DIR/templates/docker-compose.tlc.yml" ./docker-compose.tlc.yml
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
3. If template not found, generate it inline (see Template section below).
|
|
40
|
+
|
|
41
|
+
4. Tell the user:
|
|
42
|
+
```
|
|
43
|
+
Created docker-compose.tlc.yml in your project root.
|
|
44
|
+
This file is YOURS — customize it freely. TLC will never overwrite it.
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
**If it already exists:** Use it as-is. Never modify the user's file.
|
|
48
|
+
|
|
49
|
+
### Step 3: Execute Subcommand
|
|
50
|
+
|
|
51
|
+
**start (default):**
|
|
52
|
+
```bash
|
|
53
|
+
docker compose -f docker-compose.tlc.yml up -d
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Then show:
|
|
57
|
+
```
|
|
58
|
+
TLC Dashboard running at http://localhost:3147
|
|
59
|
+
|
|
60
|
+
Stop: /tlc:dashboard stop
|
|
61
|
+
Logs: /tlc:dashboard logs
|
|
62
|
+
Rebuild: /tlc:dashboard rebuild
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
**stop:**
|
|
66
|
+
```bash
|
|
67
|
+
docker compose -f docker-compose.tlc.yml down
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**rebuild:**
|
|
71
|
+
```bash
|
|
72
|
+
docker compose -f docker-compose.tlc.yml build --no-cache
|
|
73
|
+
docker compose -f docker-compose.tlc.yml up -d
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**logs:**
|
|
77
|
+
```bash
|
|
78
|
+
docker compose -f docker-compose.tlc.yml logs -f --tail 50 dashboard
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
**status:**
|
|
82
|
+
```bash
|
|
83
|
+
docker compose -f docker-compose.tlc.yml ps
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Step 4: Verify
|
|
87
|
+
|
|
88
|
+
After `start` or `rebuild`, check the dashboard is serving the React SPA:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
# Wait a few seconds for startup
|
|
92
|
+
sleep 5
|
|
93
|
+
curl -s http://localhost:3147 | head -5
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
If it contains `<div id="root">` → React SPA is running.
|
|
97
|
+
If it contains the old static HTML → warn the user that TLC needs updating.
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Template
|
|
102
|
+
|
|
103
|
+
The `docker-compose.tlc.yml` template contains only the dashboard service:
|
|
104
|
+
|
|
105
|
+
```yaml
|
|
106
|
+
# TLC Dashboard
|
|
107
|
+
# This file is yours — customize freely. TLC will never overwrite it.
|
|
108
|
+
# Docs: https://github.com/jurgencalleja/TLC/wiki/devserver
|
|
109
|
+
|
|
110
|
+
services:
|
|
111
|
+
dashboard:
|
|
112
|
+
image: node:20-alpine
|
|
113
|
+
container_name: tlc-dashboard
|
|
114
|
+
working_dir: /project
|
|
115
|
+
command: >
|
|
116
|
+
sh -c "
|
|
117
|
+
npm install -g tlc-claude-code@latest &&
|
|
118
|
+
TLC_DIR=$$(npm root -g)/tlc-claude-code &&
|
|
119
|
+
cd /project && node $$TLC_DIR/server/index.js
|
|
120
|
+
"
|
|
121
|
+
environment:
|
|
122
|
+
- TLC_PORT=3147
|
|
123
|
+
- TLC_AUTH=false
|
|
124
|
+
ports:
|
|
125
|
+
- "${DASHBOARD_PORT:-3147}:3147"
|
|
126
|
+
volumes:
|
|
127
|
+
- .:/project
|
|
128
|
+
restart: on-failure
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Important Notes
|
|
134
|
+
|
|
135
|
+
- The compose file belongs to the USER. Never overwrite or modify it.
|
|
136
|
+
- If the user has customized ports, environment, or volumes — respect that.
|
|
137
|
+
- The dashboard serves the React SPA from `dashboard-web/dist/` (included in npm package since v1.8.1).
|
|
138
|
+
- This is independent from `/tlc:start` which manages the full dev environment (app, db, storage).
|
package/CLAUDE.md
CHANGED
|
@@ -96,6 +96,7 @@ Every TLC command is defined in `.claude/commands/tlc/*.md`. When you invoke a c
|
|
|
96
96
|
| "issues", "import issues" | `/tlc:issues` | Manual issue tracking |
|
|
97
97
|
| "checklist", "full check" | `/tlc:checklist` | Ad-hoc project review |
|
|
98
98
|
| "quick task", "small fix" | `/tlc:quick` | Coding without tests |
|
|
99
|
+
| "dashboard", "start dashboard", "dashboard container" | `/tlc:dashboard` | Running docker-compose manually |
|
|
99
100
|
|
|
100
101
|
### Before ANY work — run `/tlc`
|
|
101
102
|
|