@minhluudev/ai-tools 1.0.8 → 1.0.10

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.
@@ -1,5 +1,5 @@
1
1
  import { buildLibInstallPlan, detectSupportedHostOs } from "./ai-libs.js";
2
- import { canRun, createTabbedLayout, DEBOUNCE_MOVE_MS, DEBOUNCE_SELECT_MS, renderBannerHeader, renderKeycaps, renderListRow, renderStepSummary, renderTabBar, selectionArray } from "./tui-utils.js";
2
+ import { canRun, createTabbedLayout, DEBOUNCE_MOVE_MS, DEBOUNCE_SELECT_MS, renderBannerHeader, renderKeycaps, renderListRow, renderListContent, renderStepSummary, renderTabBar, selectionArray } from "./tui-utils.js";
3
3
  const TAB_ORDER = ["libraries", "agents", "os", "scope", "mode", "review"];
4
4
  function buildInitialState() {
5
5
  return {
@@ -26,20 +26,20 @@ function currentTabItems(state) {
26
26
  return [
27
27
  {
28
28
  id: "rtk",
29
- label: "rtk-ai/rtk",
29
+ label: "◈ rtk-ai/rtk",
30
30
  description: "Token-saving CLI proxy with agent-specific init for Codex and Claude.",
31
31
  kind: "library"
32
32
  },
33
33
  {
34
34
  id: "icm",
35
- label: "rtk-ai/icm",
35
+ label: "◈ rtk-ai/icm",
36
36
  description: "Persistent agent memory with MCP, CLI instructions, rules, and hooks.",
37
37
  kind: "library"
38
38
  },
39
39
  {
40
40
  id: "ecc",
41
- label: "affaan-m/ECC",
42
- description: "Run ECC's upstream full manual installer with notes about Codex sync and Claude plugin overlap.",
41
+ label: "◈ affaan-m/ECC",
42
+ description: "Coding rules, agent instructions, hooks, and skills library for Claude Code and Codex.",
43
43
  kind: "library"
44
44
  }
45
45
  ];
@@ -48,14 +48,14 @@ function currentTabItems(state) {
48
48
  return [
49
49
  {
50
50
  id: "codex",
51
- label: "codex",
52
- description: "Configure the OpenAI Codex integration paths when supported upstream.",
51
+ label: "◇ Codex",
52
+ description: "Apply library setup to OpenAI Codex config, AGENTS.md, and agent-specific directories.",
53
53
  kind: "agents"
54
54
  },
55
55
  {
56
56
  id: "claude",
57
- label: "claude",
58
- description: "Configure the Claude integration paths when supported upstream.",
57
+ label: "◇ Claude",
58
+ description: "Apply library setup to Claude Code config, CLAUDE.md, and agent-specific directories.",
59
59
  kind: "agents"
60
60
  }
61
61
  ];
@@ -64,13 +64,13 @@ function currentTabItems(state) {
64
64
  return [
65
65
  {
66
66
  id: "mac",
67
- label: "mac",
67
+ label: "⊙ Mac",
68
68
  description: "Run the install flow for a macOS host.",
69
69
  kind: "os"
70
70
  },
71
71
  {
72
72
  id: "linux",
73
- label: "linux",
73
+ label: "⊙ Linux",
74
74
  description: "Run the install flow for a Linux host.",
75
75
  kind: "os"
76
76
  }
@@ -80,14 +80,14 @@ function currentTabItems(state) {
80
80
  return [
81
81
  {
82
82
  id: "global",
83
- label: "global",
83
+ label: "⊙ Global",
84
84
  description: "Use global agent configuration in home-directory tool config files.",
85
85
  kind: "scope"
86
86
  },
87
87
  {
88
88
  id: "local",
89
- label: "local",
90
- description: "Use project-scoped setup where the upstream library supports it.",
89
+ label: "⊕ Local",
90
+ description: "Install into the project's own config dirs (.claude/, .codex/) instead of the home directory.",
91
91
  kind: "scope"
92
92
  }
93
93
  ];
@@ -96,13 +96,13 @@ function currentTabItems(state) {
96
96
  return [
97
97
  {
98
98
  id: "install",
99
- label: "Install",
99
+ label: "▶ Install",
100
100
  description: "Install the selected libraries and configure the chosen integrations.",
101
101
  kind: "mode"
102
102
  },
103
103
  {
104
104
  id: "uninstall",
105
- label: "Uninstall",
105
+ label: "← Uninstall",
106
106
  description: "Remove library-managed integrations safely and clean up only library-specific artifacts.",
107
107
  kind: "mode"
108
108
  }
@@ -111,19 +111,19 @@ function currentTabItems(state) {
111
111
  return [
112
112
  {
113
113
  id: "confirm",
114
- label: "Confirm install",
114
+ label: "✓ Confirm install",
115
115
  description: "Run the planned install and configuration commands.",
116
116
  kind: "review"
117
117
  },
118
118
  {
119
119
  id: "back",
120
- label: "Back to main menu",
120
+ label: "← Back to main menu",
121
121
  description: "Leave this installer and return to the main menu.",
122
122
  kind: "review"
123
123
  },
124
124
  {
125
125
  id: "cancel",
126
- label: "Cancel",
126
+ label: "✕ Cancel",
127
127
  description: "Exit without installing anything.",
128
128
  kind: "review"
129
129
  }
@@ -202,7 +202,6 @@ function formatListItem(item, state, isCursorRow, index) {
202
202
  active: isCursorRow,
203
203
  selected: state.reviewAction === item.id,
204
204
  label: item.label,
205
- meta: item.description,
206
205
  index
207
206
  });
208
207
  }
@@ -210,20 +209,22 @@ function formatListItem(item, state, isCursorRow, index) {
210
209
  active: isCursorRow,
211
210
  selected: isItemSelected(item, state),
212
211
  label: item.label,
213
- meta: item.description,
214
212
  index
215
213
  });
216
214
  }
217
215
  function renderReviewSummary(state) {
218
216
  const selectedLibraries = selectionArray(state.selectedLibraries);
219
217
  const selectedAgents = selectionArray(state.selectedAgents);
218
+ const sep = `{cyan-fg}${"─".repeat(50)}{/cyan-fg}`;
219
+ const none = "{gray-fg}none{/gray-fg}";
220
220
  const lines = [
221
- "{bold}Selections{/bold}",
222
- `Libraries ${selectedLibraries.length ? selectedLibraries.join(", ") : "none"}`,
223
- `Agents ${selectedAgents.length ? selectedAgents.join(", ") : "none"}`,
224
- `OS ${state.selectedOs ?? "none"}`,
225
- `Scope ${state.selectedScope}`,
226
- `Mode ${state.selectedMode}`
221
+ `{bold}{white-fg}◈ Summary{/white-fg}{/bold}`,
222
+ sep,
223
+ `{cyan-fg}◆ Libraries{/cyan-fg} ${selectedLibraries.length ? selectedLibraries.join(", ") : none}`,
224
+ `{cyan-fg}◆ Agents{/cyan-fg} ${selectedAgents.length ? selectedAgents.join(", ") : none}`,
225
+ `{cyan-fg}◆ OS{/cyan-fg} ${state.selectedOs ?? none}`,
226
+ `{cyan-fg}◆ Scope{/cyan-fg} ${state.selectedScope}`,
227
+ `{cyan-fg}◆ Mode{/cyan-fg} ${state.selectedMode}`
227
228
  ];
228
229
  if (selectedLibraries.length > 0 && selectedAgents.length > 0 && state.selectedOs) {
229
230
  const plan = buildLibInstallPlan({
@@ -233,14 +234,14 @@ function renderReviewSummary(state) {
233
234
  agents: selectedAgents,
234
235
  libraries: selectedLibraries
235
236
  });
236
- lines.push("", "{bold}Planned steps{/bold}");
237
+ lines.push("", sep, `{bold}{white-fg}⊕ Planned steps{/white-fg}{/bold}`);
237
238
  for (const step of plan.steps) {
238
- lines.push(`- ${step.title}`);
239
+ lines.push(` {gray-fg}▶{/gray-fg} ${step.title}`);
239
240
  }
240
241
  if (plan.notes.length > 0) {
241
- lines.push("", "{bold}Notes{/bold}");
242
+ lines.push("", `{bold}{white-fg}◎ Notes{/white-fg}{/bold}`);
242
243
  for (const note of plan.notes) {
243
- lines.push(`- ${note}`);
244
+ lines.push(` {gray-fg}·{/gray-fg} ${note}`);
244
245
  }
245
246
  }
246
247
  }
@@ -261,7 +262,7 @@ function renderDetailBody(state) {
261
262
  }
262
263
  if (current) {
263
264
  const selectedCount = items.filter((item) => isItemSelected(item, state)).length;
264
- lines.push("{bold}Selected in this step{/bold}", `${selectedCount} of ${items.length}`, "", "{bold}About current item{/bold}", current.description);
265
+ lines.push(`{cyan-fg}◆ ${selectedCount} of ${items.length} selected{/cyan-fg}`, `{gray-fg}${"─".repeat(40)}{/gray-fg}`, `{bold}{white-fg}${current.label}{/white-fg}{/bold}`, `{gray-fg}${current.description}{/gray-fg}`);
265
266
  }
266
267
  return lines.join("\n");
267
268
  }
@@ -337,9 +338,8 @@ function syncListSelection(listBox, state) {
337
338
  const maxIndex = Math.max(items.length - 1, 0);
338
339
  const cursor = Math.min(state.listCursor[state.activeTab], maxIndex);
339
340
  state.listCursor[state.activeTab] = cursor;
340
- listBox.setItems(items.map((item, index) => formatListItem(item, state, index === cursor, index)));
341
- listBox.select(cursor);
342
- listBox.scrollTo(cursor);
341
+ const rendered = items.map((item, index) => formatListItem(item, state, index === cursor, index));
342
+ renderListContent(listBox, rendered, cursor);
343
343
  }
344
344
  export async function runAiLibsWizard() {
345
345
  return new Promise((resolve, reject) => {
@@ -3,31 +3,31 @@ import { canRun, DEBOUNCE_MOVE_MS, DEBOUNCE_SELECT_MS, renderBannerHeader, rende
3
3
  const MENU_ITEMS = [
4
4
  {
5
5
  id: "install-skills",
6
- label: "Install agent skills",
6
+ label: "◈ Install agent skills",
7
7
  description: "Open the guided installer for Codex skills and Claude custom agents.",
8
8
  meta: "Codex + Claude"
9
9
  },
10
10
  {
11
11
  id: "install-project-docs",
12
- label: "Install project docs",
12
+ label: "▤ Install project docs",
13
13
  description: "Copy selected project docs and workflow templates into the current repository.",
14
14
  meta: "Current repo"
15
15
  },
16
16
  {
17
17
  id: "install-libs",
18
- label: "Install libs for AI",
18
+ label: "⬡ Install libs for AI",
19
19
  description: "Install RTK, ICM, or ECC, then run the supported setup flow for Codex and Claude.",
20
20
  meta: "Mac + Linux"
21
21
  },
22
22
  {
23
23
  id: "install-mcp",
24
- label: "Install mcp",
24
+ label: "◎ Install MCP",
25
25
  description: "Add or remove Ant Design, GitLab, GitHub, and Figma MCP servers for Codex or Claude.",
26
26
  meta: "Codex + Claude"
27
27
  },
28
28
  {
29
29
  id: "cancel",
30
- label: "Cancel",
30
+ label: "✕ Cancel",
31
31
  description: "Exit without running any installer.",
32
32
  meta: "Safe exit"
33
33
  }
@@ -35,8 +35,7 @@ const MENU_ITEMS = [
35
35
  function renderItem(item, isActive) {
36
36
  return renderListRow({
37
37
  active: isActive,
38
- label: item.label,
39
- meta: item.meta
38
+ label: item.label
40
39
  });
41
40
  }
42
41
  export async function runEntryMenu() {
@@ -52,7 +51,7 @@ export async function runEntryMenu() {
52
51
  });
53
52
  const headerBox = blessed.box({
54
53
  parent: screen,
55
- top: 1,
54
+ top: 0,
56
55
  left: 2,
57
56
  width: "100%-4",
58
57
  height: 6,
@@ -71,17 +70,17 @@ export async function runEntryMenu() {
71
70
  });
72
71
  const listBox = blessed.list({
73
72
  parent: screen,
74
- top: 8,
73
+ top: 6,
75
74
  left: 2,
76
- width: "100%-4",
77
- height: 8,
75
+ width: "40%-2",
76
+ height: "100%-7",
78
77
  tags: true,
79
78
  keys: false,
80
79
  vi: false,
81
80
  mouse: false,
82
81
  interactive: false,
83
82
  border: { type: "line" },
84
- label: " workflows ",
83
+ label: " menu ",
85
84
  padding: {
86
85
  left: 1,
87
86
  right: 1
@@ -99,10 +98,10 @@ export async function runEntryMenu() {
99
98
  });
100
99
  const detailBox = blessed.box({
101
100
  parent: screen,
102
- top: 17,
103
- left: 2,
104
- width: "100%-4",
105
- height: 7,
101
+ top: 6,
102
+ left: "40%",
103
+ width: "60%-2",
104
+ height: "100%-7",
106
105
  tags: true,
107
106
  wrap: true,
108
107
  border: { type: "line" },
@@ -132,6 +131,7 @@ export async function runEntryMenu() {
132
131
  screen.destroy();
133
132
  }
134
133
  function render() {
134
+ const active = MENU_ITEMS[cursor];
135
135
  headerBox.setContent(renderBannerHeader("Main menu", "Choose the workflow you want to run.", [
136
136
  { label: `${MENU_ITEMS.length - 1} workflows`, tone: "accent" },
137
137
  { label: "Keyboard only", tone: "muted" },
@@ -140,9 +140,12 @@ export async function runEntryMenu() {
140
140
  listBox.setItems(MENU_ITEMS.map((item, index) => renderItem(item, index === cursor)));
141
141
  listBox.select(cursor);
142
142
  detailBox.setContent([
143
- `{bold}${MENU_ITEMS[cursor].label}{/bold} {gray-fg}${MENU_ITEMS[cursor].meta}{/gray-fg}`,
143
+ `{bold}{white-fg}${active.label}{/white-fg}{/bold}`,
144
+ `{cyan-fg}${active.meta}{/cyan-fg}`,
145
+ "",
146
+ `{gray-fg}${"─".repeat(36)}{/gray-fg}`,
144
147
  "",
145
- MENU_ITEMS[cursor].description,
148
+ active.description,
146
149
  "",
147
150
  "{gray-fg}Tip: complete one workflow, then rerun the CLI for another task.{/gray-fg}"
148
151
  ].join("\n"));
@@ -1,5 +1,5 @@
1
1
  import { buildMcpInstallPlan } from "./mcp.js";
2
- import { canRun, createTabbedLayout, DEBOUNCE_MOVE_MS, DEBOUNCE_SELECT_MS, renderBannerHeader, renderKeycaps, renderListRow, renderStepSummary, renderTabBar, selectionArray } from "./tui-utils.js";
2
+ import { canRun, createTabbedLayout, DEBOUNCE_MOVE_MS, DEBOUNCE_SELECT_MS, renderBannerHeader, renderKeycaps, renderListRow, renderListContent, renderStepSummary, renderTabBar, selectionArray } from "./tui-utils.js";
3
3
  const TAB_ORDER = ["servers", "agent", "mode", "os", "review"];
4
4
  function buildInitialState() {
5
5
  return {
@@ -24,31 +24,31 @@ function currentTabItems(state) {
24
24
  return [
25
25
  {
26
26
  id: "antd",
27
- label: "Ant Design",
27
+ label: "◎ Ant Design",
28
28
  description: "Official Ant Design MCP server exposed by `@ant-design/cli`.",
29
29
  kind: "server"
30
30
  },
31
31
  {
32
32
  id: "gitlab",
33
- label: "GitLab",
33
+ label: "◎ GitLab",
34
34
  description: "GitLab.com MCP endpoint with OAuth-based authorization.",
35
35
  kind: "server"
36
36
  },
37
37
  {
38
38
  id: "github",
39
- label: "GitHub",
39
+ label: "◎ GitHub",
40
40
  description: "GitHub's hosted MCP server using PAT-based access.",
41
41
  kind: "server"
42
42
  },
43
43
  {
44
44
  id: "figma",
45
- label: "Figma",
45
+ label: "◎ Figma",
46
46
  description: "Figma's remote MCP server for design context and write-back workflows.",
47
47
  kind: "server"
48
48
  },
49
49
  {
50
50
  id: "shadcn",
51
- label: "Shadcn",
51
+ label: "◎ Shadcn",
52
52
  description: "Shadcn/ui registry MCP server for browsing, searching, and installing components.",
53
53
  kind: "server"
54
54
  }
@@ -58,13 +58,13 @@ function currentTabItems(state) {
58
58
  return [
59
59
  {
60
60
  id: "codex",
61
- label: "Codex",
61
+ label: "◇ Codex",
62
62
  description: "Configure the selected MCP servers for OpenAI Codex.",
63
63
  kind: "agent"
64
64
  },
65
65
  {
66
66
  id: "claude",
67
- label: "Claude",
67
+ label: "◇ Claude",
68
68
  description: "Configure the selected MCP servers for Claude Code.",
69
69
  kind: "agent"
70
70
  }
@@ -74,13 +74,13 @@ function currentTabItems(state) {
74
74
  return [
75
75
  {
76
76
  id: "install",
77
- label: "Install",
77
+ label: "▶ Install",
78
78
  description: "Add or register the selected MCP servers in the chosen agent.",
79
79
  kind: "mode"
80
80
  },
81
81
  {
82
82
  id: "uninstall",
83
- label: "Uninstall",
83
+ label: "← Uninstall",
84
84
  description: "Remove the selected MCP server entries from the chosen agent.",
85
85
  kind: "mode"
86
86
  }
@@ -90,13 +90,13 @@ function currentTabItems(state) {
90
90
  return [
91
91
  {
92
92
  id: "mac",
93
- label: "MacOS",
93
+ label: "⊙ MacOS",
94
94
  description: "Apple macOS (darwin). Homebrew-based paths and macOS shell profiles apply.",
95
95
  kind: "os"
96
96
  },
97
97
  {
98
98
  id: "linux",
99
- label: "Linux",
99
+ label: "⊙ Linux",
100
100
  description: "Linux distributions. Standard XDG paths and bash/zsh shell profiles apply.",
101
101
  kind: "os"
102
102
  }
@@ -105,19 +105,19 @@ function currentTabItems(state) {
105
105
  return [
106
106
  {
107
107
  id: "confirm",
108
- label: state.selectedMode === "install" ? "Confirm install" : "Confirm uninstall",
108
+ label: state.selectedMode === "install" ? "✓ Confirm install" : "✓ Confirm uninstall",
109
109
  description: "Run the planned MCP commands.",
110
110
  kind: "review"
111
111
  },
112
112
  {
113
113
  id: "back",
114
- label: "Back to main menu",
114
+ label: "← Back to main menu",
115
115
  description: "Leave this workflow and return to the main menu.",
116
116
  kind: "review"
117
117
  },
118
118
  {
119
119
  id: "cancel",
120
- label: "Cancel",
120
+ label: "✕ Cancel",
121
121
  description: "Exit without changing MCP configuration.",
122
122
  kind: "review"
123
123
  }
@@ -196,7 +196,6 @@ function formatListItem(item, state, isCursorRow, index) {
196
196
  active: isCursorRow,
197
197
  selected: state.reviewAction === item.id,
198
198
  label: item.label,
199
- meta: item.description,
200
199
  index
201
200
  });
202
201
  }
@@ -204,19 +203,21 @@ function formatListItem(item, state, isCursorRow, index) {
204
203
  active: isCursorRow,
205
204
  selected: isItemSelected(item, state),
206
205
  label: item.label,
207
- meta: item.description,
208
206
  index
209
207
  });
210
208
  }
211
209
  function renderReviewSummary(state) {
212
210
  const selectedServers = selectionArray(state.selectedServers);
213
211
  const selectedAgents = selectionArray(state.selectedAgents);
212
+ const sep = `{cyan-fg}${"─".repeat(50)}{/cyan-fg}`;
213
+ const none = "{gray-fg}none{/gray-fg}";
214
214
  const lines = [
215
- "{bold}Selections{/bold}",
216
- `MCPs ${selectedServers.length ? selectedServers.join(", ") : "none"}`,
217
- `Agents ${selectedAgents.length ? selectedAgents.join(", ") : "none"}`,
218
- `Mode ${state.selectedMode}`,
219
- `OS ${state.selectedOs === "mac" ? "MacOS" : "Linux"}`
215
+ `{bold}{white-fg}◈ Summary{/white-fg}{/bold}`,
216
+ sep,
217
+ `{cyan-fg}◆ MCPs{/cyan-fg} ${selectedServers.length ? selectedServers.join(", ") : none}`,
218
+ `{cyan-fg}◆ Agents{/cyan-fg} ${selectedAgents.length ? selectedAgents.join(", ") : none}`,
219
+ `{cyan-fg}◆ Mode{/cyan-fg} ${state.selectedMode}`,
220
+ `{cyan-fg}◆ OS{/cyan-fg} ${state.selectedOs === "mac" ? "MacOS" : "Linux"}`
220
221
  ];
221
222
  if (selectedServers.length > 0 && selectedAgents.length > 0) {
222
223
  const plan = buildMcpInstallPlan({
@@ -225,26 +226,26 @@ function renderReviewSummary(state) {
225
226
  servers: selectedServers,
226
227
  os: state.selectedOs
227
228
  });
228
- lines.push("", "{bold}Planned steps{/bold}");
229
+ lines.push("", sep, `{bold}{white-fg}⊕ Planned steps{/white-fg}{/bold}`);
229
230
  for (const step of plan.steps) {
230
- lines.push(`- ${step.title}: ${step.command}`);
231
+ lines.push(` {gray-fg}▶{/gray-fg} ${step.title} {gray-fg}${step.command}{/gray-fg}`);
231
232
  }
232
233
  if (plan.notes.length > 0) {
233
- lines.push("", "{bold}Notes{/bold}");
234
+ lines.push("", `{bold}{white-fg}◎ Notes{/white-fg}{/bold}`);
234
235
  for (const note of plan.notes) {
235
- lines.push(`- ${note}`);
236
+ lines.push(` {gray-fg}·{/gray-fg} ${note}`);
236
237
  }
237
238
  }
238
239
  if (plan.postInstallConfig.length > 0) {
239
- lines.push("", "{bold}After install{/bold}");
240
+ lines.push("", `{bold}{white-fg}◎ After install{/white-fg}{/bold}`);
240
241
  for (const item of plan.postInstallConfig) {
241
- lines.push(`- ${item}`);
242
+ lines.push(` {gray-fg}·{/gray-fg} ${item}`);
242
243
  }
243
244
  }
244
245
  if (plan.sources.length > 0) {
245
- lines.push("", "{bold}Sources{/bold}");
246
+ lines.push("", `{bold}{white-fg}◎ Sources{/white-fg}{/bold}`);
246
247
  for (const source of plan.sources) {
247
- lines.push(`- ${source.label}: ${source.url}`);
248
+ lines.push(` {gray-fg}·{/gray-fg} ${source.label} {gray-fg}${source.url}{/gray-fg}`);
248
249
  }
249
250
  }
250
251
  }
@@ -265,7 +266,7 @@ function renderDetailBody(state) {
265
266
  }
266
267
  if (current) {
267
268
  const selectedCount = items.filter((item) => isItemSelected(item, state)).length;
268
- lines.push("{bold}Selected in this step{/bold}", `${selectedCount} of ${items.length}`, "", "{bold}About current item{/bold}", current.description);
269
+ lines.push(`{cyan-fg}◆ ${selectedCount} of ${items.length} selected{/cyan-fg}`, `{gray-fg}${"─".repeat(40)}{/gray-fg}`, `{bold}{white-fg}${current.label}{/white-fg}{/bold}`, `{gray-fg}${current.description}{/gray-fg}`);
269
270
  }
270
271
  return lines.join("\n");
271
272
  }
@@ -332,9 +333,8 @@ function syncListSelection(listBox, state) {
332
333
  const maxIndex = Math.max(items.length - 1, 0);
333
334
  const cursor = Math.min(state.listCursor[state.activeTab], maxIndex);
334
335
  state.listCursor[state.activeTab] = cursor;
335
- listBox.setItems(items.map((item, index) => formatListItem(item, state, index === cursor, index)));
336
- listBox.select(cursor);
337
- listBox.scrollTo(cursor);
336
+ const rendered = items.map((item, index) => formatListItem(item, state, index === cursor, index));
337
+ renderListContent(listBox, rendered, cursor);
338
338
  }
339
339
  export async function runMcpWizard() {
340
340
  return new Promise((resolve, reject) => {
@@ -1,4 +1,4 @@
1
- import { canRun, createTabbedLayout, DEBOUNCE_MOVE_MS, DEBOUNCE_SELECT_MS, renderBannerHeader, renderKeycaps, renderListRow, renderStepSummary, renderTabBar } from "./tui-utils.js";
1
+ import { canRun, createTabbedLayout, DEBOUNCE_MOVE_MS, DEBOUNCE_SELECT_MS, renderBannerHeader, renderKeycaps, renderListRow, renderListContent, renderStepSummary, renderTabBar } from "./tui-utils.js";
2
2
  const TAB_ORDER = ["skills", "review"];
3
3
  function buildInitialState() {
4
4
  return {
@@ -16,7 +16,7 @@ function currentTabItems(state, catalog) {
16
16
  if (state.activeTab === "skills") {
17
17
  return catalog.skills.map((skill) => ({
18
18
  id: skill.id,
19
- label: skill.label,
19
+ label: `◈ ${skill.label}`,
20
20
  description: skill.description,
21
21
  kind: "skills"
22
22
  }));
@@ -24,19 +24,19 @@ function currentTabItems(state, catalog) {
24
24
  return [
25
25
  {
26
26
  id: "confirm",
27
- label: "Confirm install",
27
+ label: "✓ Confirm install",
28
28
  description: "Continue with the selected skills.",
29
29
  kind: "review"
30
30
  },
31
31
  {
32
32
  id: "back",
33
- label: "Back to main menu",
33
+ label: "← Back to main menu",
34
34
  description: "Leave this installer and return to the main menu.",
35
35
  kind: "review"
36
36
  },
37
37
  {
38
38
  id: "cancel",
39
- label: "Cancel",
39
+ label: "✕ Cancel",
40
40
  description: "Exit without installing anything.",
41
41
  kind: "review"
42
42
  }
@@ -72,24 +72,25 @@ function formatListItem(item, state, isCursorRow) {
72
72
  return renderListRow({
73
73
  active: isCursorRow,
74
74
  selected: state.reviewAction === item.id,
75
- label: item.label,
76
- meta: item.description
75
+ label: item.label
77
76
  });
78
77
  }
79
78
  return renderListRow({
80
79
  active: isCursorRow,
81
80
  selected: isItemSelected(item, state),
82
- label: item.label,
83
- meta: item.description
81
+ label: item.label
84
82
  });
85
83
  }
86
84
  function renderReviewSummary(state, catalog) {
87
85
  const selectedSkills = catalog.skills
88
86
  .filter((skill) => state.selectedSkills.has(skill.id))
89
87
  .map((skill) => skill.label);
88
+ const sep = `{cyan-fg}${"─".repeat(50)}{/cyan-fg}`;
89
+ const none = "{gray-fg}none{/gray-fg}";
90
90
  const lines = [
91
- "{bold}Selections{/bold}",
92
- `Skills ${selectedSkills.length ? selectedSkills.join(", ") : "none"}`
91
+ `{bold}{white-fg}◈ Summary{/white-fg}{/bold}`,
92
+ sep,
93
+ `{cyan-fg}◆ Skills{/cyan-fg} ${selectedSkills.length ? selectedSkills.join(", ") : none}`
93
94
  ];
94
95
  if (state.notice) {
95
96
  lines.push("", `{yellow-fg}${state.notice}{/yellow-fg}`);
@@ -107,7 +108,7 @@ function renderDetailBody(state, catalog) {
107
108
  lines.push(`{yellow-fg}${state.notice}{/yellow-fg}`, "");
108
109
  }
109
110
  if (current) {
110
- lines.push("{bold}Selected in this step{/bold}", `${state.selectedSkills.size} of ${items.length}`, "", "{bold}About current item{/bold}", current.description);
111
+ lines.push(`{cyan-fg}◆ ${state.selectedSkills.size} of ${items.length} selected{/cyan-fg}`, `{gray-fg}${"─".repeat(40)}{/gray-fg}`, `{bold}{white-fg}${current.label}{/white-fg}{/bold}`, `{gray-fg}${current.description}{/gray-fg}`);
111
112
  }
112
113
  return lines.join("\n");
113
114
  }
@@ -157,9 +158,8 @@ function syncListSelection(listBox, state, catalog) {
157
158
  const maxIndex = Math.max(items.length - 1, 0);
158
159
  const cursor = Math.min(state.listCursor[state.activeTab], maxIndex);
159
160
  state.listCursor[state.activeTab] = cursor;
160
- listBox.setItems(items.map((item, index) => formatListItem(item, state, index === cursor)));
161
- listBox.select(cursor);
162
- listBox.scrollTo(cursor);
161
+ const rendered = items.map((item, index) => formatListItem(item, state, index === cursor));
162
+ renderListContent(listBox, rendered, cursor);
163
163
  }
164
164
  export async function runProjectDocsWizard(catalog) {
165
165
  return new Promise((resolve, reject) => {
@@ -29,41 +29,47 @@ export function renderBannerHeader(title, subtitle, chips = []) {
29
29
  ? chips.map((chip) => renderChip(chip.label, chip.tone)).join(" ")
30
30
  : renderChip("Terminal installer", "muted");
31
31
  return [
32
- `{bold}${renderChip("AI TOOLS")} ${title}{/bold}`,
32
+ `{bold}${renderChip("◈ AI TOOLS")} {white-fg}${title}{/white-fg}{/bold}`,
33
33
  `{gray-fg}${subtitle}{/gray-fg}`,
34
34
  chipLine,
35
- "{cyan-fg}======================================================================{/cyan-fg}"
35
+ `{cyan-fg}${"─".repeat(70)}{/cyan-fg}`
36
36
  ].join("\n");
37
37
  }
38
38
  export function renderTabBar(tabs) {
39
39
  return tabs
40
40
  .map((tab) => {
41
+ const indicator = tab.active ? "●" : "○";
41
42
  const meta = tab.meta ? ` {gray-fg}${tab.meta}{/gray-fg}` : "";
42
- const content = ` ${tab.label}${meta} `;
43
+ const content = ` ${indicator} ${tab.label}${meta} `;
43
44
  return tab.active
44
- ? `{black-fg}{yellow-bg}${content}{/yellow-bg}{/black-fg}`
45
- : `{cyan-fg}${content}{/cyan-fg}`;
45
+ ? `{bold}{black-fg}{cyan-bg}${content}{/cyan-bg}{/black-fg}{/bold}`
46
+ : `{gray-fg}${content}{/gray-fg}`;
46
47
  })
47
48
  .join(" ");
48
49
  }
49
50
  export function renderStepSummary(input) {
50
- const lines = [
51
- `{bold}${input.step}{/bold} {white-fg}${input.title}{/white-fg}`,
51
+ const statusPart = input.status ? ` ${renderChip(input.status, "muted")}` : "";
52
+ return [
53
+ `{bold}${renderChip(input.step, "accent")} {white-fg}${input.title}{/white-fg}${statusPart}{/bold}`,
52
54
  `{gray-fg}${input.description}{/gray-fg}`
53
- ];
54
- if (input.status) {
55
- lines.push(renderChip(input.status, "muted"));
56
- }
57
- return lines.join("\n");
55
+ ].join("\n");
58
56
  }
59
57
  export function renderListRow(input) {
60
- const marker = input.selected === undefined ? " " : input.selected ? "x" : " ";
58
+ const marker = input.selected === undefined ? " " : input.selected ? "◆" : "◇";
61
59
  const indexLabel = input.index === undefined ? "" : `${String(input.index + 1).padStart(2, "0")} `;
62
- const row = `${input.active ? ">" : " "} [${marker}] ${indexLabel}${input.label}`;
63
- const content = input.meta ? `${row} {gray-fg}${input.meta}{/gray-fg}` : row;
64
- return input.active
65
- ? `{black-fg}{yellow-bg}${content}{/yellow-bg}{/black-fg}`
66
- : content;
60
+ const cursor = input.active ? "▶" : " ";
61
+ const row = `${cursor} ${marker} ${indexLabel}${input.label}`;
62
+ const metaPart = input.meta ? ` {gray-fg}${input.meta}{/gray-fg}` : "";
63
+ const labelLine = input.active
64
+ ? `{black-fg}{yellow-bg}${row}${metaPart}{/yellow-bg}{/black-fg}`
65
+ : input.selected
66
+ ? `{cyan-fg}${row}${metaPart}{/cyan-fg}`
67
+ : row + metaPart;
68
+ const indent = " ".repeat(4 + indexLabel.length);
69
+ const descLine = input.description
70
+ ? `\n${indent}{gray-fg}${input.description}{/gray-fg}`
71
+ : "";
72
+ return labelLine + descLine;
67
73
  }
68
74
  function renderActionButton(label, active, tone) {
69
75
  if (active && tone === "success") {
@@ -124,7 +130,7 @@ export async function blessedSelect(input) {
124
130
  lines.push(renderListRow({
125
131
  active: i === cursor,
126
132
  label: choice.label,
127
- meta: choice.description
133
+ description: choice.description
128
134
  }));
129
135
  }
130
136
  promptBox.setContent(lines.join("\n"));
@@ -231,7 +237,7 @@ export function createTabbedLayout() {
231
237
  });
232
238
  const headerBox = blessed.box({
233
239
  parent: screen,
234
- top: 1,
240
+ top: 0,
235
241
  left: 2,
236
242
  width: "100%-4",
237
243
  height: 6,
@@ -251,7 +257,7 @@ export function createTabbedLayout() {
251
257
  });
252
258
  const tabsBox = blessed.box({
253
259
  parent: screen,
254
- top: 8,
260
+ top: 6,
255
261
  left: 2,
256
262
  width: "100%-4",
257
263
  height: 3,
@@ -270,7 +276,7 @@ export function createTabbedLayout() {
270
276
  });
271
277
  const titleBox = blessed.box({
272
278
  parent: screen,
273
- top: 11,
279
+ top: 9,
274
280
  left: 2,
275
281
  width: "100%-4",
276
282
  height: 4,
@@ -287,17 +293,13 @@ export function createTabbedLayout() {
287
293
  }
288
294
  }
289
295
  });
290
- const listBox = blessed.list({
296
+ const listBox = blessed.box({
291
297
  parent: screen,
292
- top: 15,
298
+ top: 13,
293
299
  left: 2,
294
300
  width: "100%-4",
295
- height: "100%-23",
301
+ height: "100%-24",
296
302
  tags: true,
297
- keys: false,
298
- vi: false,
299
- mouse: false,
300
- interactive: false,
301
303
  scrollable: true,
302
304
  alwaysScroll: true,
303
305
  border: { type: "line" },
@@ -309,15 +311,10 @@ export function createTabbedLayout() {
309
311
  style: {
310
312
  border: {
311
313
  fg: "blue"
312
- },
313
- selected: {
314
- bold: true,
315
- fg: "black",
316
- bg: "yellow"
317
314
  }
318
315
  },
319
316
  scrollbar: {
320
- ch: " ",
317
+ ch: "│",
321
318
  track: {
322
319
  bg: "gray"
323
320
  },
@@ -331,7 +328,7 @@ export function createTabbedLayout() {
331
328
  left: 2,
332
329
  bottom: 2,
333
330
  width: "100%-4",
334
- height: 5,
331
+ height: 7,
335
332
  tags: true,
336
333
  wrap: true,
337
334
  border: { type: "line" },
@@ -359,3 +356,11 @@ export function createTabbedLayout() {
359
356
  });
360
357
  return { screen, headerBox, tabsBox, titleBox, listBox, detailBox, footerBox };
361
358
  }
359
+ export function renderListContent(listBox, renderedItems, cursorIndex) {
360
+ listBox.setContent(renderedItems.join("\n"));
361
+ let visualRow = 0;
362
+ for (let i = 0; i < cursorIndex; i++) {
363
+ visualRow += renderedItems[i].split("\n").length;
364
+ }
365
+ listBox.scrollTo(visualRow);
366
+ }
@@ -1,5 +1,5 @@
1
1
  import { resolveInstallRoot } from "./install.js";
2
- import { canRun, createTabbedLayout, DEBOUNCE_MOVE_MS, DEBOUNCE_SELECT_MS, renderBannerHeader, renderKeycaps, renderListRow, renderStepSummary, renderTabBar, selectionArray } from "./tui-utils.js";
2
+ import { canRun, createTabbedLayout, DEBOUNCE_MOVE_MS, DEBOUNCE_SELECT_MS, renderBannerHeader, renderKeycaps, renderListRow, renderListContent, renderStepSummary, renderTabBar, selectionArray } from "./tui-utils.js";
3
3
  const TAB_ORDER = ["skills", "locations", "agents", "review"];
4
4
  function buildInitialState() {
5
5
  return {
@@ -22,7 +22,7 @@ function currentTabItems(state, selectionCatalog) {
22
22
  if (state.activeTab === "skills") {
23
23
  return selectionCatalog.skills.map((skill) => ({
24
24
  id: skill.id,
25
- label: `[Skill] ${skill.label}`,
25
+ label: `◈ ${skill.label}`,
26
26
  description: skill.description,
27
27
  kind: "skill"
28
28
  }));
@@ -31,14 +31,14 @@ function currentTabItems(state, selectionCatalog) {
31
31
  return [
32
32
  {
33
33
  id: "global",
34
- label: "global",
35
- description: "Install into the current user's home directory.",
34
+ label: "⊙ Global",
35
+ description: "Install into the current user's home directory (~/.claude / ~/.codex).",
36
36
  kind: "locations"
37
37
  },
38
38
  {
39
39
  id: "local",
40
- label: "local",
41
- description: "Install into this project's dot directories.",
40
+ label: "⊕ Local",
41
+ description: "Install into this project's dot directories (.claude / .codex).",
42
42
  kind: "locations"
43
43
  }
44
44
  ];
@@ -47,13 +47,13 @@ function currentTabItems(state, selectionCatalog) {
47
47
  return [
48
48
  {
49
49
  id: "codex",
50
- label: "codex",
50
+ label: "◇ Codex",
51
51
  description: "Install as Codex skills.",
52
52
  kind: "agents"
53
53
  },
54
54
  {
55
55
  id: "claude",
56
- label: "claude",
56
+ label: "◇ Claude",
57
57
  description: "Install as Claude custom agents.",
58
58
  kind: "agents"
59
59
  }
@@ -62,19 +62,19 @@ function currentTabItems(state, selectionCatalog) {
62
62
  return [
63
63
  {
64
64
  id: "confirm",
65
- label: "Confirm install",
65
+ label: "✓ Confirm install",
66
66
  description: "Resolve sources and start installation.",
67
67
  kind: "review"
68
68
  },
69
69
  {
70
70
  id: "back",
71
- label: "Back to main menu",
71
+ label: "← Back to main menu",
72
72
  description: "Leave this installer and return to the main menu.",
73
73
  kind: "review"
74
74
  },
75
75
  {
76
76
  id: "cancel",
77
- label: "Cancel",
77
+ label: "✕ Cancel",
78
78
  description: "Exit without installing anything.",
79
79
  kind: "review"
80
80
  }
@@ -143,7 +143,6 @@ function formatListItem(item, state, isCursorRow, index) {
143
143
  active: isCursorRow,
144
144
  selected: state.reviewAction === item.id,
145
145
  label: item.label,
146
- meta: item.description,
147
146
  index
148
147
  });
149
148
  }
@@ -151,7 +150,6 @@ function formatListItem(item, state, isCursorRow, index) {
151
150
  active: isCursorRow,
152
151
  selected: isItemSelected(item, state),
153
152
  label: item.label,
154
- meta: item.description,
155
153
  index
156
154
  });
157
155
  }
@@ -164,20 +162,23 @@ function renderReviewSummary(state, selectionCatalog) {
164
162
  .map((group) => group.label);
165
163
  const selectedLocations = selectionArray(state.selectedLocations);
166
164
  const selectedAgents = selectionArray(state.selectedAgents);
165
+ const sep = `{cyan-fg}${"─".repeat(50)}{/cyan-fg}`;
166
+ const none = "{gray-fg}none{/gray-fg}";
167
167
  const lines = [
168
- "{bold}Selections{/bold}",
169
- `Skills ${selectedSkillLabels.length ? selectedSkillLabels.join(", ") : "none"}`,
170
- `Locations ${selectedLocations.length ? selectedLocations.join(", ") : "none"}`,
171
- `Agents ${selectedAgents.length ? selectedAgents.join(", ") : "none"}`
168
+ `{bold}{white-fg}◈ Summary{/white-fg}{/bold}`,
169
+ sep,
170
+ `{cyan-fg}◆ Skills{/cyan-fg} ${selectedSkillLabels.length ? selectedSkillLabels.join(", ") : none}`,
171
+ `{cyan-fg}◆ Locations{/cyan-fg} ${selectedLocations.length ? selectedLocations.join(", ") : none}`,
172
+ `{cyan-fg}◆ Agents{/cyan-fg} ${selectedAgents.length ? selectedAgents.join(", ") : none}`
172
173
  ];
173
174
  if (selectedGroupLabels.length > 0) {
174
- lines.splice(2, 0, `Groups ${selectedGroupLabels.join(", ")}`);
175
+ lines.splice(3, 0, `{cyan-fg}◆ Groups{/cyan-fg} ${selectedGroupLabels.join(", ")}`);
175
176
  }
176
177
  if (selectedLocations.length > 0 && selectedAgents.length > 0) {
177
- lines.push("", "{bold}Resolved targets{/bold}");
178
+ lines.push("", sep, `{bold}{white-fg}⊕ Resolved targets{/white-fg}{/bold}`);
178
179
  for (const agent of selectedAgents) {
179
180
  for (const location of selectedLocations) {
180
- lines.push(`- ${agent} + ${location}: ${resolveInstallRoot({ agent, location, cwd: process.cwd() })}`);
181
+ lines.push(` {gray-fg}▶{/gray-fg} ${agent} + ${location} {gray-fg}${resolveInstallRoot({ agent, location, cwd: process.cwd() })}{/gray-fg}`);
181
182
  }
182
183
  }
183
184
  }
@@ -198,7 +199,7 @@ function renderDetailBody(state, selectionCatalog) {
198
199
  }
199
200
  if (current) {
200
201
  const selectedCount = items.filter((item) => isItemSelected(item, state)).length;
201
- lines.push("{bold}Selected in this step{/bold}", `${selectedCount} of ${items.length}`, "", "{bold}About current item{/bold}", current.description);
202
+ lines.push(`{cyan-fg}◆ ${selectedCount} of ${items.length} selected{/cyan-fg}`, `{gray-fg}${"─".repeat(40)}{/gray-fg}`, `{bold}{white-fg}${current.label}{/white-fg}{/bold}`, `{gray-fg}${current.description}{/gray-fg}`);
202
203
  }
203
204
  return lines.join("\n");
204
205
  }
@@ -268,9 +269,8 @@ function syncListSelection(listBox, state, selectionCatalog) {
268
269
  const maxIndex = Math.max(items.length - 1, 0);
269
270
  const cursor = Math.min(state.listCursor[state.activeTab], maxIndex);
270
271
  state.listCursor[state.activeTab] = cursor;
271
- listBox.setItems(items.map((item, index) => formatListItem(item, state, index === cursor, index)));
272
- listBox.select(cursor);
273
- listBox.scrollTo(cursor);
272
+ const rendered = items.map((item, index) => formatListItem(item, state, index === cursor, index));
273
+ renderListContent(listBox, rendered, cursor);
274
274
  }
275
275
  export async function runTabbedWizard(selectionCatalog, headerTitle = "Install agent skills") {
276
276
  return new Promise((resolve, reject) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minhluudev/ai-tools",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "description": "CLI to install AI skills from GitHub branches into Codex and Claude.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -4,14 +4,14 @@
4
4
  {
5
5
  "id": "laravel-ddd",
6
6
  "label": "Laravel DDD",
7
- "description": "Folder: laravel-ddd",
7
+ "description": "Domain-Driven Design conventions for Laravel — modules, bounded contexts, value objects, and repository patterns.",
8
8
  "sourceBranch": "project-docs",
9
9
  "sourcePath": "laravel-ddd"
10
10
  },
11
11
  {
12
12
  "id": "nextjs",
13
13
  "label": "NextJS",
14
- "description": "Folder: nextjs",
14
+ "description": "Next.js project structure, routing conventions, data fetching patterns, and deployment configuration.",
15
15
  "sourceBranch": "project-docs",
16
16
  "sourcePath": "nextjs"
17
17
  }
@@ -4,44 +4,58 @@
4
4
  {
5
5
  "id": "agent-team",
6
6
  "label": "Agent team",
7
- "description": "Folder: agent-team",
7
+ "description": "Opt-in multi-agent coordination skill for a leader/coder/reviewer workflow.",
8
8
  "sourceBranch": "agent-skills",
9
9
  "sourcePath": "agent-team"
10
10
  },
11
11
  {
12
12
  "id": "bugfix",
13
13
  "label": "Bugfix",
14
- "description": "Folder: bugfix",
14
+ "description": "Trace, isolate, and fix bugs — regressions, runtime errors, flaky issues, and performance defects.",
15
15
  "sourceBranch": "agent-skills",
16
16
  "sourcePath": "bugfix"
17
17
  },
18
18
  {
19
19
  "id": "trace-bug",
20
20
  "label": "Trace bug",
21
- "description": "Folder: trace-bug",
21
+ "description": "Investigate code defects without applying a fix — root cause analysis and debugging handoff.",
22
22
  "sourceBranch": "agent-skills",
23
23
  "sourcePath": "trace-bug"
24
24
  },
25
25
  {
26
26
  "id": "business-analyst",
27
27
  "label": "Business analyst",
28
- "description": "Folder: business-analyst",
28
+ "description": "Analyze requirements and produce SRS documentation.",
29
29
  "sourceBranch": "agent-skills",
30
30
  "sourcePath": "business-analyst"
31
31
  },
32
32
  {
33
33
  "id": "git-engineering-workflow",
34
34
  "label": "Git engineering workflow",
35
- "description": "Folder: git-engineering-workflow",
35
+ "description": "GitFlow-style git workflow — committing, branching, merging, PRs, releases, and conflict resolution.",
36
36
  "sourceBranch": "agent-skills",
37
37
  "sourcePath": "git-engineering-workflow"
38
38
  },
39
39
  {
40
40
  "id": "review-code",
41
41
  "label": "Review code",
42
- "description": "Folder: review-code",
42
+ "description": "Structured code review for backend services, APIs, and server-side code.",
43
43
  "sourceBranch": "agent-skills",
44
44
  "sourcePath": "review-code"
45
+ },
46
+ {
47
+ "id": "cc-team-mini",
48
+ "label": "CC Team Mini",
49
+ "description": "Boot a Claude Code + Codex agent team (Leader + on-demand Coder). Waits for user task before running.",
50
+ "sourceBranch": "agent-skills",
51
+ "sourcePath": "cc-team-mini"
52
+ },
53
+ {
54
+ "id": "cc-team-full",
55
+ "label": "CC Team Full",
56
+ "description": "Full TDD agent team — spec → testcases → tests → implement → verify → review. Leader and Tester agents included.",
57
+ "sourceBranch": "agent-skills",
58
+ "sourcePath": "cc-team-full"
45
59
  }
46
60
  ]
47
61
  }