@minhluudev/ai-tools 1.0.7 → 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.
@@ -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.7",
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
  }