apero-kit-cli 1.4.0 → 1.4.1

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.
@@ -7,25 +7,203 @@ import { CLI_ROOT, TEMPLATES_DIR, resolveSource } from '../utils/paths.js';
7
7
 
8
8
  const PORT = 3457;
9
9
 
10
+ // Bilingual content
11
+ const i18n = {
12
+ en: {
13
+ title: 'Apero Kit CLI',
14
+ subtitle: 'Scaffold AI agent projects with pre-configured kits for Claude Code',
15
+ overview: 'Overview',
16
+ quickstart: 'Quick Start',
17
+ agents: 'Agents',
18
+ commands: 'Commands',
19
+ skills: 'Skills',
20
+ hooks: 'Hooks',
21
+ workflows: 'Workflows',
22
+ resources: 'Resources',
23
+ github: 'GitHub',
24
+ npm: 'npm Package',
25
+
26
+ // Overview
27
+ whatIs: 'What is Apero Kit?',
28
+ whatIsDesc: 'Apero Kit CLI helps you quickly set up an AI agent project with pre-configured components:',
29
+ agentsDesc: 'AI "experts" with distinct roles: debugger, planner, developer, reviewer...',
30
+ commandsDesc: 'Execution commands like /fix, /code, /plan, /test with multiple variants',
31
+ skillsDesc: 'Deep knowledge bases for frontend, backend, database, devops...',
32
+ hooksDesc: 'Automation scripts that run on events: format code, check security...',
33
+ folderStructure: 'Folder Structure',
34
+ howItWorks: 'How It Works',
35
+ tip: 'Tip',
36
+ tipText: 'Use the left menu to learn more about each component.',
37
+
38
+ // Quick Start
39
+ installation: 'Installation',
40
+ createProject: 'Create New Project',
41
+ availableKits: 'Available Kits',
42
+ commonCommands: 'Common Commands',
43
+ existingProject: 'Existing Project',
44
+ done: 'Done',
45
+ doneText: 'You are ready to use Claude Code with pre-configured agents and commands.',
46
+
47
+ // Agents
48
+ agentsTitle: '18 AI experts with distinct roles',
49
+ agentWhat: 'What is an Agent?',
50
+ agentWhatDesc: 'An Agent is a "persona" that the AI will embody, with specialized expertise and working methods.',
51
+ development: 'Development',
52
+ researchSearch: 'Research & Search',
53
+ designContent: 'Design & Content',
54
+ managementSupport: 'Management & Support',
55
+ fileFormat: 'Agent File Format',
56
+ usage: 'Usage',
57
+
58
+ // Commands
59
+ commandsTitle: '96+ execution commands with multiple variants',
60
+ commandWhat: 'What is a Command?',
61
+ commandWhatDesc: 'A Command is a pre-defined "workflow" for each type of task.',
62
+ fixCommands: 'Fix Commands',
63
+ planCommands: 'Plan Commands',
64
+ codeCommands: 'Code Commands',
65
+ otherCommands: 'Other Commands',
66
+
67
+ // Skills
68
+ skillsTitle: '57 deep knowledge bases',
69
+ skillWhat: 'What is a Skill?',
70
+ skillWhatDesc: 'A Skill is a "knowledge package" loaded on-demand for specific domains.',
71
+ frontend: 'Frontend',
72
+ backend: 'Backend',
73
+ devops: 'DevOps',
74
+ testingDebug: 'Testing & Debug',
75
+ documentation: 'Documentation',
76
+
77
+ // Hooks
78
+ hooksTitle: '15+ automation scripts',
79
+ hookWhat: 'What is a Hook?',
80
+ hookWhatDesc: 'A Hook is a script that runs automatically when an event occurs (edit file, start session, etc.)',
81
+ hookTypes: 'Hook Types',
82
+ notificationHooks: 'Notification Hooks',
83
+ securityHooks: 'Security Hooks',
84
+
85
+ // Workflows
86
+ workflowsTitle: 'Multi-step collaboration processes',
87
+ workflowWhat: 'What is a Workflow?',
88
+ workflowWhatDesc: 'A Workflow is a multi-step process with coordination between agents.',
89
+ primaryWorkflow: 'Primary Workflow',
90
+ keyPrinciples: 'Key Principles',
91
+
92
+ // Usage examples
93
+ example: 'Example',
94
+ output: 'Output',
95
+ when: 'When to use',
96
+ result: 'Result'
97
+ },
98
+ vi: {
99
+ title: 'Apero Kit CLI',
100
+ subtitle: 'Công cụ tạo dự án AI agent với các kit đã cấu hình sẵn cho Claude Code',
101
+ overview: 'Tổng quan',
102
+ quickstart: 'Bắt đầu nhanh',
103
+ agents: 'Agents',
104
+ commands: 'Commands',
105
+ skills: 'Skills',
106
+ hooks: 'Hooks',
107
+ workflows: 'Workflows',
108
+ resources: 'Tài nguyên',
109
+ github: 'GitHub',
110
+ npm: 'npm Package',
111
+
112
+ // Overview
113
+ whatIs: 'Apero Kit là gì?',
114
+ whatIsDesc: 'Apero Kit CLI giúp bạn nhanh chóng thiết lập một dự án AI agent với các thành phần đã được cấu hình sẵn:',
115
+ agentsDesc: 'Các "chuyên gia AI" với vai trò riêng biệt: debugger, planner, developer, reviewer...',
116
+ commandsDesc: 'Các lệnh thực thi như /fix, /code, /plan, /test với nhiều biến thể',
117
+ skillsDesc: 'Kho kiến thức chuyên sâu về frontend, backend, database, devops...',
118
+ hooksDesc: 'Scripts tự động chạy khi có sự kiện: format code, check security...',
119
+ folderStructure: 'Cấu trúc thư mục',
120
+ howItWorks: 'Cách hoạt động',
121
+ tip: 'Mẹo',
122
+ tipText: 'Sử dụng menu bên trái để tìm hiểu chi tiết về từng thành phần.',
123
+
124
+ // Quick Start
125
+ installation: 'Cài đặt',
126
+ createProject: 'Tạo project mới',
127
+ availableKits: 'Các kit có sẵn',
128
+ commonCommands: 'Các lệnh thường dùng',
129
+ existingProject: 'Project có sẵn',
130
+ done: 'Xong',
131
+ doneText: 'Bạn đã sẵn sàng sử dụng Claude Code với các agents và commands đã được cấu hình.',
132
+
133
+ // Agents
134
+ agentsTitle: '18 chuyên gia AI với vai trò riêng biệt',
135
+ agentWhat: 'Agent là gì?',
136
+ agentWhatDesc: 'Agent là một "persona" mà AI sẽ đóng vai, với chuyên môn và phương pháp làm việc riêng.',
137
+ development: 'Phát triển',
138
+ researchSearch: 'Nghiên cứu & Tìm kiếm',
139
+ designContent: 'Thiết kế & Nội dung',
140
+ managementSupport: 'Quản lý & Hỗ trợ',
141
+ fileFormat: 'Định dạng file Agent',
142
+ usage: 'Cách dùng',
143
+
144
+ // Commands
145
+ commandsTitle: '96+ lệnh thực thi với nhiều biến thể',
146
+ commandWhat: 'Command là gì?',
147
+ commandWhatDesc: 'Command là các "workflow" được định nghĩa sẵn cho từng loại task.',
148
+ fixCommands: 'Lệnh Fix',
149
+ planCommands: 'Lệnh Plan',
150
+ codeCommands: 'Lệnh Code',
151
+ otherCommands: 'Lệnh khác',
152
+
153
+ // Skills
154
+ skillsTitle: '57 kho kiến thức chuyên sâu',
155
+ skillWhat: 'Skill là gì?',
156
+ skillWhatDesc: 'Skill là các "knowledge package" được load khi cần cho từng domain cụ thể.',
157
+ frontend: 'Frontend',
158
+ backend: 'Backend',
159
+ devops: 'DevOps',
160
+ testingDebug: 'Testing & Debug',
161
+ documentation: 'Tài liệu',
162
+
163
+ // Hooks
164
+ hooksTitle: '15+ automation scripts',
165
+ hookWhat: 'Hook là gì?',
166
+ hookWhatDesc: 'Hook là scripts tự động chạy khi có sự kiện (edit file, start session, etc.)',
167
+ hookTypes: 'Các loại Hook',
168
+ notificationHooks: 'Hook thông báo',
169
+ securityHooks: 'Hook bảo mật',
170
+
171
+ // Workflows
172
+ workflowsTitle: 'Quy trình nhiều bước với sự phối hợp',
173
+ workflowWhat: 'Workflow là gì?',
174
+ workflowWhatDesc: 'Workflow là quy trình nhiều bước với sự phối hợp giữa các agents.',
175
+ primaryWorkflow: 'Quy trình chính',
176
+ keyPrinciples: 'Nguyên tắc chính',
177
+
178
+ // Usage examples
179
+ example: 'Ví dụ',
180
+ output: 'Kết quả',
181
+ when: 'Khi nào dùng',
182
+ result: 'Kết quả'
183
+ }
184
+ };
185
+
10
186
  /**
11
187
  * Generate help page HTML
12
188
  */
13
- function generateHelpPage(section = 'overview', source) {
189
+ function generateHelpPage(section = 'overview', lang = 'vi', source) {
190
+ const t = i18n[lang] || i18n.vi;
191
+
14
192
  const sections = {
15
- overview: generateOverview(source),
16
- agents: generateAgentsSection(source),
17
- commands: generateCommandsSection(source),
18
- skills: generateSkillsSection(source),
19
- hooks: generateHooksSection(source),
20
- workflows: generateWorkflowsSection(source),
21
- quickstart: generateQuickstartSection()
193
+ overview: generateOverview(t, lang),
194
+ quickstart: generateQuickstartSection(t, lang),
195
+ agents: generateAgentsSection(t, lang),
196
+ commands: generateCommandsSection(t, lang),
197
+ skills: generateSkillsSection(t, lang),
198
+ hooks: generateHooksSection(t, lang),
199
+ workflows: generateWorkflowsSection(t, lang)
22
200
  };
23
201
 
24
202
  const content = sections[section] || sections.overview;
25
- const nav = generateNav(section);
203
+ const nav = generateNav(section, t, lang);
26
204
 
27
205
  return `<!DOCTYPE html>
28
- <html lang="en">
206
+ <html lang="${lang}">
29
207
  <head>
30
208
  <meta charset="UTF-8">
31
209
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
@@ -45,6 +223,8 @@ function generateHelpPage(section = 'overview', source) {
45
223
  --error: #f85149;
46
224
  --purple: #a371f7;
47
225
  --pink: #db61a2;
226
+ --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
227
+ --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
48
228
  }
49
229
 
50
230
  * { box-sizing: border-box; margin: 0; padding: 0; }
@@ -58,9 +238,40 @@ function generateHelpPage(section = 'overview', source) {
58
238
  min-height: 100vh;
59
239
  }
60
240
 
241
+ /* Language Toggle */
242
+ .lang-toggle {
243
+ display: flex;
244
+ align-items: center;
245
+ background: var(--bg-tertiary);
246
+ border-radius: 20px;
247
+ padding: 4px;
248
+ margin: 16px 20px;
249
+ border: 1px solid var(--border);
250
+ }
251
+
252
+ .lang-toggle a {
253
+ padding: 6px 16px;
254
+ border-radius: 16px;
255
+ font-size: 13px;
256
+ font-weight: 600;
257
+ text-decoration: none;
258
+ transition: all 0.2s;
259
+ color: var(--text-muted);
260
+ }
261
+
262
+ .lang-toggle a:hover {
263
+ color: var(--text);
264
+ }
265
+
266
+ .lang-toggle a.active {
267
+ background: var(--gradient-1);
268
+ color: white;
269
+ box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
270
+ }
271
+
61
272
  /* Sidebar */
62
273
  .sidebar {
63
- width: 260px;
274
+ width: 280px;
64
275
  background: var(--bg-secondary);
65
276
  border-right: 1px solid var(--border);
66
277
  position: fixed;
@@ -70,23 +281,22 @@ function generateHelpPage(section = 'overview', source) {
70
281
  }
71
282
 
72
283
  .logo {
73
- padding: 0 20px 24px;
284
+ padding: 0 20px 20px;
74
285
  border-bottom: 1px solid var(--border);
75
- margin-bottom: 16px;
76
286
  }
77
287
 
78
288
  .logo h1 {
79
- font-size: 20px;
289
+ font-size: 22px;
80
290
  color: var(--accent);
81
291
  display: flex;
82
292
  align-items: center;
83
- gap: 8px;
293
+ gap: 10px;
84
294
  }
85
295
 
86
296
  .logo p {
87
297
  font-size: 12px;
88
298
  color: var(--text-muted);
89
- margin-top: 4px;
299
+ margin-top: 6px;
90
300
  }
91
301
 
92
302
  .nav-section {
@@ -99,8 +309,8 @@ function generateHelpPage(section = 'overview', source) {
99
309
  text-transform: uppercase;
100
310
  letter-spacing: 1px;
101
311
  color: var(--text-muted);
102
- padding: 0 8px;
103
- margin-bottom: 8px;
312
+ padding: 12px 8px 8px;
313
+ margin-bottom: 4px;
104
314
  }
105
315
 
106
316
  .nav-section a {
@@ -110,7 +320,7 @@ function generateHelpPage(section = 'overview', source) {
110
320
  padding: 10px 12px;
111
321
  color: var(--text-muted);
112
322
  text-decoration: none;
113
- border-radius: 6px;
323
+ border-radius: 8px;
114
324
  font-size: 14px;
115
325
  transition: all 0.15s;
116
326
  }
@@ -123,6 +333,7 @@ function generateHelpPage(section = 'overview', source) {
123
333
  .nav-section a.active {
124
334
  background: rgba(88, 166, 255, 0.15);
125
335
  color: var(--accent);
336
+ font-weight: 500;
126
337
  }
127
338
 
128
339
  .nav-section a .icon {
@@ -143,7 +354,7 @@ function generateHelpPage(section = 'overview', source) {
143
354
  /* Main content */
144
355
  .main {
145
356
  flex: 1;
146
- margin-left: 260px;
357
+ margin-left: 280px;
147
358
  padding: 40px 60px;
148
359
  max-width: 1000px;
149
360
  }
@@ -168,16 +379,16 @@ function generateHelpPage(section = 'overview', source) {
168
379
 
169
380
  .main h2 {
170
381
  font-size: 22px;
171
- margin: 32px 0 16px;
382
+ margin: 36px 0 16px;
172
383
  padding-bottom: 8px;
173
384
  border-bottom: 1px solid var(--border);
174
385
  display: flex;
175
386
  align-items: center;
176
- gap: 8px;
387
+ gap: 10px;
177
388
  }
178
389
 
179
390
  .main h3 {
180
- font-size: 18px;
391
+ font-size: 17px;
181
392
  margin: 24px 0 12px;
182
393
  color: var(--text);
183
394
  }
@@ -190,9 +401,9 @@ function generateHelpPage(section = 'overview', source) {
190
401
  /* Cards */
191
402
  .cards {
192
403
  display: grid;
193
- grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
404
+ grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
194
405
  gap: 16px;
195
- margin: 24px 0;
406
+ margin: 20px 0;
196
407
  }
197
408
 
198
409
  .card {
@@ -206,10 +417,11 @@ function generateHelpPage(section = 'overview', source) {
206
417
  .card:hover {
207
418
  border-color: var(--accent);
208
419
  transform: translateY(-2px);
420
+ box-shadow: 0 4px 12px rgba(0,0,0,0.3);
209
421
  }
210
422
 
211
423
  .card h4 {
212
- font-size: 16px;
424
+ font-size: 15px;
213
425
  margin-bottom: 8px;
214
426
  display: flex;
215
427
  align-items: center;
@@ -225,31 +437,31 @@ function generateHelpPage(section = 'overview', source) {
225
437
  .card .tag {
226
438
  display: inline-block;
227
439
  background: var(--bg-tertiary);
228
- padding: 2px 8px;
440
+ padding: 3px 10px;
229
441
  border-radius: 4px;
230
442
  font-size: 11px;
231
443
  margin-top: 12px;
232
- color: var(--text-muted);
444
+ color: var(--accent);
233
445
  }
234
446
 
235
447
  /* Code blocks */
236
448
  pre {
237
449
  background: var(--bg-tertiary);
238
- padding: 16px;
239
- border-radius: 8px;
450
+ padding: 16px 20px;
451
+ border-radius: 10px;
240
452
  overflow-x: auto;
241
453
  margin: 16px 0;
242
454
  border: 1px solid var(--border);
243
455
  }
244
456
 
245
457
  code {
246
- font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
458
+ font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Fira Code', monospace;
247
459
  font-size: 13px;
248
460
  }
249
461
 
250
462
  code.inline {
251
463
  background: var(--bg-tertiary);
252
- padding: 2px 6px;
464
+ padding: 2px 8px;
253
465
  border-radius: 4px;
254
466
  color: var(--accent);
255
467
  }
@@ -295,8 +507,8 @@ function generateHelpPage(section = 'overview', source) {
295
507
  /* Alert boxes */
296
508
  .alert {
297
509
  padding: 16px 20px;
298
- border-radius: 8px;
299
- margin: 16px 0;
510
+ border-radius: 10px;
511
+ margin: 20px 0;
300
512
  border-left: 4px solid;
301
513
  }
302
514
 
@@ -315,27 +527,40 @@ function generateHelpPage(section = 'overview', source) {
315
527
  border-color: var(--warning);
316
528
  }
317
529
 
530
+ .alert strong {
531
+ color: var(--text);
532
+ }
533
+
318
534
  /* Stats */
319
535
  .stats {
320
536
  display: flex;
321
- gap: 24px;
322
- margin: 24px 0;
537
+ gap: 32px;
538
+ margin: 28px 0;
539
+ flex-wrap: wrap;
323
540
  }
324
541
 
325
542
  .stat {
326
543
  text-align: center;
544
+ background: var(--bg-secondary);
545
+ padding: 20px 28px;
546
+ border-radius: 12px;
547
+ border: 1px solid var(--border);
327
548
  }
328
549
 
329
550
  .stat .number {
330
551
  font-size: 36px;
331
552
  font-weight: bold;
332
- color: var(--accent);
553
+ background: var(--gradient-1);
554
+ -webkit-background-clip: text;
555
+ -webkit-text-fill-color: transparent;
556
+ background-clip: text;
333
557
  }
334
558
 
335
559
  .stat .label {
336
560
  font-size: 12px;
337
561
  color: var(--text-muted);
338
562
  text-transform: uppercase;
563
+ margin-top: 4px;
339
564
  }
340
565
 
341
566
  /* Flow diagram */
@@ -350,9 +575,10 @@ function generateHelpPage(section = 'overview', source) {
350
575
  .flow-item {
351
576
  background: var(--bg-secondary);
352
577
  border: 1px solid var(--border);
353
- padding: 12px 16px;
354
- border-radius: 8px;
578
+ padding: 12px 18px;
579
+ border-radius: 10px;
355
580
  font-size: 13px;
581
+ font-weight: 500;
356
582
  }
357
583
 
358
584
  .flow-arrow {
@@ -360,6 +586,50 @@ function generateHelpPage(section = 'overview', source) {
360
586
  font-size: 20px;
361
587
  }
362
588
 
589
+ /* Example box */
590
+ .example-box {
591
+ background: var(--bg-secondary);
592
+ border: 1px solid var(--border);
593
+ border-radius: 12px;
594
+ margin: 20px 0;
595
+ overflow: hidden;
596
+ }
597
+
598
+ .example-box .example-header {
599
+ background: var(--bg-tertiary);
600
+ padding: 10px 16px;
601
+ font-size: 12px;
602
+ font-weight: 600;
603
+ color: var(--text-muted);
604
+ text-transform: uppercase;
605
+ letter-spacing: 0.5px;
606
+ border-bottom: 1px solid var(--border);
607
+ }
608
+
609
+ .example-box .example-content {
610
+ padding: 16px;
611
+ }
612
+
613
+ .example-box pre {
614
+ margin: 0;
615
+ background: transparent;
616
+ border: none;
617
+ padding: 0;
618
+ }
619
+
620
+ .example-box .example-output {
621
+ margin-top: 16px;
622
+ padding-top: 16px;
623
+ border-top: 1px dashed var(--border);
624
+ }
625
+
626
+ .example-box .example-output-label {
627
+ font-size: 11px;
628
+ color: var(--text-muted);
629
+ margin-bottom: 8px;
630
+ text-transform: uppercase;
631
+ }
632
+
363
633
  /* Footer */
364
634
  .footer {
365
635
  margin-top: 48px;
@@ -381,6 +651,7 @@ function generateHelpPage(section = 'overview', source) {
381
651
  .main { margin-left: 0; padding: 20px; }
382
652
  body { flex-direction: column; }
383
653
  .cards { grid-template-columns: 1fr; }
654
+ .stats { justify-content: center; }
384
655
  }
385
656
  </style>
386
657
  </head>
@@ -389,7 +660,7 @@ function generateHelpPage(section = 'overview', source) {
389
660
  <main class="main">
390
661
  ${content}
391
662
  <footer class="footer">
392
- <span>Apero Kit CLI v1.4.0</span>
663
+ <span>Apero Kit CLI v1.4.1</span>
393
664
  <span>Press Ctrl+C to close • <a href="https://github.com/Thanh-apero/apero-kit-cli" target="_blank">GitHub</a></span>
394
665
  </footer>
395
666
  </main>
@@ -397,15 +668,17 @@ function generateHelpPage(section = 'overview', source) {
397
668
  </html>`;
398
669
  }
399
670
 
400
- function generateNav(activeSection) {
671
+ function generateNav(activeSection, t, lang) {
672
+ const otherLang = lang === 'vi' ? 'en' : 'vi';
673
+
401
674
  const sections = [
402
- { id: 'overview', icon: '🏠', label: 'Overview' },
403
- { id: 'quickstart', icon: '🚀', label: 'Quick Start' },
404
- { id: 'agents', icon: '🤖', label: 'Agents', badge: '18' },
405
- { id: 'commands', icon: '📋', label: 'Commands', badge: '96+' },
406
- { id: 'skills', icon: '📚', label: 'Skills', badge: '57' },
407
- { id: 'hooks', icon: '⚡', label: 'Hooks', badge: '15+' },
408
- { id: 'workflows', icon: '🔄', label: 'Workflows', badge: '4' }
675
+ { id: 'overview', icon: '🏠', label: t.overview },
676
+ { id: 'quickstart', icon: '🚀', label: t.quickstart },
677
+ { id: 'agents', icon: '🤖', label: t.agents, badge: '18' },
678
+ { id: 'commands', icon: '📋', label: t.commands, badge: '96+' },
679
+ { id: 'skills', icon: '📚', label: t.skills, badge: '57' },
680
+ { id: 'hooks', icon: '⚡', label: t.hooks, badge: '15+' },
681
+ { id: 'workflows', icon: '🔄', label: t.workflows, badge: '4' }
409
682
  ];
410
683
 
411
684
  return `
@@ -414,10 +687,16 @@ function generateNav(activeSection) {
414
687
  <h1>🎯 Apero Kit</h1>
415
688
  <p>AI Agent Scaffolding Tool</p>
416
689
  </div>
690
+
691
+ <div class="lang-toggle">
692
+ <a href="?section=${activeSection}&lang=vi" class="${lang === 'vi' ? 'active' : ''}">VI</a>
693
+ <a href="?section=${activeSection}&lang=en" class="${lang === 'en' ? 'active' : ''}">EN</a>
694
+ </div>
695
+
417
696
  <div class="nav-section">
418
697
  <h3>Documentation</h3>
419
698
  ${sections.map(s => `
420
- <a href="?section=${s.id}" class="${activeSection === s.id ? 'active' : ''}">
699
+ <a href="?section=${s.id}&lang=${lang}" class="${activeSection === s.id ? 'active' : ''}">
421
700
  <span class="icon">${s.icon}</span>
422
701
  <span>${s.label}</span>
423
702
  ${s.badge ? `<span class="badge">${s.badge}</span>` : ''}
@@ -425,23 +704,24 @@ function generateNav(activeSection) {
425
704
  `).join('')}
426
705
  </div>
427
706
  <div class="nav-section">
428
- <h3>Resources</h3>
707
+ <h3>${t.resources}</h3>
429
708
  <a href="https://github.com/Thanh-apero/apero-kit-cli" target="_blank">
430
709
  <span class="icon">📦</span>
431
- <span>GitHub</span>
710
+ <span>${t.github}</span>
432
711
  </a>
433
712
  <a href="https://www.npmjs.com/package/apero-kit-cli" target="_blank">
434
713
  <span class="icon">📥</span>
435
- <span>npm Package</span>
714
+ <span>${t.npm}</span>
436
715
  </a>
437
716
  </div>
438
717
  </nav>`;
439
718
  }
440
719
 
441
- function generateOverview(source) {
720
+ function generateOverview(t, lang) {
721
+ const isVi = lang === 'vi';
442
722
  return `
443
- <h1><span class="emoji">🎯</span> Apero Kit CLI</h1>
444
- <p class="subtitle">Scaffold AI agent projects with pre-configured kits for Claude Code</p>
723
+ <h1><span class="emoji">🎯</span> ${t.title}</h1>
724
+ <p class="subtitle">${t.subtitle}</p>
445
725
 
446
726
  <div class="stats">
447
727
  <div class="stat">
@@ -462,45 +742,45 @@ function generateOverview(source) {
462
742
  </div>
463
743
  </div>
464
744
 
465
- <h2>🧩 What is Apero Kit?</h2>
466
- <p>Apero Kit CLI giúp bạn nhanh chóng thiết lập một dự án AI agent với các thành phần đã được cấu hình sẵn:</p>
745
+ <h2>🧩 ${t.whatIs}</h2>
746
+ <p>${t.whatIsDesc}</p>
467
747
 
468
748
  <div class="cards">
469
749
  <div class="card">
470
750
  <h4>🤖 Agents</h4>
471
- <p>Các "chuyên gia AI" với vai trò riêng biệt: debugger, planner, developer, reviewer...</p>
751
+ <p>${t.agentsDesc}</p>
472
752
  <span class="tag">18 agents</span>
473
753
  </div>
474
754
  <div class="card">
475
755
  <h4>📋 Commands</h4>
476
- <p>Các lệnh thực thi như /fix, /code, /plan, /test với nhiều biến thể</p>
756
+ <p>${t.commandsDesc}</p>
477
757
  <span class="tag">96+ commands</span>
478
758
  </div>
479
759
  <div class="card">
480
760
  <h4>📚 Skills</h4>
481
- <p>Kho kiến thức chuyên sâu về frontend, backend, database, devops...</p>
761
+ <p>${t.skillsDesc}</p>
482
762
  <span class="tag">57 skills</span>
483
763
  </div>
484
764
  <div class="card">
485
765
  <h4>⚡ Hooks</h4>
486
- <p>Scripts tự động chạy khi có sự kiện: format code, check security...</p>
766
+ <p>${t.hooksDesc}</p>
487
767
  <span class="tag">15+ hooks</span>
488
768
  </div>
489
769
  </div>
490
770
 
491
- <h2>🏗️ Folder Structure</h2>
771
+ <h2>🏗️ ${t.folderStructure}</h2>
492
772
  <pre><code>.claude/
493
- ├── agents/ # 🤖 AI expert roles (debugger, planner, developer...)
494
- ├── commands/ # 📋 Task workflows (/fix, /code, /plan...)
495
- ├── skills/ # 📚 Knowledge bases (frontend, backend, database...)
496
- ├── hooks/ # ⚡ Automation scripts
497
- ├── router/ # 🧭 Decision engine
498
- ├── workflows/ # 🔄 Multi-step processes
773
+ ├── agents/ # 🤖 ${isVi ? 'Các chuyên gia AI' : 'AI expert roles'} (debugger, planner, developer...)
774
+ ├── commands/ # 📋 ${isVi ? 'Các lệnh workflow' : 'Task workflows'} (/fix, /code, /plan...)
775
+ ├── skills/ # 📚 ${isVi ? 'Kho kiến thức' : 'Knowledge bases'} (frontend, backend, database...)
776
+ ├── hooks/ # ⚡ ${isVi ? 'Scripts tự động' : 'Automation scripts'}
777
+ ├── router/ # 🧭 ${isVi ? 'Bộ điều hướng' : 'Decision engine'}
778
+ ├── workflows/ # 🔄 ${isVi ? 'Quy trình nhiều bước' : 'Multi-step processes'}
499
779
  └── settings.json</code></pre>
500
780
 
501
- <h2>🔄 How It Works</h2>
781
+ <h2>🔄 ${t.howItWorks}</h2>
502
782
  <div class="flow">
503
- <div class="flow-item">📝 User Request</div>
783
+ <div class="flow-item">📝 ${isVi ? 'Yêu cầu' : 'Request'}</div>
504
784
  <span class="flow-arrow">→</span>
505
785
  <div class="flow-item">🧭 Router</div>
506
786
  <span class="flow-arrow">→</span>
@@ -510,47 +790,81 @@ function generateOverview(source) {
510
790
  <span class="flow-arrow">→</span>
511
791
  <div class="flow-item">📚 Skills</div>
512
792
  <span class="flow-arrow">→</span>
513
- <div class="flow-item">✅ Result</div>
793
+ <div class="flow-item">✅ ${isVi ? 'Kết quả' : 'Result'}</div>
514
794
  </div>
515
795
 
516
796
  <div class="alert alert-info">
517
- <strong>💡 Tip:</strong> Sử dụng menu bên trái để tìm hiểu chi tiết về từng thành phần.
797
+ <strong>💡 ${t.tip}:</strong> ${t.tipText}
518
798
  </div>
519
799
  `;
520
800
  }
521
801
 
522
- function generateQuickstartSection() {
802
+ function generateQuickstartSection(t, lang) {
803
+ const isVi = lang === 'vi';
523
804
  return `
524
- <h1><span class="emoji">🚀</span> Quick Start</h1>
525
- <p class="subtitle">Bắt đầu trong 2 phút</p>
805
+ <h1><span class="emoji">🚀</span> ${t.quickstart}</h1>
806
+ <p class="subtitle">${isVi ? 'Bắt đầu trong 2 phút' : 'Get started in 2 minutes'}</p>
807
+
808
+ <h2>📥 ${t.installation}</h2>
809
+ <div class="example-box">
810
+ <div class="example-header">${isVi ? 'Cài đặt global' : 'Install globally'}</div>
811
+ <div class="example-content">
812
+ <pre><code>npm install -g apero-kit-cli</code></pre>
813
+ </div>
814
+ </div>
526
815
 
527
- <h2>📥 Installation</h2>
528
- <pre><code>npm install -g apero-kit-cli</code></pre>
816
+ <h2>🎯 ${t.createProject}</h2>
529
817
 
530
- <h2>🎯 Create New Project</h2>
531
- <pre><code># Tạo project mới với kit engineer
818
+ <div class="example-box">
819
+ <div class="example-header">${t.example} 1: ${isVi ? 'Tạo project mới' : 'Create new project'}</div>
820
+ <div class="example-content">
821
+ <pre><code># ${isVi ? 'Tạo project với kit engineer (đầy đủ nhất)' : 'Create project with engineer kit (most complete)'}
532
822
  ak init my-app --kit engineer
533
823
 
534
- # Hoặc init trong folder hiện tại
535
- cd my-project
824
+ # ${isVi ? 'Hoặc chế độ interactive' : 'Or interactive mode'}
825
+ ak init my-app</code></pre>
826
+ <div class="example-output">
827
+ <div class="example-output-label">${t.output}:</div>
828
+ <pre><code>✔ Project created successfully!
829
+
830
+ Next steps:
831
+ cd my-app
832
+ # Start coding with Claude Code</code></pre>
833
+ </div>
834
+ </div>
835
+ </div>
836
+
837
+ <div class="example-box">
838
+ <div class="example-header">${t.example} 2: ${isVi ? 'Init trong folder hiện tại' : 'Init in current folder'}</div>
839
+ <div class="example-content">
840
+ <pre><code>cd my-existing-project
536
841
  ak init</code></pre>
842
+ <div class="example-output">
843
+ <div class="example-output-label">${isVi ? 'Nếu .claude/ đã tồn tại' : 'If .claude/ already exists'}:</div>
844
+ <pre><code>? .claude/ already exists. What do you want to do?
845
+ 🔄 Override - ${isVi ? 'Thay thế toàn bộ' : 'Replace all files'}
846
+ 📦 Merge - ${isVi ? 'Chỉ thêm file thiếu' : 'Only add missing files'}
847
+ ⏭️ Skip - ${isVi ? 'Không làm gì' : 'Do nothing'}</code></pre>
848
+ </div>
849
+ </div>
850
+ </div>
537
851
 
538
- <h2>📦 Available Kits</h2>
852
+ <h2>📦 ${t.availableKits}</h2>
539
853
  <table>
540
854
  <tr>
541
855
  <th>Kit</th>
542
856
  <th>Description</th>
543
- <th>Best For</th>
857
+ <th>${isVi ? 'Phù hợp với' : 'Best for'}</th>
544
858
  </tr>
545
859
  <tr>
546
860
  <td><strong>🛠️ engineer</strong></td>
547
861
  <td>Full-stack development</td>
548
- <td>Web apps, APIs, full projects</td>
862
+ <td>${isVi ? 'Web apps, APIs, full projects' : 'Web apps, APIs, full projects'}</td>
549
863
  </tr>
550
864
  <tr>
551
865
  <td><strong>🔬 researcher</strong></td>
552
- <td>Research & analysis</td>
553
- <td>Code exploration, documentation</td>
866
+ <td>${isVi ? 'Nghiên cứu & phân tích' : 'Research & analysis'}</td>
867
+ <td>${isVi ? 'Khám phá code, tài liệu' : 'Code exploration, documentation'}</td>
554
868
  </tr>
555
869
  <tr>
556
870
  <td><strong>🎨 designer</strong></td>
@@ -559,86 +873,90 @@ ak init</code></pre>
559
873
  </tr>
560
874
  <tr>
561
875
  <td><strong>📦 minimal</strong></td>
562
- <td>Lightweight essentials</td>
563
- <td>Small projects, quick tasks</td>
876
+ <td>${isVi ? 'Tối giản' : 'Lightweight'}</td>
877
+ <td>${isVi ? 'Dự án nhỏ, task nhanh' : 'Small projects, quick tasks'}</td>
564
878
  </tr>
565
879
  <tr>
566
880
  <td><strong>🚀 full</strong></td>
567
- <td>Everything included</td>
881
+ <td>${isVi ? 'Đầy đủ tất cả' : 'Everything included'}</td>
568
882
  <td>Enterprise, complex projects</td>
569
883
  </tr>
570
884
  </table>
571
885
 
572
- <h2>💻 Common Commands</h2>
573
- <pre><code># Check project status
886
+ <h2>💻 ${t.commonCommands}</h2>
887
+ <div class="example-box">
888
+ <div class="example-header">${isVi ? 'Các lệnh hay dùng' : 'Frequently used commands'}</div>
889
+ <div class="example-content">
890
+ <pre><code># ${isVi ? 'Xem trạng thái project' : 'Check project status'}
574
891
  ak status
575
892
 
576
- # Add more components
577
- ak add skill:databases
578
- ak add agent:debugger
579
- ak add command:fix/ui
893
+ # ${isVi ? 'Thêm components' : 'Add more components'}
894
+ ak add skill:databases # ${isVi ? 'Thêm skill databases' : 'Add databases skill'}
895
+ ak add agent:debugger # ${isVi ? 'Thêm agent debugger' : 'Add debugger agent'}
896
+ ak add command:fix/ui # ${isVi ? 'Thêm command fix/ui' : 'Add fix/ui command'}
580
897
 
581
- # Update from source
898
+ # ${isVi ? 'Cập nhật từ source' : 'Update from source'}
582
899
  ak update
583
900
 
584
- # List available items
901
+ # ${isVi ? 'Xem danh sách có sẵn' : 'List available items'}
585
902
  ak list agents
586
903
  ak list skills
587
904
  ak list commands
588
905
 
589
- # Health check
590
- ak doctor</code></pre>
591
-
592
- <h2>🎮 Existing Project</h2>
593
- <pre><code>cd existing-project
594
- ak init
906
+ # ${isVi ? 'Kiểm tra sức khỏe project' : 'Health check'}
907
+ ak doctor
595
908
 
596
- # CLI will detect .claude/ and ask:
597
- # 🔄 Override - Replace all files
598
- # 📦 Merge - Only add missing files
599
- # ⏭️ Skip - Do nothing</code></pre>
909
+ # ${isVi ? 'Mở help trong browser' : 'Open help in browser'}
910
+ ak help</code></pre>
911
+ </div>
912
+ </div>
600
913
 
601
914
  <div class="alert alert-success">
602
- <strong>✅ Done!</strong> Bạn đã sẵn sàng sử dụng Claude Code với các agents và commands đã được cấu hình.
915
+ <strong>✅ ${t.done}!</strong> ${t.doneText}
603
916
  </div>
604
917
  `;
605
918
  }
606
919
 
607
- function generateAgentsSection(source) {
608
- const agents = [
609
- { name: 'debugger', emoji: '🔍', desc: 'Investigate issues, analyze logs, trace bugs' },
610
- { name: 'planner', emoji: '📐', desc: 'Create implementation plans, architecture design' },
611
- { name: 'fullstack-developer', emoji: '💻', desc: 'Execute code with strict file ownership' },
612
- { name: 'code-reviewer', emoji: '👀', desc: 'Review code quality and standards' },
613
- { name: 'tester', emoji: '🧪', desc: 'Write comprehensive tests' },
614
- { name: 'scout', emoji: '🔎', desc: 'Search codebase with pattern matching' },
615
- { name: 'scout-external', emoji: '🌐', desc: 'Search external docs and APIs' },
616
- { name: 'researcher', emoji: '🔬', desc: 'Research technologies and solutions' },
617
- { name: 'ui-ux-designer', emoji: '🎨', desc: 'Design interfaces and user experiences' },
618
- { name: 'database-admin', emoji: '🗄️', desc: 'Manage databases and queries' },
619
- { name: 'git-manager', emoji: '📦', desc: 'Manage version control, commits, PRs' },
620
- { name: 'docs-manager', emoji: '📝', desc: 'Write and maintain documentation' },
621
- { name: 'project-manager', emoji: '📊', desc: 'Track progress and timelines' },
622
- { name: 'brainstormer', emoji: '💡', desc: 'Generate creative ideas' },
623
- { name: 'copywriter', emoji: '✍️', desc: 'Write marketing and technical copy' },
624
- { name: 'mcp-manager', emoji: '🔧', desc: 'Manage MCP tools and integrations' },
625
- { name: 'journal-writer', emoji: '📓', desc: 'Log progress and notes' },
626
- { name: 'code-simplifier', emoji: '✂️', desc: 'Simplify and refactor code' }
627
- ];
920
+ function generateAgentsSection(t, lang) {
921
+ const isVi = lang === 'vi';
922
+
923
+ const agents = {
924
+ development: [
925
+ { name: 'debugger', emoji: '🔍', desc: isVi ? 'Điều tra lỗi, phân tích logs, trace bugs' : 'Investigate issues, analyze logs, trace bugs' },
926
+ { name: 'planner', emoji: '📐', desc: isVi ? 'Lên kế hoạch implementation, thiết kế kiến trúc' : 'Create implementation plans, architecture design' },
927
+ { name: 'fullstack-developer', emoji: '💻', desc: isVi ? 'Viết code với file ownership chặt chẽ' : 'Execute code with strict file ownership' },
928
+ { name: 'code-reviewer', emoji: '👀', desc: isVi ? 'Review chất lượng code và standards' : 'Review code quality and standards' },
929
+ { name: 'tester', emoji: '🧪', desc: isVi ? 'Viết tests đầy đủ' : 'Write comprehensive tests' }
930
+ ],
931
+ research: [
932
+ { name: 'scout', emoji: '🔎', desc: isVi ? 'Tìm kiếm trong codebase với pattern matching' : 'Search codebase with pattern matching' },
933
+ { name: 'scout-external', emoji: '🌐', desc: isVi ? 'Tìm kiếm docs và APIs bên ngoài' : 'Search external docs and APIs' },
934
+ { name: 'researcher', emoji: '🔬', desc: isVi ? 'Nghiên cứu công nghệ và giải pháp' : 'Research technologies and solutions' }
935
+ ],
936
+ design: [
937
+ { name: 'ui-ux-designer', emoji: '🎨', desc: isVi ? 'Thiết kế giao diện và trải nghiệm người dùng' : 'Design interfaces and user experiences' },
938
+ { name: 'copywriter', emoji: '✍️', desc: isVi ? 'Viết content marketing và kỹ thuật' : 'Write marketing and technical copy' },
939
+ { name: 'brainstormer', emoji: '💡', desc: isVi ? 'Tạo ý tưởng sáng tạo' : 'Generate creative ideas' }
940
+ ],
941
+ management: [
942
+ { name: 'git-manager', emoji: '📦', desc: isVi ? 'Quản lý version control, commits, PRs' : 'Manage version control, commits, PRs' },
943
+ { name: 'database-admin', emoji: '🗄️', desc: isVi ? 'Quản lý databases và queries' : 'Manage databases and queries' },
944
+ { name: 'docs-manager', emoji: '📝', desc: isVi ? 'Viết và duy trì documentation' : 'Write and maintain documentation' },
945
+ { name: 'project-manager', emoji: '📊', desc: isVi ? 'Theo dõi tiến độ' : 'Track progress and timelines' }
946
+ ]
947
+ };
628
948
 
629
949
  return `
630
950
  <h1><span class="emoji">🤖</span> Agents</h1>
631
- <p class="subtitle">18 chuyên gia AI với vai trò riêng biệt</p>
951
+ <p class="subtitle">${t.agentsTitle}</p>
632
952
 
633
953
  <div class="alert alert-info">
634
- <strong>💡 Agent là gì?</strong> Agent là một "persona" mà AI sẽ đóng vai, với chuyên môn và phương pháp làm việc riêng.
954
+ <strong>💡 ${t.agentWhat}</strong> ${t.agentWhatDesc}
635
955
  </div>
636
956
 
637
- <h2>📋 Agent Categories</h2>
638
-
639
- <h3>🔧 Development</h3>
957
+ <h2>🔧 ${t.development}</h2>
640
958
  <div class="cards">
641
- ${agents.slice(0, 5).map(a => `
959
+ ${agents.development.map(a => `
642
960
  <div class="card">
643
961
  <h4>${a.emoji} ${a.name}</h4>
644
962
  <p>${a.desc}</p>
@@ -646,9 +964,9 @@ function generateAgentsSection(source) {
646
964
  `).join('')}
647
965
  </div>
648
966
 
649
- <h3>🔍 Research & Search</h3>
967
+ <h2>🔍 ${t.researchSearch}</h2>
650
968
  <div class="cards">
651
- ${agents.slice(5, 8).map(a => `
969
+ ${agents.research.map(a => `
652
970
  <div class="card">
653
971
  <h4>${a.emoji} ${a.name}</h4>
654
972
  <p>${a.desc}</p>
@@ -656,9 +974,9 @@ function generateAgentsSection(source) {
656
974
  `).join('')}
657
975
  </div>
658
976
 
659
- <h3>🎨 Design & Content</h3>
977
+ <h2>🎨 ${t.designContent}</h2>
660
978
  <div class="cards">
661
- ${agents.slice(8, 11).map(a => `
979
+ ${agents.design.map(a => `
662
980
  <div class="card">
663
981
  <h4>${a.emoji} ${a.name}</h4>
664
982
  <p>${a.desc}</p>
@@ -666,9 +984,9 @@ function generateAgentsSection(source) {
666
984
  `).join('')}
667
985
  </div>
668
986
 
669
- <h3>📊 Management & Support</h3>
987
+ <h2>📊 ${t.managementSupport}</h2>
670
988
  <div class="cards">
671
- ${agents.slice(11).map(a => `
989
+ ${agents.management.map(a => `
672
990
  <div class="card">
673
991
  <h4>${a.emoji} ${a.name}</h4>
674
992
  <p>${a.desc}</p>
@@ -676,10 +994,28 @@ function generateAgentsSection(source) {
676
994
  `).join('')}
677
995
  </div>
678
996
 
679
- <h2>📄 Agent File Format</h2>
680
- <pre><code>---
997
+ <h2>📝 ${t.usage}</h2>
998
+ <div class="example-box">
999
+ <div class="example-header">${isVi ? 'Agents được tự động chọn dựa trên yêu cầu' : 'Agents are auto-selected based on request'}</div>
1000
+ <div class="example-content">
1001
+ <pre><code># ${isVi ? 'Khi bạn nói' : 'When you say'}: "Fix this bug in the login"
1002
+ # → Router ${isVi ? 'chọn' : 'selects'}: debugger agent + /fix command
1003
+
1004
+ # ${isVi ? 'Khi bạn nói' : 'When you say'}: "Plan a new authentication feature"
1005
+ # → Router ${isVi ? 'chọn' : 'selects'}: planner agent + /plan command
1006
+
1007
+ # ${isVi ? 'Khi bạn nói' : 'When you say'}: "Make this UI more beautiful"
1008
+ # → Router ${isVi ? 'chọn' : 'selects'}: ui-ux-designer agent + ui-ux-pro-max skill</code></pre>
1009
+ </div>
1010
+ </div>
1011
+
1012
+ <h2>📄 ${t.fileFormat}</h2>
1013
+ <div class="example-box">
1014
+ <div class="example-header">agents/debugger.md</div>
1015
+ <div class="example-content">
1016
+ <pre><code>---
681
1017
  name: debugger
682
- description: Investigate issues, analyze logs
1018
+ description: ${isVi ? 'Điều tra lỗi, phân tích logs' : 'Investigate issues, analyze logs'}
683
1019
  model: inherit
684
1020
  ---
685
1021
 
@@ -695,66 +1031,79 @@ model: inherit
695
1031
  2. Analyze error messages
696
1032
  3. Trace the call stack
697
1033
  4. Identify root cause</code></pre>
1034
+ </div>
1035
+ </div>
698
1036
  `;
699
1037
  }
700
1038
 
701
- function generateCommandsSection(source) {
1039
+ function generateCommandsSection(t, lang) {
1040
+ const isVi = lang === 'vi';
1041
+
702
1042
  const commandGroups = [
703
1043
  {
704
- name: 'Fix Commands',
1044
+ name: t.fixCommands,
705
1045
  icon: '🔧',
706
1046
  commands: [
707
- { name: '/fix', desc: 'Intelligent routing to specialized fix' },
708
- { name: '/fix:fast', desc: 'Quick fixes for simple issues' },
709
- { name: '/fix:hard', desc: 'Complex debugging with research' },
710
- { name: '/fix:ui', desc: 'UI/layout issues' },
711
- { name: '/fix:test', desc: 'Failing test fixes' },
712
- { name: '/fix:types', desc: 'TypeScript errors' },
713
- { name: '/fix:ci', desc: 'CI/CD pipeline issues' }
1047
+ { name: '/fix', desc: isVi ? 'Routing thông minh đến lệnh fix phù hợp' : 'Intelligent routing to specialized fix' },
1048
+ { name: '/fix:fast', desc: isVi ? 'Sửa nhanh cho lỗi đơn giản' : 'Quick fixes for simple issues' },
1049
+ { name: '/fix:hard', desc: isVi ? 'Debug phức tạp với research' : 'Complex debugging with research' },
1050
+ { name: '/fix:ui', desc: isVi ? 'Lỗi UI/layout' : 'UI/layout issues' },
1051
+ { name: '/fix:test', desc: isVi ? 'Sửa test failing' : 'Failing test fixes' },
1052
+ { name: '/fix:types', desc: isVi ? 'Lỗi TypeScript' : 'TypeScript errors' },
1053
+ { name: '/fix:ci', desc: isVi ? 'Lỗi CI/CD pipeline' : 'CI/CD pipeline issues' }
714
1054
  ]
715
1055
  },
716
1056
  {
717
- name: 'Plan Commands',
1057
+ name: t.planCommands,
718
1058
  icon: '📐',
719
1059
  commands: [
720
- { name: '/plan', desc: 'Intelligent plan routing' },
721
- { name: '/plan:fast', desc: 'Quick planning without research' },
722
- { name: '/plan:hard', desc: 'Full research + planning' },
723
- { name: '/plan:parallel', desc: 'Multi-track parallel planning' },
724
- { name: '/plan:validate', desc: 'Verify existing plans' },
725
- { name: '/plan:preview', desc: 'Open plan in browser' }
1060
+ { name: '/plan', desc: isVi ? 'Routing thông minh cho planning' : 'Intelligent plan routing' },
1061
+ { name: '/plan:fast', desc: isVi ? 'Lên kế hoạch nhanh không research' : 'Quick planning without research' },
1062
+ { name: '/plan:hard', desc: isVi ? 'Research đầy đủ + planning' : 'Full research + planning' },
1063
+ { name: '/plan:parallel', desc: isVi ? 'Planning song song nhiều track' : 'Multi-track parallel planning' },
1064
+ { name: '/plan:preview', desc: isVi ? 'Mở plan trong browser' : 'Open plan in browser' }
726
1065
  ]
727
1066
  },
728
1067
  {
729
- name: 'Code Commands',
1068
+ name: t.codeCommands,
730
1069
  icon: '💻',
731
1070
  commands: [
732
- { name: '/code', desc: 'Standard implementation with tests' },
733
- { name: '/code:auto', desc: 'Automated code generation' },
734
- { name: '/code:no-test', desc: 'Quick prototyping without tests' },
735
- { name: '/code:parallel', desc: 'Parallel implementation' }
1071
+ { name: '/code', desc: isVi ? 'Implementation chuẩn với tests' : 'Standard implementation with tests' },
1072
+ { name: '/code:auto', desc: isVi ? 'Tự động generate code' : 'Automated code generation' },
1073
+ { name: '/code:no-test', desc: isVi ? 'Prototype nhanh không tests' : 'Quick prototyping without tests' }
736
1074
  ]
737
1075
  },
738
1076
  {
739
- name: 'Other Commands',
1077
+ name: t.otherCommands,
740
1078
  icon: '⚡',
741
1079
  commands: [
742
- { name: '/test', desc: 'Run tests' },
1080
+ { name: '/test', desc: isVi ? 'Chạy tests' : 'Run tests' },
743
1081
  { name: '/review', desc: 'Code review' },
744
- { name: '/scout', desc: 'Search codebase' },
745
- { name: '/debug', desc: 'Deep investigation' },
746
- { name: '/brainstorm', desc: 'Generate ideas' },
747
- { name: '/docs', desc: 'Documentation' }
1082
+ { name: '/scout', desc: isVi ? 'Tìm kiếm codebase' : 'Search codebase' },
1083
+ { name: '/debug', desc: isVi ? 'Điều tra sâu' : 'Deep investigation' },
1084
+ { name: '/brainstorm', desc: isVi ? 'Tạo ý tưởng' : 'Generate ideas' }
748
1085
  ]
749
1086
  }
750
1087
  ];
751
1088
 
752
1089
  return `
753
1090
  <h1><span class="emoji">📋</span> Commands</h1>
754
- <p class="subtitle">96+ lệnh thực thi với nhiều biến thể</p>
1091
+ <p class="subtitle">${t.commandsTitle}</p>
755
1092
 
756
1093
  <div class="alert alert-info">
757
- <strong>💡 Command là gì?</strong> Command là các "workflow" được định nghĩa sẵn cho từng loại task.
1094
+ <strong>💡 ${t.commandWhat}</strong> ${t.commandWhatDesc}
1095
+ </div>
1096
+
1097
+ <h2>📝 ${t.usage}</h2>
1098
+ <div class="example-box">
1099
+ <div class="example-header">${isVi ? 'Cách sử dụng commands trong Claude Code' : 'How to use commands in Claude Code'}</div>
1100
+ <div class="example-content">
1101
+ <pre><code># ${isVi ? 'Trong Claude Code, gõ' : 'In Claude Code, type'}:
1102
+ /fix ${isVi ? 'lỗi login không hoạt động' : 'login is not working'}
1103
+ /plan:fast ${isVi ? 'thêm tính năng dark mode' : 'add dark mode feature'}
1104
+ /code ${isVi ? 'implement theo plan trên' : 'implement the plan above'}
1105
+ /test ${isVi ? 'chạy tất cả tests' : 'run all tests'}</code></pre>
1106
+ </div>
758
1107
  </div>
759
1108
 
760
1109
  ${commandGroups.map(group => `
@@ -773,60 +1122,92 @@ function generateCommandsSection(source) {
773
1122
  </table>
774
1123
  `).join('')}
775
1124
 
776
- <h2>📄 Command File Format</h2>
777
- <pre><code>---
778
- description: ⚡⚡ Quick fix for simple issues
779
- argument-hint: [issue]
780
- ---
1125
+ <h2>🎯 ${t.example}</h2>
1126
+ <div class="example-box">
1127
+ <div class="example-header">${isVi ? 'Ví dụ workflow hoàn chỉnh' : 'Example complete workflow'}</div>
1128
+ <div class="example-content">
1129
+ <pre><code># 1. ${isVi ? 'Lên kế hoạch tính năng mới' : 'Plan new feature'}
1130
+ /plan:hard ${isVi ? 'Thêm hệ thống authentication với OAuth' : 'Add authentication system with OAuth'}
781
1131
 
782
- ## Workflow
783
- 1. Analyze the issue
784
- 2. Identify root cause
785
- 3. Apply fix
786
- 4. Verify solution
1132
+ # 2. ${isVi ? 'Xem plan trong browser' : 'View plan in browser'}
1133
+ /plan:preview
787
1134
 
788
- ## When to Use
789
- - Simple bug fixes
790
- - Typo corrections
791
- - Minor logic errors</code></pre>
1135
+ # 3. ${isVi ? 'Implement theo plan' : 'Implement the plan'}
1136
+ /code ${isVi ? 'implement phase 1 của plan' : 'implement phase 1 of the plan'}
1137
+
1138
+ # 4. ${isVi ? 'Fix nếu có lỗi' : 'Fix if there are bugs'}
1139
+ /fix:hard ${isVi ? 'lỗi OAuth callback' : 'OAuth callback error'}
1140
+
1141
+ # 5. ${isVi ? 'Chạy tests' : 'Run tests'}
1142
+ /test</code></pre>
1143
+ </div>
1144
+ </div>
792
1145
  `;
793
1146
  }
794
1147
 
795
- function generateSkillsSection(source) {
1148
+ function generateSkillsSection(t, lang) {
1149
+ const isVi = lang === 'vi';
1150
+
796
1151
  const skillCategories = [
797
1152
  {
798
- name: 'Frontend',
1153
+ name: t.frontend,
799
1154
  icon: '🎨',
800
- skills: ['frontend-development', 'ui-ux-pro-max', 'ui-styling', 'frontend-design-pro', 'mobile-development']
1155
+ skills: [
1156
+ { name: 'frontend-development', desc: isVi ? 'React, TypeScript, best practices' : 'React, TypeScript, best practices' },
1157
+ { name: 'ui-ux-pro-max', desc: isVi ? '50 styles, 21 palettes, 50 font pairings' : '50 styles, 21 palettes, 50 font pairings' },
1158
+ { name: 'ui-styling', desc: 'Tailwind CSS + shadcn/ui' },
1159
+ { name: 'mobile-development', desc: 'React Native, Flutter, SwiftUI' }
1160
+ ]
801
1161
  },
802
1162
  {
803
- name: 'Backend',
1163
+ name: t.backend,
804
1164
  icon: '⚙️',
805
- skills: ['backend-development', 'databases', 'better-auth', 'payment-integration']
1165
+ skills: [
1166
+ { name: 'backend-development', desc: 'Node.js, Python, Go, Rust APIs' },
1167
+ { name: 'databases', desc: 'PostgreSQL, MongoDB, optimization' },
1168
+ { name: 'better-auth', desc: 'OAuth2, 2FA, sessions' }
1169
+ ]
806
1170
  },
807
1171
  {
808
- name: 'DevOps',
1172
+ name: t.devops,
809
1173
  icon: '🚀',
810
- skills: ['devops', 'media-processing', 'mcp-builder', 'mcp-management']
1174
+ skills: [
1175
+ { name: 'devops', desc: 'Cloudflare, Docker, GCP' },
1176
+ { name: 'mcp-builder', desc: isVi ? 'Xây dựng MCP servers' : 'Build MCP servers' },
1177
+ { name: 'media-processing', desc: 'FFmpeg, ImageMagick' }
1178
+ ]
811
1179
  },
812
1180
  {
813
- name: 'Testing & Debug',
1181
+ name: t.testingDebug,
814
1182
  icon: '🧪',
815
- skills: ['debugging', 'bug-diagnosis', 'test-generation', 'chrome-devtools']
816
- },
817
- {
818
- name: 'Documentation',
819
- icon: '📝',
820
- skills: ['documentation', 'planning', 'readme-improvement', 'project-index']
1183
+ skills: [
1184
+ { name: 'debugging', desc: isVi ? '4-phase debugging framework' : '4-phase debugging framework' },
1185
+ { name: 'chrome-devtools', desc: 'Puppeteer, CDP' },
1186
+ { name: 'test-generation', desc: 'BDD, Given/When/Then' }
1187
+ ]
821
1188
  }
822
1189
  ];
823
1190
 
824
1191
  return `
825
1192
  <h1><span class="emoji">📚</span> Skills</h1>
826
- <p class="subtitle">57 kho kiến thức chuyên sâu</p>
1193
+ <p class="subtitle">${t.skillsTitle}</p>
827
1194
 
828
1195
  <div class="alert alert-info">
829
- <strong>💡 Skill là gì?</strong> Skill là các "knowledge package" được load khi cần cho từng domain cụ thể.
1196
+ <strong>💡 ${t.skillWhat}</strong> ${t.skillWhatDesc}
1197
+ </div>
1198
+
1199
+ <h2>📝 ${t.usage}</h2>
1200
+ <div class="example-box">
1201
+ <div class="example-header">${isVi ? 'Skills được tự động load khi cần' : 'Skills are auto-loaded when needed'}</div>
1202
+ <div class="example-content">
1203
+ <pre><code># ${isVi ? 'Thêm skill vào project' : 'Add skill to project'}
1204
+ ak add skill:databases
1205
+ ak add skill:frontend-development
1206
+ ak add skill:devops
1207
+
1208
+ # ${isVi ? 'Xem skills có sẵn' : 'List available skills'}
1209
+ ak list skills</code></pre>
1210
+ </div>
830
1211
  </div>
831
1212
 
832
1213
  ${skillCategories.map(cat => `
@@ -834,112 +1215,115 @@ function generateSkillsSection(source) {
834
1215
  <div class="cards">
835
1216
  ${cat.skills.map(s => `
836
1217
  <div class="card">
837
- <h4>${s}</h4>
838
- <p>Specialized knowledge for ${s.replace(/-/g, ' ')}</p>
1218
+ <h4>${s.name}</h4>
1219
+ <p>${s.desc}</p>
839
1220
  </div>
840
1221
  `).join('')}
841
1222
  </div>
842
1223
  `).join('')}
843
1224
 
844
- <h2>📄 Skill File Format</h2>
845
- <pre><code>---
846
- name: backend-development
847
- description: Build robust backend systems
848
- ---
849
-
850
- # Backend Development Skill
851
-
852
- ## Core Concepts
853
- - API design patterns
854
- - Database optimization
855
- - Authentication strategies
1225
+ <h2>🎯 ${t.example}</h2>
1226
+ <div class="example-box">
1227
+ <div class="example-header">${isVi ? 'Skill được load tự động dựa trên context' : 'Skills are auto-loaded based on context'}</div>
1228
+ <div class="example-content">
1229
+ <pre><code># ${isVi ? 'Khi bạn nói' : 'When you say'}: "Make this button more beautiful"
1230
+ # → ${isVi ? 'Skill được load' : 'Skills loaded'}: ui-ux-pro-max, ui-styling
856
1231
 
857
- ## Technology Guides
858
- ### Node.js
859
- - Express/NestJS patterns
860
- - Middleware architecture
1232
+ # ${isVi ? 'Khi bạn nói' : 'When you say'}: "Optimize database query"
1233
+ # → ${isVi ? 'Skill được load' : 'Skills loaded'}: databases, arch-performance-optimization
861
1234
 
862
- ### Python
863
- - FastAPI/Django patterns
864
- - ORM best practices</code></pre>
1235
+ # ${isVi ? 'Khi bạn nói' : 'When you say'}: "Deploy to Cloudflare"
1236
+ # ${isVi ? 'Skill được load' : 'Skills loaded'}: devops</code></pre>
1237
+ </div>
1238
+ </div>
865
1239
  `;
866
1240
  }
867
1241
 
868
- function generateHooksSection(source) {
1242
+ function generateHooksSection(t, lang) {
1243
+ const isVi = lang === 'vi';
1244
+
869
1245
  return `
870
1246
  <h1><span class="emoji">⚡</span> Hooks</h1>
871
- <p class="subtitle">15+ automation scripts</p>
1247
+ <p class="subtitle">${t.hooksTitle}</p>
872
1248
 
873
1249
  <div class="alert alert-info">
874
- <strong>💡 Hook là gì?</strong> Hook là scripts tự động chạy khi có sự kiện (edit file, start session, etc.)
1250
+ <strong>💡 ${t.hookWhat}</strong> ${t.hookWhatDesc}
875
1251
  </div>
876
1252
 
877
- <h2>📋 Hook Types</h2>
1253
+ <h2>📋 ${t.hookTypes}</h2>
878
1254
  <table>
879
1255
  <tr>
880
1256
  <th>Hook</th>
881
1257
  <th>Trigger</th>
882
- <th>Purpose</th>
1258
+ <th>${isVi ? 'Mục đích' : 'Purpose'}</th>
883
1259
  </tr>
884
1260
  <tr>
885
1261
  <td><code>session-init</code></td>
886
- <td>Session start</td>
887
- <td>Load config, detect project</td>
1262
+ <td>${isVi ? 'Bắt đầu session' : 'Session start'}</td>
1263
+ <td>${isVi ? 'Load config, detect project' : 'Load config, detect project'}</td>
888
1264
  </tr>
889
1265
  <tr>
890
1266
  <td><code>session-end</code></td>
891
- <td>Session end</td>
892
- <td>Log session, cleanup</td>
1267
+ <td>${isVi ? 'Kết thúc session' : 'Session end'}</td>
1268
+ <td>${isVi ? 'Log session, cleanup' : 'Log session, cleanup'}</td>
893
1269
  </tr>
894
1270
  <tr>
895
1271
  <td><code>post-edit-prettier</code></td>
896
- <td>After edit</td>
897
- <td>Auto-format code</td>
1272
+ <td>${isVi ? 'Sau khi edit' : 'After edit'}</td>
1273
+ <td>${isVi ? 'Tự động format code' : 'Auto-format code'}</td>
898
1274
  </tr>
899
1275
  <tr>
900
1276
  <td><code>privacy-block</code></td>
901
- <td>File access</td>
902
- <td>Block sensitive files</td>
1277
+ <td>${isVi ? 'Truy cập file' : 'File access'}</td>
1278
+ <td>${isVi ? 'Chặn file nhạy cảm' : 'Block sensitive files'}</td>
903
1279
  </tr>
904
1280
  <tr>
905
1281
  <td><code>scout-block</code></td>
906
- <td>Directory access</td>
907
- <td>Block forbidden paths</td>
908
- </tr>
909
- <tr>
910
- <td><code>dev-rules-reminder</code></td>
911
- <td>Code review</td>
912
- <td>Enforce coding standards</td>
1282
+ <td>${isVi ? 'Truy cập thư mục' : 'Directory access'}</td>
1283
+ <td>${isVi ? 'Chặn đường dẫn cấm' : 'Block forbidden paths'}</td>
913
1284
  </tr>
914
1285
  </table>
915
1286
 
916
- <h2>🔔 Notification Hooks</h2>
917
- <p>Gửi thông báo qua các kênh:</p>
1287
+ <h2>🔔 ${t.notificationHooks}</h2>
1288
+ <p>${isVi ? 'Gửi thông báo qua các kênh:' : 'Send notifications via channels:'}</p>
918
1289
  <ul>
919
1290
  <li><strong>Slack</strong> - Workspace notifications</li>
920
1291
  <li><strong>Discord</strong> - Channel webhooks</li>
921
1292
  <li><strong>Telegram</strong> - Bot messages</li>
922
1293
  </ul>
923
1294
 
924
- <h2>🛡️ Security Hooks</h2>
925
- <ul>
926
- <li><strong>privacy-block</strong> - Chặn truy cập .env, credentials</li>
927
- <li><strong>scout-block</strong> - Chặn traversal ngoài project</li>
928
- </ul>
1295
+ <h2>🛡️ ${t.securityHooks}</h2>
1296
+ <div class="example-box">
1297
+ <div class="example-header">${isVi ? 'Hooks bảo mật tự động chạy' : 'Security hooks run automatically'}</div>
1298
+ <div class="example-content">
1299
+ <pre><code># privacy-block.cjs ${isVi ? 'chặn truy cập' : 'blocks access to'}:
1300
+ .env
1301
+ .env.local
1302
+ credentials.json
1303
+ secrets/
1304
+
1305
+ # scout-block.cjs ${isVi ? 'chặn traversal' : 'blocks traversal'}:
1306
+ ../../../etc/passwd
1307
+ /Users/private/
1308
+ node_modules/ ${isVi ? '(quá lớn)' : '(too large)'}</code></pre>
1309
+ </div>
1310
+ </div>
929
1311
  `;
930
1312
  }
931
1313
 
932
- function generateWorkflowsSection(source) {
1314
+ function generateWorkflowsSection(t, lang) {
1315
+ const isVi = lang === 'vi';
1316
+
933
1317
  return `
934
1318
  <h1><span class="emoji">🔄</span> Workflows</h1>
935
- <p class="subtitle">Multi-step collaboration processes</p>
1319
+ <p class="subtitle">${t.workflowsTitle}</p>
936
1320
 
937
1321
  <div class="alert alert-info">
938
- <strong>💡 Workflow là gì?</strong> Workflow là quy trình nhiều bước với sự phối hợp giữa các agents.
1322
+ <strong>💡 ${t.workflowWhat}</strong> ${t.workflowWhatDesc}
939
1323
  </div>
940
1324
 
941
- <h2>📋 Primary Workflow</h2>
942
- <p>Quy trình phát triển feature đầy đủ:</p>
1325
+ <h2>📋 ${t.primaryWorkflow}</h2>
1326
+ <p>${isVi ? 'Quy trình phát triển feature đầy đủ:' : 'Complete feature development process:'}</p>
943
1327
 
944
1328
  <div class="flow">
945
1329
  <div class="flow-item">📐 Planning</div>
@@ -955,52 +1339,78 @@ function generateWorkflowsSection(source) {
955
1339
 
956
1340
  <h3>Phase 1: Planning</h3>
957
1341
  <ul>
958
- <li>Agent: <code>planner</code></li>
959
- <li>Analyze requirements</li>
960
- <li>Create implementation plan</li>
961
- <li>Define success criteria</li>
1342
+ <li><strong>Agent:</strong> <code>planner</code></li>
1343
+ <li>${isVi ? 'Phân tích yêu cầu' : 'Analyze requirements'}</li>
1344
+ <li>${isVi ? 'Tạo implementation plan' : 'Create implementation plan'}</li>
1345
+ <li>${isVi ? 'Định nghĩa success criteria' : 'Define success criteria'}</li>
962
1346
  </ul>
963
1347
 
964
1348
  <h3>Phase 2: Implementation</h3>
965
1349
  <ul>
966
- <li>Agent: <code>fullstack-developer</code></li>
967
- <li>Write code following plan</li>
1350
+ <li><strong>Agent:</strong> <code>fullstack-developer</code></li>
1351
+ <li>${isVi ? 'Viết code theo plan' : 'Write code following plan'}</li>
968
1352
  <li>Self-review</li>
969
- <li>Write unit tests</li>
1353
+ <li>${isVi ? 'Viết unit tests' : 'Write unit tests'}</li>
970
1354
  </ul>
971
1355
 
972
1356
  <h3>Phase 3: Testing</h3>
973
1357
  <ul>
974
- <li>Agent: <code>tester</code></li>
975
- <li>Run full test suite</li>
976
- <li>Test edge cases</li>
977
- <li>Report status</li>
1358
+ <li><strong>Agent:</strong> <code>tester</code></li>
1359
+ <li>${isVi ? 'Chạy full test suite' : 'Run full test suite'}</li>
1360
+ <li>${isVi ? 'Test edge cases' : 'Test edge cases'}</li>
1361
+ <li>${isVi ? 'Báo cáo kết quả' : 'Report status'}</li>
978
1362
  </ul>
979
1363
 
980
1364
  <h3>Phase 4: Review</h3>
981
1365
  <ul>
982
- <li>Agent: <code>code-reviewer</code></li>
983
- <li>Check code quality</li>
1366
+ <li><strong>Agent:</strong> <code>code-reviewer</code></li>
1367
+ <li>${isVi ? 'Kiểm tra chất lượng code' : 'Check code quality'}</li>
984
1368
  <li>Security review</li>
985
1369
  <li>Performance analysis</li>
986
1370
  </ul>
987
1371
 
988
1372
  <h3>Phase 5: Documentation</h3>
989
1373
  <ul>
990
- <li>Agent: <code>docs-manager</code></li>
991
- <li>Update documentation</li>
1374
+ <li><strong>Agent:</strong> <code>docs-manager</code></li>
1375
+ <li>${isVi ? 'Cập nhật documentation' : 'Update documentation'}</li>
992
1376
  <li>Changelog entry</li>
993
1377
  <li>Release notes</li>
994
1378
  </ul>
995
1379
 
996
- <h2>🎯 Key Principles</h2>
1380
+ <h2>🎯 ${t.keyPrinciples}</h2>
997
1381
  <ul>
998
- <li><strong>Clarify First</strong> - Hỏi rõ yêu cầu trước khi làm</li>
999
- <li><strong>Minimum Viable</strong> - Chỉ làm những gì cần thiết</li>
1000
- <li><strong>Reuse Before Write</strong> - Tái sử dụng code có sẵn</li>
1001
- <li><strong>File < 300 LOC</strong> - Giữ file nhỏ</li>
1002
- <li><strong>Config from Env</strong> - Không hardcode secrets</li>
1382
+ <li><strong>${isVi ? 'Clarify First' : 'Clarify First'}</strong> - ${isVi ? 'Hỏi rõ yêu cầu trước khi làm' : 'Ask for clarification before starting'}</li>
1383
+ <li><strong>${isVi ? 'Minimum Viable' : 'Minimum Viable'}</strong> - ${isVi ? 'Chỉ làm những gì cần thiết' : 'Only do what is necessary'}</li>
1384
+ <li><strong>${isVi ? 'Reuse Before Write' : 'Reuse Before Write'}</strong> - ${isVi ? 'Tái sử dụng code có sẵn' : 'Reuse existing code'}</li>
1385
+ <li><strong>File < 300 LOC</strong> - ${isVi ? 'Giữ file nhỏ' : 'Keep files small'}</li>
1386
+ <li><strong>${isVi ? 'Config from Env' : 'Config from Env'}</strong> - ${isVi ? 'Không hardcode secrets' : 'Never hardcode secrets'}</li>
1003
1387
  </ul>
1388
+
1389
+ <div class="example-box">
1390
+ <div class="example-header">${t.example}</div>
1391
+ <div class="example-content">
1392
+ <pre><code># ${isVi ? 'Workflow hoàn chỉnh cho feature mới' : 'Complete workflow for new feature'}
1393
+
1394
+ # 1. Planning
1395
+ /plan:hard ${isVi ? 'Thêm tính năng dark mode cho app' : 'Add dark mode feature to app'}
1396
+
1397
+ # 2. ${isVi ? 'Xem và approve plan' : 'Review and approve plan'}
1398
+ /plan:preview
1399
+
1400
+ # 3. Implementation
1401
+ /code ${isVi ? 'implement phase 1 - tạo theme context' : 'implement phase 1 - create theme context'}
1402
+ /code ${isVi ? 'implement phase 2 - update components' : 'implement phase 2 - update components'}
1403
+
1404
+ # 4. Testing
1405
+ /test
1406
+
1407
+ # 5. Review
1408
+ /review ${isVi ? 'review code vừa viết' : 'review the code written'}
1409
+
1410
+ # 6. ${isVi ? 'Commit và push' : 'Commit and push'}
1411
+ # (${isVi ? 'git-manager agent tự động handle' : 'git-manager agent handles automatically'})</code></pre>
1412
+ </div>
1413
+ </div>
1004
1414
  `;
1005
1415
  }
1006
1416
 
@@ -1015,8 +1425,9 @@ export async function helpCommand(options) {
1015
1425
  const server = http.createServer((req, res) => {
1016
1426
  const url = new URL(req.url, `http://localhost:${PORT}`);
1017
1427
  const section = url.searchParams.get('section') || 'overview';
1428
+ const lang = url.searchParams.get('lang') || 'vi';
1018
1429
 
1019
- const html = generateHelpPage(section, source);
1430
+ const html = generateHelpPage(section, lang, source);
1020
1431
  res.writeHead(200, { 'Content-Type': 'text/html; charset=utf-8' });
1021
1432
  res.end(html);
1022
1433
  });