@musashishao/agent-kit 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.
@@ -80,10 +80,12 @@ Agent activated โ†’ Check frontmatter "skills:" field
80
80
 
81
81
  ### ๐ŸŒ Language Handling
82
82
 
83
- When user's prompt is NOT in English:
84
- 1. **Internally translate** for better comprehension
85
- 2. **Respond in user's language** - match their communication
86
- 3. **Code comments/variables** remain in English
83
+ **MANDATORY:** Check `.agent/memory/user.json` > `preferences.language`.
84
+
85
+ 1. **If set to 'vi':** Respond in Vietnamese.
86
+ 2. **If set to 'en':** Respond in English.
87
+ 3. **If unset:** Match user's communication language.
88
+ 4. **Code comments/variables** always remain in English.
87
89
 
88
90
  ### ๐Ÿงน Clean Code (Global Mandatory)
89
91
 
@@ -699,7 +699,7 @@ Examples:
699
699
 
700
700
  # memory command
701
701
  memory_parser = subparsers.add_parser("memory", help="Manage JSON memory")
702
- memory_parser.add_argument("mem_command", choices=["init", "get", "set", "update-task", "set-level"])
702
+ memory_parser.add_argument("mem_command", choices=["init", "get", "set", "update-task", "set-level", "set-lang"])
703
703
  memory_parser.add_argument("--type", choices=["brain", "session", "user"], default="session")
704
704
  memory_parser.add_argument("--key", help="Key to get or set")
705
705
  memory_parser.add_argument("--value", help="Value to set")
@@ -0,0 +1,54 @@
1
+ import os
2
+ import re
3
+ from pathlib import Path
4
+
5
+ def localize_workflows(lang, project_root):
6
+ workflow_dir = Path(project_root) / ".agent" / "workflows"
7
+ if not workflow_dir.exists():
8
+ return
9
+
10
+ for wf_file in workflow_dir.glob("*.md"):
11
+ with open(wf_file, "r", encoding="utf-8") as f:
12
+ content = f.read()
13
+
14
+ # Extract frontmatter
15
+ match = re.match(r"^---\n(.*?)\n---", content, re.DOTALL)
16
+ if not match:
17
+ continue
18
+
19
+ frontmatter = match.group(1)
20
+ remaining = content[match.end():]
21
+
22
+ # Parse fields
23
+ fields = {}
24
+ for line in frontmatter.split("\n"):
25
+ if ":" in line:
26
+ key, val = line.split(":", 1)
27
+ fields[key.strip()] = val.strip()
28
+
29
+ # Backup current description to description_en if not exists
30
+ if "description" in fields and "description_en" not in fields:
31
+ fields["description_en"] = fields["description"]
32
+
33
+ # Update description based on lang
34
+ target_key = f"description_{lang}"
35
+ if target_key in fields:
36
+ fields["description"] = fields[target_key]
37
+ elif lang == "en" and "description_en" in fields:
38
+ fields["description"] = fields["description_en"]
39
+
40
+ # Reconstruct frontmatter
41
+ new_frontmatter = "---\n"
42
+ for k, v in fields.items():
43
+ new_frontmatter += f"{k}: {v}\n"
44
+ new_frontmatter += "---"
45
+
46
+ new_content = new_frontmatter + remaining
47
+
48
+ with open(wf_file, "w", encoding="utf-8") as f:
49
+ f.write(new_content)
50
+
51
+ if __name__ == "__main__":
52
+ import sys
53
+ if len(sys.argv) > 2:
54
+ localize_workflows(sys.argv[1], sys.argv[2])
@@ -83,7 +83,7 @@ class MemoryManager:
83
83
  if __name__ == "__main__":
84
84
  import argparse
85
85
  parser = argparse.ArgumentParser(description="Manage Agent Kit JSON Memory")
86
- parser.add_argument("command", choices=["init", "get", "set", "update-task", "set-level"])
86
+ parser.add_argument("command", choices=["init", "get", "set", "update-task", "set-level", "set-lang"])
87
87
  parser.add_argument("--type", choices=["brain", "session", "user"], default="session")
88
88
  parser.add_argument("--key", help="Key to get or set")
89
89
  parser.add_argument("--value", help="Value to set")
@@ -113,3 +113,26 @@ if __name__ == "__main__":
113
113
  user["skill_level"] = args.level
114
114
  manager.save("user", user)
115
115
  print(f"โœ… User skill level set to: {args.level}")
116
+ elif args.command == "set-lang":
117
+ if args.value:
118
+ user = manager.load("user")
119
+ if "preferences" not in user:
120
+ user["preferences"] = {}
121
+ user["preferences"]["language"] = args.value
122
+ manager.save("user", user)
123
+ print(f"โœ… Language set to: {args.value}")
124
+
125
+ # Localize workflow descriptions in files
126
+ try:
127
+ from localize_workflows import localize_workflows
128
+ localize_workflows(args.value, manager.project_root)
129
+ print(f"โœ… Workflow descriptions updated to: {args.value}")
130
+ except ImportError:
131
+ # Add current directory to path if needed
132
+ import sys
133
+ sys.path.append(os.path.dirname(os.path.abspath(__file__)))
134
+ from localize_workflows import localize_workflows
135
+ localize_workflows(args.value, manager.project_root)
136
+ print(f"โœ… Workflow descriptions updated to: {args.value}")
137
+ except Exception as e:
138
+ print(f"โš ๏ธ Failed to localize workflows: {str(e)}")
@@ -1,5 +1,6 @@
1
1
  ---
2
- description: Vรฒng lแบทp tแปฑ sแปญa lแป—i autonomous cho cรกc lแป‡nh thแบฅt bแบกi
2
+ description: Autonomous self-healing loop for failed commands.
3
+ description_vi: Vรฒng lแบทp tแปฑ phแปฅc hแป“i tแปฑ ฤ‘แป™ng cho cรกc lแป‡nh bแป‹ lแป—i.
3
4
  ---
4
5
 
5
6
  # /autofix - Autonomous Self-Healing Loop
@@ -1,5 +1,6 @@
1
1
  ---
2
- description: Brainstorming cรณ cแบฅu trรบc cho dแปฑ รกn vร  tรญnh nฤƒng. Khรกm phรก nhiแปu phฦฐฦกng รกn trฦฐแป›c khi triแปƒn khai.
2
+ description: Structured brainstorming for projects and features. Explore multiple options before implementation.
3
+ description_vi: Brainstorming cรณ cแบฅu trรบc cho dแปฑ รกn vร  tรญnh nฤƒng. Khรกm phรก nhiแปu phฦฐฦกng รกn trฦฐแป›c khi triแปƒn khai.
3
4
  ---
4
5
 
5
6
  # /brainstorm - Structured Idea Exploration
@@ -1,5 +1,6 @@
1
1
  ---
2
- description: Tแปฑ ฤ‘แป™ng tแบกo context tแป‘i ฦฐu cho cรกc tรกc vแปฅ phแปฉc tแบกp sแปญ dแปฅng chiแบฟn lฦฐแปฃc Context Engineering.
2
+ description: Automatically generate optimal context for complex tasks using Context Engineering strategies.
3
+ description_vi: Tแปฑ ฤ‘แป™ng tแบกo ngแปฏ cแบฃnh tแป‘i ฦฐu cho cรกc tรกc vแปฅ phแปฉc tแบกp bแบฑng chiแบฟn lฦฐแปฃc Context Engineering.
3
4
  ---
4
5
 
5
6
  # Context Optimization Workflow
@@ -1,5 +1,6 @@
1
1
  ---
2
- description: Lแป‡nh tแบกo แปฉng dแปฅng mแป›i. Kรญch hoแบกt skill App Builder vร  bแบฏt ฤ‘แบงu ฤ‘แป‘i thoแบกi vแป›i ngฦฐแปi dรนng.
2
+ description: Command to create a new application. Activates the App Builder skill and initiates user dialogue.
3
+ description_vi: Tแบกo แปฉng dแปฅng mแป›i vแป›i kiแบฟn trรบc AI-Ready. Kรญch hoแบกt kแปน nฤƒng App Builder vร  bแบฏt ฤ‘แบงu ฤ‘แป‘i thoแบกi vแป›i ngฦฐแปi dรนng.
3
4
  ---
4
5
 
5
6
  # /create - Create Application
@@ -1,5 +1,6 @@
1
1
  ---
2
- description: Tแบกo vร  xem dashboard trแปฑc quan cแปงa dแปฑ รกn
2
+ description: Create and view visual project dashboards.
3
+ description_vi: Tแบกo vร  xem bแบฃng ฤ‘iแปu khiแปƒn (dashboard) trแปฑc quan cho dแปฑ รกn.
3
4
  ---
4
5
 
5
6
  # /dashboard - Visual Project Overview
@@ -1,5 +1,6 @@
1
1
  ---
2
- description: Lแป‡nh debug. Kรญch hoแบกt chแบฟ ฤ‘แป™ DEBUG ฤ‘แปƒ ฤ‘iแปu tra vแบฅn ฤ‘แป cรณ hแป‡ thแป‘ng.
2
+ description: Debug command. Activates DEBUG mode to systematically investigate issues.
3
+ description_vi: Lแป‡nh gแปก lแป—i. Kรญch hoแบกt chแบฟ ฤ‘แป™ DEBUG ฤ‘แปƒ ฤ‘iแปu tra cรกc vแบฅn ฤ‘แป mแป™t cรกch hแป‡ thแป‘ng.
3
4
  ---
4
5
 
5
6
  # /debug - Systematic Problem Investigation
@@ -1,5 +1,6 @@
1
1
  ---
2
- description: Lแป‡nh deploy cho production. Kiแปƒm tra pre-flight vร  thแปฑc thi deployment.
2
+ description: Production deployment command. Performs pre-flight checks and executes deployment.
3
+ description_vi: Lแป‡nh triแปƒn khai sแบฃn phแบฉm. Thแปฑc hiแป‡n kiแปƒm tra trฦฐแป›c khi bay vร  thแปฑc thi triแปƒn khai.
3
4
  ---
4
5
 
5
6
  # /deploy - Production Deployment
@@ -1,5 +1,6 @@
1
1
  ---
2
- description: Thรชm hoแบทc cแบญp nhแบญt tรญnh nฤƒng trong แปฉng dแปฅng hiแป‡n cรณ. Dรนng cho phรกt triแปƒn lแบทp.
2
+ description: Add or update features in an existing application. Used for iterative development.
3
+ description_vi: Thรชm hoแบทc cแบญp nhแบญt tรญnh nฤƒng trong แปฉng dแปฅng hiแป‡n cรณ. ฤฦฐแปฃc sแปญ dแปฅng cho phรกt triแปƒn lแบทp.
3
4
  ---
4
5
 
5
6
  # /enhance - Update Application
@@ -1,5 +1,6 @@
1
1
  ---
2
- description: ฤแป xuแบฅt bฦฐแป›c tiแบฟp theo cho developer
2
+ description: Suggest the next steps for the developer.
3
+ description_vi: Gแปฃi รฝ cรกc bฦฐแป›c tiแบฟp theo cho nhร  phรกt triแปƒn.
3
4
  ---
4
5
 
5
6
  # /next - What Should I Do Next?
@@ -1,5 +1,6 @@
1
1
  ---
2
- description: ฤiแปu phแป‘i nhiแปu agents cho cรกc tรกc vแปฅ phแปฉc tแบกp. Dรนng cho phรขn tรญch ฤ‘a gรณc nhรฌn, review toร n diแป‡n, hoแบทc cรกc tรกc vแปฅ cแบงn nhiแปu chuyรชn mรดn khรกc nhau.
2
+ description: Coordinate multiple agents for complex tasks. Used for multi-perspective analysis, comprehensive reviews, or tasks requiring different expertise.
3
+ description_vi: ฤiแปu phแป‘i nhiแปu Agent cho cรกc tรกc vแปฅ phแปฉc tแบกp. ฤฦฐแปฃc sแปญ dแปฅng ฤ‘แปƒ phรขn tรญch ฤ‘a chiแปu, ฤ‘รกnh giรก toร n diแป‡n hoแบทc cรกc tรกc vแปฅ yรชu cแบงu chuyรชn mรดn khรกc nhau.
3
4
  ---
4
5
 
5
6
  # Multi-Agent Orchestration
@@ -1,5 +1,6 @@
1
1
  ---
2
- description: Tแบกo project plan sแปญ dแปฅng project-planner agent. Chแป‰ tแบกo file plan - khรดng viแบฟt code.
2
+ description: Create a project plan using the project-planner agent. Only creates plan files - does not write code.
3
+ description_vi: Tแบกo kแบฟ hoแบกch dแปฑ รกn bแบฑng Agent project-planner. Chแป‰ tแบกo file kแบฟ hoแบกch - khรดng viแบฟt code.
3
4
  ---
4
5
 
5
6
  # /plan - Project Planning Mode
@@ -1,5 +1,6 @@
1
1
  ---
2
- description: Quแบฃn lรฝ preview server: start, stop, vร  kiแปƒm tra trแบกng thรกi. Quแบฃn lรฝ local development server.
2
+ description: Manage preview server - start, stop, and status check. Manages local development server.
3
+ description_vi: Quแบฃn lรฝ mรกy chแปง xem trฦฐแป›c - bแบฏt ฤ‘แบงu, dแปซng vร  kiแปƒm tra trแบกng thรกi. Quแบฃn lรฝ mรกy chแปง phรกt triแปƒn cแปฅc bแป™.
3
4
  ---
4
5
 
5
6
  # /preview - Preview Management
@@ -1,5 +1,6 @@
1
1
  ---
2
- description: Tแป‘i ฦฐu hรณa context vร  chแบฅt lฦฐแปฃng output cho Codex CLI. Dรนng cho cรกc tรกc vแปฅ phแปฉc tแบกp cแบงn kแบฟt quแบฃ chแบฅt lฦฐแปฃng cao.
2
+ description: Optimize context and output quality for Codex CLI. Used for complex tasks requiring high-quality results.
3
+ description_vi: Tแป‘i ฦฐu hรณa ngแปฏ cแบฃnh vร  chแบฅt lฦฐแปฃng ฤ‘แบงu ra cho Codex CLI. ฤฦฐแปฃc sแปญ dแปฅng cho cรกc tรกc vแปฅ phแปฉc tแบกp ฤ‘รฒi hแปi kแบฟt quแบฃ chแบฅt lฦฐแปฃng cao.
3
4
  ---
4
5
 
5
6
  # /quality - Quality Optimization Workflow
@@ -1,5 +1,6 @@
1
1
  ---
2
- description: Tแบกo tร i liแป‡u ฤ‘แบทc tแบฃ (specification) trฦฐแป›c khi lแบญp kแบฟ hoแบกch. Dรนng cho cรกc tรญnh nฤƒng phแปฉc tแบกp cแบงn yรชu cแบงu rรต rร ng trฦฐแป›c khi triแปƒn khai.
2
+ description: Create specification documents before planning. Used for complex features requiring clear requirements before implementation.
3
+ description_vi: Tแบกo tร i liแป‡u ฤ‘แบทc tแบฃ trฦฐแป›c khi lแบญp kแบฟ hoแบกch. ฤฦฐแปฃc sแปญ dแปฅng cho cรกc tรญnh nฤƒng phแปฉc tแบกp yรชu cแบงu yรชu cแบงu rรต rร ng trฦฐแป›c khi triแปƒn khai.
3
4
  ---
4
5
 
5
6
  # /spec - Specification Writing Mode
@@ -1,5 +1,6 @@
1
1
  ---
2
- description: Hiแปƒn thแป‹ trแบกng thรกi project vร  agent. Theo dรตi tiแบฟn ฤ‘แป™ vร  bแบฃng trแบกng thรกi.
2
+ description: Display project and agent status. Track progress and status boards.
3
+ description_vi: Hiแปƒn thแป‹ trแบกng thรกi dแปฑ รกn vร  Agent. Theo dรตi tiแบฟn ฤ‘แป™ vร  bแบฃng trแบกng thรกi.
3
4
  ---
4
5
 
5
6
  # /status - Show Status
@@ -1,5 +1,6 @@
1
1
  ---
2
- description: Tแบกo test vร  chแบกy test. Tแบกo vร  thแปฑc thi cรกc test cho code.
2
+ description: Create and run tests. Create and execute tests for the code.
3
+ description_vi: Tแบกo vร  chแบกy cรกc bร i kiแปƒm tra. Tแบกo vร  thแปฑc thi kiแปƒm tra cho mรฃ nguแป“n.
3
4
  ---
4
5
 
5
6
  # /test - Test Generation and Execution
@@ -1,5 +1,6 @@
1
1
  ---
2
- description: Lแบญp kแบฟ hoแบกch vร  triแปƒn khai UI/UX chuyรชn nghiแป‡p
2
+ description: Professional UI/UX planning and implementation.
3
+ description_vi: Lแบญp kแบฟ hoแบกch vร  triแปƒn khai UI/UX chuyรชn nghiแป‡p.
3
4
  ---
4
5
 
5
6
  # UI/UX Pro Max - Design Intelligence
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  > ๐Ÿš€ The Ultimate AI Agent System for Modern Development
4
4
  >
5
- > **16 Agents** โ€ข **58 Skills** โ€ข **13 Workflows** โ€ข **Multi-Platform Support**
5
+ > **16 Agents** โ€ข **58 Skills** โ€ข **17 Workflows** โ€ข **Multi-Platform Support**
6
6
 
7
7
  [![npm version](https://badge.fury.io/js/@musashishao%2Fagent-kit.svg)](https://www.npmjs.com/package/@musashishao/agent-kit)
8
8
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
@@ -29,7 +29,7 @@ This installs the `.agent` folder containing all templates into your project.
29
29
  | **Agents** | 16 | Specialist AI personas (frontend, backend, security, etc.) |
30
30
  | **Skills** | 58 | Domain-specific knowledge modules |
31
31
  | **Intelligence** | 4 | RAG, Knowledge Graph, Memory, and **Verification Gate** |
32
- | **Workflows** | 13 | Slash command procedures |
32
+ | **Workflows** | 17 | Slash command procedures |
33
33
  | **Templates** | 4 | Project templates (web, mobile, backend) |
34
34
 
35
35
  ## ๐Ÿ”— Multi-Platform Support
@@ -109,6 +109,7 @@ After running `setup-codex`, use Agent Kit workflows as slash commands:
109
109
  | `status` | Check installation status |
110
110
  | `sync` | Advanced Sync (Graph + RAG + Memory) |
111
111
  | `memory` | Manage JSON Memory & Session state |
112
+ | `set-lang` | Set Agent & Workflow language (vi/en) |
112
113
 
113
114
  ### Options
114
115
 
@@ -129,10 +130,32 @@ agent-kit setup-codex --prefix my- # Custom prefix for slash commands
129
130
  # Memory management
130
131
  agent-kit memory get --type session # View current session state
131
132
  agent-kit memory update-task --task "X" --status "completed"
133
+
134
+ # Language management
135
+ agent-kit set-lang vi # Switch to Vietnamese
136
+ agent-kit set-lang en # Switch to English (default)
132
137
  ```
133
138
 
134
139
  ---
135
140
 
141
+ ## ๐ŸŒ Localization & Multi-language
142
+
143
+ Agent Kit now supports full localization for the AI experience.
144
+
145
+ ### Supported Languages
146
+ - ๐Ÿ‡บ๐Ÿ‡ธ **English (en)** - Default
147
+ - ๐Ÿ‡ป๐Ÿ‡ณ **Vietnamese (vi)** - Professional translation
148
+
149
+ ### How it works
150
+ Running `ak set-lang vi` performs three actions:
151
+ 1. **AI Instruction Update**: Updates `GEMINI.md` logic to ensure the AI responds in your chosen language.
152
+ 2. **Workflow Swapping**: Physically updates the `description` field in all `.agent/workflows/*.md` files so that CLI tools (Codex, Antigravity) display localized help text.
153
+ 3. **Internal Config**: Saves preference to `.agent/memory/user.json`.
154
+
155
+ > **Note:** If `ak` command is outdated, use `npx @musashishao/agent-kit@latest set-lang vi`
156
+
157
+ ---
158
+
136
159
  ## ๐Ÿ”Œ MCP Integration
137
160
 
138
161
  Agent Kit includes built-in MCP (Model Context Protocol) servers to extend your AI assistant's capabilities.
@@ -194,8 +217,8 @@ mcp featured # Show featured servers
194
217
  .agent/
195
218
  โ”œโ”€โ”€ agents/ # 16 Specialist Agents
196
219
  โ”œโ”€โ”€ skills/ # 42 Skills
197
- โ”œโ”€โ”€ memory/ # ๐Ÿง  AI Session & State (New)
198
- โ”œโ”€โ”€ workflows/ # 13 Slash Commands
220
+ โ”œโ”€โ”€ memory/ # ๐Ÿง  AI Session & State
221
+ โ”œโ”€โ”€ workflows/ # 17 Slash Commands
199
222
  โ”œโ”€โ”€ rules/ # Platform-specific rules
200
223
  โ”‚ โ”œโ”€โ”€ CODEX.md # Codex CLI rules
201
224
  โ”‚ โ””โ”€โ”€ GEMINI.md # Gemini CLI rules
@@ -223,30 +246,35 @@ Skills are loaded automatically based on task context. The AI reads skill descri
223
246
 
224
247
  ### Using Workflows
225
248
 
226
- Invoke workflows with slash commands:
249
+ Invoke localized workflows with slash commands:
227
250
 
228
251
  | Command | Description |
229
252
  |---------|-------------|
230
- | `/brainstorm` | Explore options before implementation |
231
- | `/create` | Create new features or apps |
232
- | `/debug` | Systematic debugging |
233
- | `/deploy` | Deploy application |
234
- | `/enhance` | Improve existing code |
235
- | `/orchestrate` | Multi-agent coordination |
236
- | `/plan` | Create task breakdown |
237
- | `/preview` | Preview changes locally |
238
- | `/quality` | **NEW** Optimize output quality |
239
- | `/status` | Check project status |
240
- | `/test` | Generate and run tests |
241
- | `/context` | Context optimization |
242
- | `/ui-ux-pro-max` | Design with 50 styles |
253
+ | `/autofix` | Autonomous self-healing loop for failed commands |
254
+ | `/brainstorm` | Structured brainstorming for projects and features |
255
+ | `/context` | Auto-generate optimal context for complex tasks |
256
+ | `/create` | Create new applications with AI-Ready infra |
257
+ | `/dashboard` | Create and view visual project dashboards |
258
+ | `/debug` | Systematic problem investigation and root cause analysis |
259
+ | `/deploy` | Production deployment with pre-flight checks |
260
+ | `/enhance` | Add or update features in an existing app |
261
+ | `/next` | Suggest the next logical steps for development |
262
+ | `/orchestrate` | Coordinate 3+ specialized agents for complex tasks |
263
+ | `/plan` | Create detailed project plans and task breakdowns |
264
+ | `/preview` | Manage local development and preview servers |
265
+ | `/quality` | Optimize context and output for high-quality results |
266
+ | `/spec` | Create specification documents before planning |
267
+ | `/status` | Display project and agent health status |
268
+ | `/test` | Generate and execute comprehensive test suites |
269
+ | `/ui-ux-pro-max` | Professional UI/UX planning with 50+ styles |
270
+
271
+ > ๐Ÿ’ก **Tip:** Use `ak set-lang vi` to see these descriptions in Vietnamese!
243
272
 
244
273
  Example:
245
274
  ```
246
- /brainstorm authentication system
247
- /create landing page with hero section
248
- /debug why login fails
249
- /quality create production-ready API
275
+ /kit-create landing page with hero section
276
+ /kit-debug why login fails
277
+ /kit-ui-ux-pro-max dashboard with glassmorphism
250
278
  ```
251
279
 
252
280
  ---
package/bin/cli.js CHANGED
@@ -47,6 +47,7 @@ ${colors.bright}Commands:${colors.reset}
47
47
  ${colors.cyan}doctor${colors.reset} Check configuration and diagnose issues
48
48
  ${colors.cyan}update${colors.reset} Update .agent folder to latest version
49
49
  ${colors.cyan}status${colors.reset} Check installation status
50
+ ${colors.cyan}set-lang${colors.reset} Set Agent language (vi/en)
50
51
 
51
52
  ${colors.bright}AI Subcommands:${colors.reset}
52
53
  ${colors.cyan}ai init${colors.reset} Initialize AI infrastructure (AGENTS.md, Graph, RAG)
@@ -80,6 +81,7 @@ ${colors.bright}Examples:${colors.reset}
80
81
  npx ${PACKAGE_NAME} mcp setup --client claude
81
82
  npx ${PACKAGE_NAME} codex --template web
82
83
  npx ${PACKAGE_NAME} doctor
84
+ npx ${PACKAGE_NAME} set-lang vi # Switch to Vietnamese
83
85
 
84
86
  ${colors.yellow}# To ensure you have the latest version from NPM:${colors.reset}
85
87
  npx ${PACKAGE_NAME}@latest update
@@ -424,7 +426,17 @@ function skillsCommand() {
424
426
  }
425
427
 
426
428
  function workflowsCommand() {
427
- const workflowsDir = path.join(process.cwd(), '.agent', 'workflows');
429
+ const agentDir = path.join(process.cwd(), '.agent');
430
+ const workflowsDir = path.join(agentDir, 'workflows');
431
+ const userJson = path.join(agentDir, 'memory', 'user.json');
432
+
433
+ let language = 'en';
434
+ if (fs.existsSync(userJson)) {
435
+ try {
436
+ const userData = JSON.parse(fs.readFileSync(userJson, 'utf-8'));
437
+ language = (userData.preferences && userData.preferences.language) || 'en';
438
+ } catch (e) {}
439
+ }
428
440
 
429
441
  log.title('โšก Available Workflows (Slash Commands)');
430
442
 
@@ -441,8 +453,19 @@ function workflowsCommand() {
441
453
  const name = wf.replace('.md', '');
442
454
  const content = fs.readFileSync(path.join(workflowsDir, wf), 'utf-8');
443
455
 
444
- const descMatch = content.match(/description:\s*(.+)/);
445
- const desc = descMatch ? descMatch[1] : 'No description';
456
+ let desc = 'No description';
457
+ if (language === 'vi') {
458
+ const viMatch = content.match(/description_vi:\s*(.+)/);
459
+ if (viMatch) {
460
+ desc = viMatch[1];
461
+ } else {
462
+ const enMatch = content.match(/description:\s*(.+)/);
463
+ desc = enMatch ? enMatch[1] : 'No description';
464
+ }
465
+ } else {
466
+ const enMatch = content.match(/description:\s*(.+)/);
467
+ desc = enMatch ? enMatch[1] : 'No description';
468
+ }
446
469
 
447
470
  console.log(` ${colors.green}/${name}${colors.reset}`);
448
471
  console.log(` ${desc}\n`);
@@ -530,6 +553,45 @@ function doctorCommand() {
530
553
  }
531
554
  }
532
555
 
556
+ // ============================================================================
557
+ // Language Command
558
+ // ============================================================================
559
+
560
+ function setLangCommand(lang) {
561
+ const agentDir = path.join(process.cwd(), '.agent');
562
+ const cliScript = path.join(agentDir, 'scripts', 'ak_cli.py');
563
+
564
+ if (!lang) {
565
+ log.error('Language code required.');
566
+ console.log(`Usage: npx ${PACKAGE_NAME} set-lang <code (vi/en)>`);
567
+ return;
568
+ }
569
+
570
+ if (!fs.existsSync(cliScript)) {
571
+ log.error('AI CLI script not found. Make sure Agent Kit is initialized.');
572
+ log.info('Run: npx @musashishao/agent-kit init');
573
+ process.exit(1);
574
+ }
575
+
576
+ log.title(`๐ŸŒ Setting Language to: ${lang}`);
577
+
578
+ try {
579
+ const { spawnSync } = require('child_process');
580
+ const result = spawnSync('python3', [cliScript, '--project-root', process.cwd(), 'memory', 'set-lang', '--value', lang], {
581
+ cwd: process.cwd(),
582
+ stdio: 'inherit',
583
+ });
584
+
585
+ if (result.status !== 0) {
586
+ log.error('Failed to set language.');
587
+ process.exit(result.status || 1);
588
+ }
589
+ } catch (error) {
590
+ log.error(`Failed to set language: ${error.message}`);
591
+ process.exit(1);
592
+ }
593
+ }
594
+
533
595
  // ============================================================================
534
596
  // AI Infrastructure Command
535
597
  // ============================================================================
@@ -1353,6 +1415,9 @@ switch (command) {
1353
1415
  case 'ai':
1354
1416
  aiCommand(args.slice(1), options);
1355
1417
  break;
1418
+ case 'set-lang':
1419
+ setLangCommand(args[1]);
1420
+ break;
1356
1421
  case '--version':
1357
1422
  case '-v':
1358
1423
  showVersion();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@musashishao/agent-kit",
3
- "version": "1.8.0",
3
+ "version": "1.8.2",
4
4
  "description": "AI Agent templates - Skills, Agents, Workflows, and AI-Ready Data Infrastructure Gateway",
5
5
  "main": "index.js",
6
6
  "bin": {