@amrhas82/agentic-kit 1.8.1 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/installer/cli.js +76 -35
- package/package.json +1 -1
package/installer/cli.js
CHANGED
|
@@ -1107,48 +1107,89 @@ ${colors.yellow}Press Enter to begin or Ctrl+C to exit${colors.reset}
|
|
|
1107
1107
|
}
|
|
1108
1108
|
|
|
1109
1109
|
async selectTools() {
|
|
1110
|
-
console.log(`\n${colors.bright}
|
|
1110
|
+
console.log(`\n${colors.bright}Select tools to install${colors.reset}\n`);
|
|
1111
|
+
console.log(`${colors.cyan}(↑↓ navigate, space=toggle, a=all, enter=confirm)${colors.reset}\n`);
|
|
1112
|
+
|
|
1113
|
+
// Interactive checkbox selection
|
|
1114
|
+
const selected = new Set(['claude']); // Default to claude
|
|
1115
|
+
let currentIndex = 0;
|
|
1116
|
+
|
|
1117
|
+
const renderList = () => {
|
|
1118
|
+
// Clear previous list
|
|
1119
|
+
process.stdout.write('\x1b[' + (this.tools.length + 1) + 'A'); // Move up
|
|
1120
|
+
process.stdout.write('\x1b[0J'); // Clear from cursor down
|
|
1121
|
+
|
|
1122
|
+
this.tools.forEach((tool, index) => {
|
|
1123
|
+
const isSelected = selected.has(tool.id);
|
|
1124
|
+
const isCurrent = index === currentIndex;
|
|
1125
|
+
const checkbox = isSelected ? '●' : '○';
|
|
1126
|
+
const pointer = isCurrent ? '»' : ' ';
|
|
1127
|
+
const color = isCurrent ? colors.cyan : colors.reset;
|
|
1128
|
+
|
|
1129
|
+
console.log(`${pointer} ${color}${checkbox} ${tool.name.padEnd(20)}${colors.reset} - ${tool.description}`);
|
|
1130
|
+
});
|
|
1131
|
+
console.log(''); // Empty line at bottom
|
|
1132
|
+
};
|
|
1111
1133
|
|
|
1112
|
-
//
|
|
1113
|
-
this.tools.forEach((tool) => {
|
|
1114
|
-
|
|
1115
|
-
|
|
1134
|
+
// Initial render
|
|
1135
|
+
this.tools.forEach((tool, index) => {
|
|
1136
|
+
const isSelected = selected.has(tool.id);
|
|
1137
|
+
const isCurrent = index === currentIndex;
|
|
1138
|
+
const checkbox = isSelected ? '●' : '○';
|
|
1139
|
+
const pointer = isCurrent ? '»' : ' ';
|
|
1140
|
+
const color = isCurrent ? colors.cyan : colors.reset;
|
|
1116
1141
|
|
|
1117
|
-
|
|
1118
|
-
|
|
1142
|
+
console.log(`${pointer} ${color}${checkbox} ${tool.name.padEnd(20)}${colors.reset} - ${tool.description}`);
|
|
1143
|
+
});
|
|
1144
|
+
console.log('');
|
|
1119
1145
|
|
|
1120
|
-
return new Promise(resolve => {
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1146
|
+
return new Promise((resolve) => {
|
|
1147
|
+
const stdin = process.stdin;
|
|
1148
|
+
stdin.setRawMode(true);
|
|
1149
|
+
stdin.resume();
|
|
1150
|
+
stdin.setEncoding('utf8');
|
|
1151
|
+
|
|
1152
|
+
const onKeypress = (key) => {
|
|
1153
|
+
if (key === '\u0003' || key === '\u001b') { // Ctrl+C or ESC
|
|
1154
|
+
stdin.setRawMode(false);
|
|
1155
|
+
stdin.pause();
|
|
1156
|
+
process.exit(0);
|
|
1157
|
+
} else if (key === '\r' || key === '\n') { // Enter
|
|
1158
|
+
stdin.setRawMode(false);
|
|
1159
|
+
stdin.removeListener('data', onKeypress);
|
|
1160
|
+
|
|
1161
|
+
this.selections.tools = Array.from(selected);
|
|
1162
|
+
|
|
1163
|
+
// Show selection summary
|
|
1164
|
+
console.log(`${colors.green}Installing ${this.selections.tools.length} tool(s):${colors.reset}`);
|
|
1165
|
+
this.selections.tools.forEach(id => {
|
|
1166
|
+
const tool = this.tools.find(t => t.id === id);
|
|
1167
|
+
console.log(` ${colors.green}✓${colors.reset} ${tool.name} ${colors.cyan}(14 agents + 20 commands)${colors.reset}`);
|
|
1168
|
+
});
|
|
1169
|
+
console.log('');
|
|
1127
1170
|
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
)
|
|
1132
|
-
|
|
1133
|
-
|
|
1171
|
+
resolve();
|
|
1172
|
+
} else if (key === ' ') { // Space - toggle
|
|
1173
|
+
const toolId = this.tools[currentIndex].id;
|
|
1174
|
+
if (selected.has(toolId)) {
|
|
1175
|
+
selected.delete(toolId);
|
|
1176
|
+
} else {
|
|
1177
|
+
selected.add(toolId);
|
|
1134
1178
|
}
|
|
1179
|
+
renderList();
|
|
1180
|
+
} else if (key === 'a' || key === 'A') { // Select all
|
|
1181
|
+
this.tools.forEach(tool => selected.add(tool.id));
|
|
1182
|
+
renderList();
|
|
1183
|
+
} else if (key === '\u001b[A') { // Up arrow
|
|
1184
|
+
currentIndex = currentIndex > 0 ? currentIndex - 1 : this.tools.length - 1;
|
|
1185
|
+
renderList();
|
|
1186
|
+
} else if (key === '\u001b[B') { // Down arrow
|
|
1187
|
+
currentIndex = currentIndex < this.tools.length - 1 ? currentIndex + 1 : 0;
|
|
1188
|
+
renderList();
|
|
1135
1189
|
}
|
|
1190
|
+
};
|
|
1136
1191
|
|
|
1137
|
-
|
|
1138
|
-
if (this.selections.tools.length === 0) {
|
|
1139
|
-
this.selections.tools = ['claude'];
|
|
1140
|
-
console.log(`${colors.blue}Using default: claude${colors.reset}`);
|
|
1141
|
-
}
|
|
1142
|
-
|
|
1143
|
-
// Show selection summary
|
|
1144
|
-
console.log(`\n${colors.green}Installing:${colors.reset}`);
|
|
1145
|
-
this.selections.tools.forEach(id => {
|
|
1146
|
-
const tool = this.tools.find(t => t.id === id);
|
|
1147
|
-
console.log(` ${colors.green}✓${colors.reset} ${tool.name} ${colors.cyan}(14 agents + 20 commands)${colors.reset}`);
|
|
1148
|
-
});
|
|
1149
|
-
|
|
1150
|
-
resolve();
|
|
1151
|
-
});
|
|
1192
|
+
stdin.on('data', onKeypress);
|
|
1152
1193
|
});
|
|
1153
1194
|
}
|
|
1154
1195
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amrhas82/agentic-kit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0",
|
|
4
4
|
"description": "AI development toolkit with 14 specialized agents and 20 commands. Simple one-question installer for Claude, Opencode, Ampcode, and Droid.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|